/* ID8FUN Design System - CSS Variables */
/* 严格按照ID8FUN规范的CSS变量系统 */
:root {
  /* 核心颜色变量 - ID8FUN规范 */
  --background: 0 0% 100%;        /* 页面背景 */
  --foreground: 0 0% 3.9%;        /* 主要文字 */
  --primary: 0 0% 9%;             /* 主要按钮 */
  --primary-foreground: 0 0% 98%; /* 主按钮文字 */
  --secondary: 0 0% 96.1%;        /* 次要按钮 */
  --secondary-foreground: 0 0% 45.1%; /* 次要按钮文字 */
  --muted: 0 0% 96.1%;            /* 静音背景 */
  --muted-foreground: 0 0% 45.1%; /* 次要文字 */
  --accent: 0 0% 96.1%;           /* 强调色背景 */
  --accent-foreground: 0 0% 9%;   /* 强调色文字 */
  --destructive: 0 84.2% 60.2%;   /* 危险操作 */
  --destructive-foreground: 0 0% 98%; /* 危险操作文字 */
  --border: 0 0% 89.8%;           /* 边框颜色 */
  --input: 0 0% 89.8%;            /* 输入框背景 */
  --ring: 0 0% 3.9%;              /* 焦点环颜色 */
  --radius: 0.5rem;               /* 圆角大小 */
  
  /* 扩展颜色 */
  --success: 142.1 76.2% 36.3%;
  --warning: 47.9 95.8% 53.1%;
  --info: 221.2 83.2% 53.3%;
  
  /* ID8FUN动态背景渐变变量 */
  --gradient-primary: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted)) 50%, hsl(var(--background)) 100%);
  --gradient-secondary: linear-gradient(225deg, hsl(var(--background)) 0%, hsl(var(--accent)) 50%, hsl(var(--background)) 100%);
}

/* 暗色主题 - ID8FUN规范 */
.dark {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 98%;
  --primary: 0 0% 98%;
  --primary-foreground: 0 0% 9%;
  --secondary: 0 0% 14.9%;
  --secondary-foreground: 0 0% 63.9%;
  --muted: 0 0% 14.9%;
  --muted-foreground: 0 0% 63.9%;
  --accent: 0 0% 14.9%;
  --accent-foreground: 0 0% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 0 0% 98%;
  --border: 0 0% 14.9%;
  --input: 0 0% 14.9%;
  --ring: 0 0% 83.1%;
  --success: 142.1 70.6% 45.3%;
  --warning: 47.9 95.8% 53.1%;
  --info: 217.2 91.2% 59.8%;
  
  /* 暗色主题动态背景 */
  --gradient-primary: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted)) 50%, hsl(var(--background)) 100%);
  --gradient-secondary: linear-gradient(225deg, hsl(var(--background)) 0%, hsl(var(--accent)) 50%, hsl(var(--background)) 100%);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* ID8FUN动态背景容器 - 严格按照规范 */
.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--gradient-primary);
  animation: id8funGradientShift 15s ease-in-out infinite;
  transition: background 0.3s ease;
}

/* ID8FUN动态背景动画 */
@keyframes id8funGradientShift {
  0%, 100% {
    background: var(--gradient-primary);
  }
  50% {
    background: var(--gradient-secondary);
  }
}

/* 增强的背景效果 - ID8FUN规范 */
.background-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 80%, hsl(var(--primary) / 0.05) 0%, transparent 50%),
              radial-gradient(circle at 80% 20%, hsl(var(--accent) / 0.05) 0%, transparent 50%);
  animation: id8funBackgroundPulse 20s ease-in-out infinite;
}

@keyframes id8funBackgroundPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.7; }
}

/* ID8FUN顶部控制区域 */
.top-controls {
  position: fixed;
  top: 1.5rem;
  right: calc(50% - 600px + 1rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1000;
}

/* 响应式调整 - 当屏幕宽度小于container最大宽度时 */
@media (max-width: 1232px) {
  .top-controls {
    right: 1rem;
  }
}

/* ID8FUN返回链接按钮 */
.return-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px hsl(var(--foreground) / 0.1),
              0 2px 8px hsl(var(--foreground) / 0.05);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
  text-decoration: none;
  color: hsl(var(--foreground));
}

.return-link:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.15),
              0 4px 12px hsl(var(--foreground) / 0.08);
  background: hsl(var(--background) / 0.9);
  color: hsl(var(--primary));
}

.return-icon {
  font-size: 20px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.return-link:hover .return-icon {
  transform: translateX(-2px);
}

/* ID8FUN语言切换组件 - 统一高度48px */
.language-toggle {
  position: relative;
}

.language-select {
  height: 48px;
  padding: 0 1rem;
  border: 1px solid hsl(var(--border));
  border-radius: 24px;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(10px);
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px hsl(var(--foreground) / 0.1),
              0 2px 8px hsl(var(--foreground) / 0.05);
  min-width: 100px;
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.language-select:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.15),
              0 4px 12px hsl(var(--foreground) / 0.08);
  background: hsl(var(--background) / 0.9);
  border-color: hsl(var(--primary));
}

.language-select:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-color: hsl(var(--primary));
}

.language-select:active {
  transform: translateY(-1px) scale(1.02);
  transition: transform 0.1s ease;
}

/* ID8FUN多语言选项样式 */
.language-select option {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  padding: 0.5rem;
  font-weight: 500;
}

/* ID8FUN主题切换按钮 - 48px×48px规范 */
.theme-toggle {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: hsl(var(--background) / 0.8);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px hsl(var(--foreground) / 0.1),
              0 2px 8px hsl(var(--foreground) / 0.05);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(var(--border));
}

.theme-toggle:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.15),
              0 4px 12px hsl(var(--foreground) / 0.08);
  background: hsl(var(--background) / 0.9);
}

.theme-toggle:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.theme-toggle:active {
  transform: translateY(-1px) scale(1.02);
  transition: transform 0.1s ease;
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
  color: hsl(var(--foreground));
  transition: all 0.3s ease;
}

.theme-toggle:hover svg {
  color: hsl(var(--primary));
  transform: rotate(15deg);
}

/* ID8FUN主题图标切换 */
[data-theme="light"] .moon-icon {
  display: none;
}

[data-theme="dark"] .sun-icon {
  display: none;
}

[data-theme="light"] .sun-icon {
  display: block;
}

[data-theme="dark"] .moon-icon {
  display: block;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 3rem;
}

.logo-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo {
  width: 250px;
  height: 250px;
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.title-section {
  text-align: left;
}

.title {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.125rem;
  color: hsl(var(--muted-foreground));
  max-width: 600px;
}

/* Upload Section */
.upload-section {
  margin-bottom: 2rem;
}

/* ID8FUN上传区域 - 增强交互状态 */
.upload-area {
  border: 3px dashed hsl(var(--border));
  border-radius: calc(var(--radius) * 2);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(135deg, hsl(var(--muted) / 0.2) 0%, hsl(var(--background)) 100%);
  position: relative;
  overflow: hidden;
}

.upload-area::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / 0.1), transparent);
  transition: left 0.6s ease;
}

/* ID8FUN上传区域悬停状态 */
.upload-area:hover {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.08) 0%, hsl(var(--accent) / 0.05) 100%);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsl(var(--primary) / 0.15),
              0 4px 12px hsl(var(--foreground) / 0.08);
}

.upload-area:hover::before {
  left: 100%;
}

/* ID8FUN拖拽状态 */
.upload-area.dragover {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.15) 0%, hsl(var(--accent) / 0.1) 100%);
  transform: scale(1.02) translateY(-2px);
  box-shadow: 0 12px 32px hsl(var(--primary) / 0.2),
              0 6px 16px hsl(var(--foreground) / 0.1);
  border-style: solid;
}

.upload-area.dragover .upload-icon {
  transform: scale(1.1);
  color: hsl(var(--primary));
}

.upload-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  color: hsl(var(--foreground));
  transition: color 0.3s ease;
}

.upload-area:hover .upload-content h3 {
  color: hsl(var(--primary));
}

.upload-content p {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ID8FUN上传图标 */
.upload-icon {
  color: hsl(var(--muted-foreground));
  font-size: 4rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.upload-area:hover .upload-icon {
  color: hsl(var(--primary));
  transform: scale(1.05);
}

/* ID8FUN预览区域 - 增强交互状态 */
.preview-section {
  margin-bottom: 3rem;
}

.preview-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.preview-section h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 2px;
}

.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

/* ID8FUN预览项目 - 现代化卡片设计 */
.preview-item {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.2) 100%);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}

.preview-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.preview-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.12),
              0 4px 12px hsl(var(--foreground) / 0.08);
  border-color: hsl(var(--primary) / 0.3);
}

.preview-item:hover::before {
  opacity: 1;
}

.preview-item img {
  max-width: 100%;
  max-height: 160px;
  border-radius: calc(var(--radius) * 1.2);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.1);
}

.preview-item:hover img {
  transform: scale(1.02);
}

.preview-item p {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  word-break: break-all;
  font-weight: 500;
}

/* ID8FUN配置区域 - 组件结构规范 */
.config-section {
  margin-bottom: 3rem;
}

/* Feature Highlight */
.feature-highlight {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.highlight-badge {
  background: linear-gradient(135deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
  background-size: 300% 300%;
  animation: gradient-shift 3s ease infinite;
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.highlight-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@media (max-width: 768px) {
  .feature-highlight {
    gap: 0.5rem;
  }
  
  .highlight-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* ID8FUN配置卡片 - 现代化设计 */
.config-card {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  padding: 2rem;
  background-color: hsl(var(--background));
  background-image: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.3) 100%);
  box-shadow: 0 4px 16px hsl(var(--foreground) / 0.08),
              0 2px 8px hsl(var(--foreground) / 0.04);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.config-header h3 {
  margin: 0;
}

.selection-controls {
  display: flex;
  gap: 0.5rem;
}

.control-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border: 1px solid hsl(var(--border));
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  border-radius: calc(var(--radius) * 0.75);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.control-btn:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
  transform: translateY(-1px);
  box-shadow: 0 2px 8px hsl(var(--primary) / 0.2);
}

.control-btn:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.control-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

.config-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.config-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.12),
              0 4px 12px hsl(var(--foreground) / 0.08);
  border-color: hsl(var(--primary) / 0.3);
}

.config-card:hover::before {
  opacity: 1;
}

/* ID8FUN配置卡片标题 */
.config-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.config-card h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 2px;
}

/* ID8FUN格式选项组件 - 完整交互状态 */
.format-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
}

.format-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border: 2px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: hsl(var(--background));
  position: relative;
  overflow: hidden;
}

.format-option:hover {
  border-color: hsl(var(--primary) / 0.6);
  background-color: hsl(var(--muted) / 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.15),
              0 2px 6px hsl(var(--foreground) / 0.05);
}

.format-option:focus-within {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-color: hsl(var(--primary));
}

.format-option input[type="checkbox"]:checked + .format-label {
  color: hsl(var(--primary));
  font-weight: 600;
}

.format-option:has(input[type="checkbox"]:checked) {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--accent) / 0.05) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.2),
              0 2px 8px hsl(var(--foreground) / 0.08);
}

.format-option:has(input[type="checkbox"]:checked)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
}

.format-label {
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.size-categories {
  display: grid;
  gap: 1.5rem;
}

.size-category h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: hsl(var(--foreground));
}

/* ID8FUN尺寸选项组件 - 完整交互状态 */
.size-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.size-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.75rem;
  border: 2px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background-color: hsl(var(--background));
  font-size: 0.875rem;
  position: relative;
  overflow: hidden;
}

.size-option:hover {
  border-color: hsl(var(--primary) / 0.6);
  background-color: hsl(var(--muted) / 0.3);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.15),
              0 2px 6px hsl(var(--foreground) / 0.05);
}

.size-option:focus-within {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  border-color: hsl(var(--primary));
}

.size-option input[type="checkbox"]:checked + span {
  color: hsl(var(--primary));
  font-weight: 600;
}

.size-option:has(input[type="checkbox"]:checked) {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, hsl(var(--primary) / 0.1) 0%, hsl(var(--accent) / 0.05) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px hsl(var(--primary) / 0.2),
              0 2px 8px hsl(var(--foreground) / 0.08);
}

.size-option:has(input[type="checkbox"]:checked)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
}

/* ID8FUN按钮系统 - 完整交互状态 */
.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.download-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.download-path-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.selected-path-text {
  font-size: 0.875rem;
  color: hsl(var(--muted-foreground));
  font-style: italic;
  text-align: center;
}

@media (min-width: 768px) {
  .download-path-selector {
    flex-direction: row;
    gap: 1rem;
  }
  
  .action-buttons {
    flex-direction: row;
    align-items: center;
  }
  
  .download-section {
    flex-direction: row;
    align-items: center;
  }
}

/* ID8FUN基础按钮样式 */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 120px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px hsl(var(--foreground) / 0.1);
}

/* ID8FUN按钮焦点状态 */
.btn:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
  transform: translateY(-1px);
}

/* ID8FUN按钮禁用状态 */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none;
}

/* ID8FUN主要按钮 */
.btn-primary {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.btn-primary:hover:not(:disabled) {
  background-color: hsl(var(--primary) / 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.3),
              0 2px 6px hsl(var(--foreground) / 0.1);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(-1px);
  transition: transform 0.1s ease;
}

/* ID8FUN次要按钮 */
.btn-secondary {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
  border: 1px solid hsl(var(--border));
}

.btn-secondary:hover:not(:disabled) {
  background-color: hsl(var(--secondary) / 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsl(var(--secondary) / 0.3),
              0 2px 6px hsl(var(--foreground) / 0.1);
  border-color: hsl(var(--primary));
}

.btn-secondary:active:not(:disabled) {
  transform: translateY(-1px);
  transition: transform 0.1s ease;
}

/* ID8FUN按钮加载状态 */
.btn.loading {
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

/* ID8FUN彩虹Loading动画组件 - 现代化设计 */
.loading-section {
  margin-bottom: 3rem;
}

.loading-container {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.1) 0%, hsl(var(--background)) 100%);
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid hsl(var(--border));
}

.rainbow-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-bottom: 1.5rem;
}

.rainbow-bar {
  width: 8px;
  height: 40px;
  border-radius: 4px;
  animation: rainbow-bounce 1.4s ease-in-out infinite;
}

.rainbow-bar:nth-child(1) {
  background: #ff0000;
  animation-delay: 0s;
}

.rainbow-bar:nth-child(2) {
  background: #ff8000;
  animation-delay: 0.1s;
}

.rainbow-bar:nth-child(3) {
  background: #ffff00;
  animation-delay: 0.2s;
}

.rainbow-bar:nth-child(4) {
  background: #00ff00;
  animation-delay: 0.3s;
}

.rainbow-bar:nth-child(5) {
  background: #0080ff;
  animation-delay: 0.4s;
}

.rainbow-bar:nth-child(6) {
  background: #8000ff;
  animation-delay: 0.5s;
}

@keyframes rainbow-bounce {
  0%, 40%, 100% {
    transform: scaleY(0.4);
    opacity: 0.6;
  }
  20% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.loading-text {
  color: hsl(var(--foreground));
  font-size: 1rem;
  margin: 1rem 0;
  font-weight: 500;
}

.loading-progress {
  width: 100%;
  height: 6px;
  background-color: hsl(var(--muted));
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1rem;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #0080ff, #8000ff);
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 3px;
  animation: rainbow-flow 2s linear infinite;
}

@keyframes rainbow-flow {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ID8FUN进度条组件 - 现代化设计 */
.progress-section {
  margin-bottom: 3rem;
}

.progress-container {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.1) 0%, hsl(var(--background)) 100%);
  border-radius: calc(var(--radius) * 1.5);
  border: 1px solid hsl(var(--border));
  display: none;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background-color: hsl(var(--muted));
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: inset 0 2px 4px hsl(var(--foreground) / 0.1);
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--background) / 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 6px;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, hsl(var(--background) / 0.4) 50%, transparent 100%);
  animation: progress-shine 1.5s infinite;
}

.progress-text {
  color: hsl(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes progress-shine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ID8FUN结果展示区域 - 现代化设计 */
.results-section {
  margin-bottom: 3rem;
}

.results-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.results-section h2::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 2px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
}

.result-item {
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  padding: 1.5rem;
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.2) 100%);
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}

.result-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.result-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsl(var(--foreground) / 0.12),
              0 4px 12px hsl(var(--foreground) / 0.08);
  border-color: hsl(var(--primary) / 0.3);
}

.result-item:hover::before {
  opacity: 1;
}

.result-item img {
  max-width: 100%;
  max-height: 140px;
  border-radius: calc(var(--radius) * 1.2);
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 12px hsl(var(--foreground) / 0.1);
}

.result-item:hover img {
  transform: scale(1.02);
}

.result-info {
  margin-bottom: 1rem;
}

.result-info p {
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.download-btn {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 6px hsl(var(--primary) / 0.2);
}

.download-btn:hover {
  background-color: hsl(var(--primary) / 0.9);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px hsl(var(--primary) / 0.3);
}

.download-btn:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

.download-btn:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ID8FUN社交链接区域 */
.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, hsl(var(--muted) / 0.1) 0%, hsl(var(--background)) 100%);
  border-radius: calc(var(--radius) * 2);
  border: 1px solid hsl(var(--border));
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}

.social-link:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px hsl(var(--primary) / 0.2),
              0 4px 12px hsl(var(--foreground) / 0.1);
  border-color: hsl(var(--primary));
  color: hsl(var(--primary));
}

.social-link:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.social-link svg {
  width: 24px;
  height: 24px;
  transition: transform 0.3s ease;
}

.social-link:hover svg {
  transform: scale(1.1);
}

/* FAQ部分样式 */
.faq-section {
  background: hsl(var(--background));
  padding: 4rem 0;
  margin-top: 4rem;
  border-top: 1px solid hsl(var(--border));
}

.faq-section h2 {
  text-align: center;
  color: hsl(var(--foreground));
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--accent)));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.faq-item {
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 2);
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px hsl(var(--foreground) / 0.05);
}

.faq-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px hsl(var(--foreground) / 0.15);
  border-color: hsl(var(--primary));
}

.faq-item:hover::before {
  opacity: 1;
}

.faq-item h3 {
  color: hsl(var(--foreground));
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.faq-item p {
  color: hsl(var(--muted-foreground));
  line-height: 1.6;
  margin: 0;
}

/* 分享按钮样式 */
.share-btn {
  position: relative;
  overflow: hidden;
}

.share-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, hsl(var(--background) / 0.2), transparent);
  transition: left 0.5s ease;
}

.share-btn:hover::before {
  left: 100%;
}

/* 分享弹窗样式 */
.share-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: hsl(var(--foreground) / 0.5);
  backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.share-modal.active {
  display: flex;
}

.share-content {
  background: hsl(var(--background));
  border-radius: calc(var(--radius) * 2.5);
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px hsl(var(--foreground) / 0.3);
  animation: slideInUp 0.3s ease;
  border: 1px solid hsl(var(--border));
}

.share-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(var(--border));
}

.share-header h3 {
  color: hsl(var(--foreground));
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.close-btn:hover {
  background: hsl(var(--muted));
  color: hsl(var(--foreground));
}

.share-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 1rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: calc(var(--radius) * 1.5);
  text-decoration: none;
  color: hsl(var(--foreground));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.share-platform:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px hsl(var(--foreground) / 0.15);
  border-color: hsl(var(--primary));
}

.share-platform svg {
  width: 32px;
  height: 32px;
  margin-bottom: 0.5rem;
}

.share-platform span {
  font-size: 0.9rem;
  font-weight: 500;
}

/* ID8FUN页脚区域 */
.footer {
  margin-top: 2rem;
  padding: 3rem 0;
  text-align: center;
  border-top: 1px solid hsl(var(--border));
  background: linear-gradient(135deg, hsl(var(--background)) 0%, hsl(var(--muted) / 0.2) 100%);
}

.footer-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(var(--foreground));
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-title::before,
.footer-title::after {
  content: '';
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  border-radius: 1px;
}

.footer-description {
  color: hsl(var(--muted-foreground));
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.footer-link {
  color: hsl(var(--muted-foreground));
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
}

.footer-link:hover {
  color: hsl(var(--primary));
  background: hsl(var(--muted) / 0.3);
  transform: translateY(-2px);
}

.footer-copyright {
  color: hsl(var(--muted-foreground));
  font-size: 0.875rem;
  padding-top: 2rem;
  border-top: 1px solid hsl(var(--border));
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 1rem 0.5rem;
  }
  
  .title {
    font-size: 2rem;
  }
  
  .logo-section {
    flex-direction: column;
    text-align: center;
  }
  
  .title-section {
    text-align: center;
  }
  
  .config-grid {
    grid-template-columns: 1fr;
  }
  
  .format-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .size-options {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .format-option,
  .size-option {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .top-controls {
    top: 1rem;
    right: 1rem;
    gap: 0.5rem;
  }
  
  .social-links {
    gap: 1rem;
    padding: 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .upload-area {
    padding: 2rem 1rem;
  }
  
  .preview-grid,
  .results-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .top-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .social-links {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
  }
  
  .social-link svg {
    width: 20px;
    height: 20px;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .background-container {
    animation: none;
  }
}

/* Focus styles for keyboard navigation */
input[type="checkbox"]:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ID8FUN自定义复选框样式 - 现代化设计 */
input[type="checkbox"] {
  width: 18px;
  height: 18px;
  border: 2px solid hsl(var(--border));
  border-radius: 4px;
  background-color: hsl(var(--background));
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
}

input[type="checkbox"]:hover {
  border-color: hsl(var(--primary));
  transform: scale(1.05);
}

input[type="checkbox"]:checked {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  transform: scale(1.05);
}

input[type="checkbox"]:checked::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: hsl(var(--primary-foreground));
  font-size: 12px;
  font-weight: bold;
}

input[type="checkbox"]:focus {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

/* ID8FUN动画系统 - 完整动画库 */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes bounce {
  0%, 20%, 53%, 80%, 100% {
    transform: translateY(0);
  }
  40%, 43% {
    transform: translateY(-8px);
  }
  70% {
    transform: translateY(-4px);
  }
  90% {
    transform: translateY(-2px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 5px hsl(var(--primary) / 0.5);
  }
  50% {
    box-shadow: 0 0 20px hsl(var(--primary) / 0.8), 0 0 30px hsl(var(--primary) / 0.6);
  }
}

/* ID8FUN动画类 */
.fade-in {
  animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-up {
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left {
  animation: slideInLeft 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in {
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse {
  animation: pulse 2s infinite;
}

.bounce {
  animation: bounce 1s;
}

.glow {
  animation: glow 2s infinite;
}

.loading {
  animation: spin 1s linear infinite;
}

/* ID8FUN延迟动画 */
.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }