/* 
 * 麒麟系统下载站 - 自定义毛玻璃UI样式
 * 炫彩渐变 + 苹果毛玻璃效果 + 响应式宫格布局
 */

/* ========================================
   1. 全局样式和炫彩渐变背景
   ======================================== */

body {
  background: linear-gradient(
    135deg,
    #667eea 0%,
    #764ba2 25%,
    #f093fb 50%,
    #4facfe 75%,
    #00f2fe 100%
  );
  background-size: 400% 400%;
  animation: gradient-shift 15s ease infinite;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

@keyframes gradient-shift {
  0%, 100% { 
    background-position: 0% 50%; 
  }
  50% { 
    background-position: 100% 50%; 
  }
}

/* ========================================
   2. 毛玻璃效果基础类
   ======================================== */

.glass-card {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  padding: 24px;
  transition: all 0.3s ease;
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

/* 浏览器兼容性 - 降级方案 */
@supports not (backdrop-filter: blur(10px)) {
  .glass-card {
    background: rgba(255, 255, 255, 0.9);
  }
}

/* ========================================
   3. 响应式宫格布局
   ======================================== */

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* 响应式断点 */
@media (min-width: 1200px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 767px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
}

/* ========================================
   4. 导航栏毛玻璃效果
   ======================================== */

.navbar-glass {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.navbar-glass .nav-link {
  color: white !important;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 8px 16px;
  border-radius: 8px;
  margin: 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-glass .nav-link i {
  font-size: 16px;
  min-width: 20px;
  text-align: center;
}

.navbar-glass .nav-link:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.navbar-glass .navbar-brand {
  color: white !important;
  font-weight: 700;
  font-size: 1.3rem;
}

/* 移动端导航栏优化 */
@media (max-width: 991px) {
  .navbar-glass .navbar-brand {
    font-size: 1.1rem;
  }
  
  .navbar-glass .navbar-collapse {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    margin-top: 12px;
    padding: 12px;
  }
  
  .navbar-glass .navbar-nav {
    width: 100%;
  }
  
  .navbar-glass .nav-link {
    padding: 12px 16px !important;
    margin: 4px 0 !important;
    border-radius: 8px;
    text-align: left;
  }
  
  .navbar-toggler {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: scale(1.05);
  }
  
  .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.3);
  }
}

/* ========================================
   5. 公告栏炫彩效果
   ======================================== */

.announcement-glass {
  background: linear-gradient(
    90deg,
    rgba(255, 107, 107, 0.8),
    rgba(255, 142, 142, 0.8),
    rgba(255, 107, 107, 0.8)
  ) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   6. 版本卡片组件
   ======================================== */

.version-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-height: 280px;
  position: relative;
}

.version-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.version-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.4;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.version-info {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.cpu-badge, .arch-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  font-size: 12px;
  color: white;
  margin: 4px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white !important;
  text-decoration: none;
  border-radius: 24px;
  font-weight: 600;
  margin: 16px 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
  min-height: 44px;
  min-width: 120px;
  justify-content: center;
}

.download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
  color: white !important;
  text-decoration: none;
}

.md5-info {
  color: rgba(255, 255, 255, 0.8);
  font-size: 11px;
  margin-top: 8px;
  word-break: break-all;
  padding: 0 8px;
}

.extra-links {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.extra-links a {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.15);
  color: white !important;
  text-decoration: none;
  border-radius: 8px;
  font-size: 12px;
  transition: all 0.3s ease;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
}

.extra-links a:hover {
  background: rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

/* 预留链接按钮样式 */
.extra-links a.link-placeholder {
  background: rgba(255, 255, 255, 0.08);
  border: 1px dashed rgba(255, 255, 255, 0.4);
  opacity: 0.7;
  cursor: help;
}

.extra-links a.link-placeholder:hover {
  background: rgba(255, 255, 255, 0.15);
  opacity: 1;
}

/* ========================================
   7. 版本分组标题
   ======================================== */

.section-header {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.3),
    rgba(118, 75, 162, 0.3)
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 20px 32px;
  margin: 32px auto 24px;
  max-width: 1400px;
  text-align: center;
}

.section-header h2 {
  color: white;
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.section-header h2 i {
  margin-right: 8px;
}

/* 不同分组使用不同渐变色 */
.section-header.variant-1 {
  background: linear-gradient(135deg, 
    rgba(240, 147, 251, 0.3),
    rgba(79, 172, 254, 0.3)
  );
}

.section-header.variant-2 {
  background: linear-gradient(135deg, 
    rgba(0, 242, 254, 0.3),
    rgba(102, 126, 234, 0.3)
  );
}

.section-header.variant-3 {
  background: linear-gradient(135deg, 
    rgba(118, 75, 162, 0.3),
    rgba(240, 147, 251, 0.3)
  );
}

/* ========================================
   8. 性能优化
   ======================================== */

/* 使用will-change优化动画性能 */
.glass-card,
.download-btn,
.nav-link {
  will-change: transform;
}

/* 低性能模式 */
.low-performance .glass-card {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(255, 255, 255, 0.9);
}

.low-performance body {
  animation: none;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.low-performance .navbar-glass,
.low-performance .announcement-glass,
.low-performance .section-header {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* ========================================
   9. 响应式优化
   ======================================== */

@media (max-width: 767px) {
  body {
    font-size: 14px;
  }
  
  .section-header h2 {
    font-size: 22px;
  }
  
  .version-title {
    font-size: 14px;
  }
  
  .download-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .navbar-glass .navbar-brand {
    font-size: 1.1rem;
  }
}

/* 确保触摸目标至少44x44px */
@media (max-width: 767px) {
  .nav-link,
  .download-btn,
  .extra-links a {
    min-height: 44px;
    min-width: 44px;
  }
}

/* ========================================
   10. 辅助类
   ======================================== */

.text-white {
  color: white !important;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

/* ========================================
   11. 搜索框样式
   ======================================== */

.search-container {
  max-width: 1400px;
  margin: 24px auto 16px;
  padding: 0 24px;
}

.search-box {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  gap: 12px;
  position: relative;
}

.search-icon {
  color: white;
  font-size: 20px;
  opacity: 0.8;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: white;
  font-size: 16px;
  padding: 8px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.clear-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.search-stats {
  color: white;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  opacity: 0.9;
}

/* 隐藏不匹配的卡片 */
.version-card.hidden {
  display: none;
}

/* 隐藏空的分组 */
.section-header.hidden,
.grid-container.hidden {
  display: none;
}

/* 搜索高亮 */
.highlight {
  background: rgba(255, 255, 0, 0.3);
  padding: 2px 4px;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .search-container {
    padding: 0 16px;
    margin: 16px auto 12px;
  }
  
  .search-box {
    padding: 12px 16px;
  }
  
  .search-input {
    font-size: 14px;
  }
  
  .search-input::placeholder {
    font-size: 13px;
  }
}

/* ========================================
   12. 快速导航样式
   ======================================== */

.quick-nav-container {
  max-width: 1400px;
  margin: 0 auto 24px;
  padding: 0 24px;
}

.quick-nav {
  padding: 20px 24px;
}

.quick-nav-title {
  color: white;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quick-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  text-decoration: none;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: white;
}

.nav-btn i {
  font-size: 12px;
}

/* 桌面版本按钮 */
.nav-btn.desktop {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
}

.nav-btn.desktop:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
}

/* 服务器版本按钮 */
.nav-btn.server {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.3), rgba(79, 172, 254, 0.3));
}

.nav-btn.server:hover {
  background: linear-gradient(135deg, rgba(240, 147, 251, 0.5), rgba(79, 172, 254, 0.5));
}

@media (max-width: 767px) {
  .quick-nav-container {
    padding: 0 16px;
    margin-bottom: 16px;
  }
  
  .quick-nav {
    padding: 16px;
  }
  
  .quick-nav-title {
    font-size: 14px;
    margin-bottom: 12px;
  }
  
  .quick-nav-buttons {
    gap: 8px;
  }
  
  .nav-btn {
    padding: 8px 14px;
    font-size: 13px;
  }
}


/* ========================================
   13. Security Wizard Styles
   ======================================== */

/* Wizard Container */
.wizard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

/* Progress Bar */
.wizard-progress {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  height: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}

.wizard-progress-inner {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 12px;
}

/* Profile Selector */
.profile-selector {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  justify-content: center;
  flex-wrap: wrap;
}

.profile-btn {
  padding: 12px 32px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.profile-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.profile-btn.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Wizard Steps Navigation */
.wizard-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  overflow-x: auto;
  padding: 12px 0;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  min-width: 120px;
  transition: all 0.3s ease;
  position: relative;
}

.step-item.clickable {
  cursor: pointer;
}

.step-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.step-item.active {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.step-item.completed {
  background: rgba(76, 175, 80, 0.2);
  border-color: rgba(76, 175, 80, 0.5);
}

.step-badge {
  width: 32px;
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 14px;
}

.step-item.active .step-badge {
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.step-item.completed .step-badge {
  background: #4caf50;
}

.step-item span {
  color: white;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.svg-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: white;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* SVG Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

@keyframes dash {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 100; }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-dash {
  stroke-dasharray: 10;
  animation: dash 20s linear infinite;
}

.animate-spin {
  animation: spin 10s linear infinite;
}

/* Step Panes */
.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Option Grid */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Option Card */
.option-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.option-card:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.option-card.selected {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.2), rgba(118, 75, 162, 0.2));
  border-color: rgba(102, 126, 234, 0.6);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.checkbox-container {
  position: relative;
  display: inline-block;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.checkbox-container input:checked ~ .checkmark {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.option-title {
  flex: 1;
  color: white;
  font-weight: 600;
  font-size: 15px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.card-action-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.option-desc {
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Extra Input Group */
.extra-input-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.extra-input-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
}

.form-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 4px 8px;
  color: white;
  font-size: 13px;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  background: rgba(255, 255, 255, 0.15);
}

/* Card Tooltip */
.card-tooltip {
  display: none;
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  line-height: 1.6;
}

.card-tooltip.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* Code Preview Box */
.code-preview-box {
  display: none;
  margin-top: 12px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.code-preview-box.active {
  display: block;
}

/* Preview Modal */
.preview-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-modal.active {
  opacity: 1;
}

.modal-content {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 16px;
  padding: 24px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-title {
  color: white;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.1);
}

.modal-body {
  margin-bottom: 20px;
}

.code-block {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: #4ade80;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Syntax Highlighting */
.sh-comment { color: #6a9955; }
.sh-keyword { color: #569cd6; font-weight: bold; }
.sh-string { color: #ce9178; }
.sh-func { color: #dcdcaa; }
.sh-var { color: #9cdcfe; }

.modal-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border: none;
  border-radius: 8px;
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

/* Navigation Buttons */
.wizard-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  gap: 16px;
}

.btn {
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

.btn-primary:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Result Code Wrap */
.result-code-wrap {
  position: relative;
  margin: 24px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .wizard-container {
    padding: 16px;
  }

  .wizard-steps {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  }

  .wizard-steps::-webkit-scrollbar {
    height: 4px;
  }

  .wizard-steps::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  .step-item {
    min-width: 100px;
    padding: 12px;
    min-height: 44px; /* Touch target minimum */
  }

  .step-item span {
    font-size: 11px;
  }

  .option-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-selector {
    flex-direction: column;
    gap: 12px;
  }

  .profile-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px; /* Touch target minimum */
    font-size: 16px;
  }

  .modal-content {
    width: 95%;
    max-width: 95vw;
    max-height: 90vh;
    padding: 16px;
    overflow-y: auto;
  }

  .wizard-nav {
    flex-direction: column;
    gap: 12px;
  }

  .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px; /* Touch target minimum */
    font-size: 16px;
  }

  /* Touch-friendly card actions */
  .card-action-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 12px;
  }

  /* Larger checkboxes for touch */
  .checkmark {
    width: 24px;
    height: 24px;
  }

  .checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
  }

  /* Better spacing for inputs on mobile */
  .extra-input-group {
    padding: 12px;
  }

  .form-input {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* Tablet-specific adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .option-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wizard-container {
    padding: 24px;
  }
}

/* Low Performance Mode */
.low-performance .option-card,
.low-performance .modal-content {
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  background: rgba(255, 255, 255, 0.9);
}

.low-performance .option-card {
  color: #333;
}

.low-performance .option-title,
.low-performance .option-desc {
  color: #333;
}

/* Input Error State */
.input-error {
  border-color: #ff6b6b !important;
  background-color: rgba(255, 107, 107, 0.1) !important;
}

.error-message {
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 4px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
