/* 基础重置和变量 */
:root {
  /* 马卡龙色系 - 加深版本 */
  --primary-mint: #7DD3A0;      /* 深薄荷绿 */
  --secondary-blue: #5BB3D9;     /* 深天空蓝 */
  --accent-purple: #A078E8;     /* 深薰衣草紫 */
  --success-green: #10B981;     /* 深柔和绿 */
  --warning-yellow: #F59E0B;    /* 深温暖黄 */
  --soft-pink: #F472B6;         /* 深柔和粉 */
  --light-purple: #B794F6;      /* 深浅紫色 */
  --peach: #FB923C;             /* 深桃色 */
  
  /* 中性色 */
  --white: #FFFFFF;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* 文本颜色 */
  --text-primary: var(--gray-800);
  --text-secondary: var(--gray-600);
  --text-light: var(--gray-500);
  
  /* 主题色扩展 */
  --primary-pink: #FF6B9D;
  
  /* 渐变 */
  --gradient-primary: linear-gradient(135deg, var(--primary-mint) 0%, var(--secondary-blue) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-purple) 0%, var(--soft-pink) 100%);
  --gradient-warm: linear-gradient(135deg, var(--warning-yellow) 0%, var(--peach) 100%);
  
  /* 阴影 */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  
  /* 字体 */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: var(--gray-700);
  background-color: var(--gray-50);
  padding-bottom: 60px; /* 移动端底部导航 */
}

a {
  text-decoration: none;
  color: inherit;
}

/* 顶部导航 */
.header {
  background: white;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-icon {
  font-size: 1.5rem;
}

.search-box {
  display: flex;
  align-items: center;
  background: var(--gray-100);
  border-radius: 20px;
  padding: 8px 16px;
  width: 400px;
}

.search-input {
  border: none;
  background: none;
  outline: none;
  flex: 1;
  font-size: 14px;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
}

.header-right {
  display: flex;
  gap: 12px;
}

.btn-publish, .btn-login {
  padding: 8px 20px;
  border-radius: 20px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-publish {
  background: var(--gradient-primary);
  color: white;
}

.btn-login {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-publish:hover, .btn-login:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 主导航 */
.main-nav {
  background: linear-gradient(135deg, #A7E8BD 0%, #92C5F7 100%);
  border-bottom: 1px solid var(--gray-200);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  gap: 2rem;
}

.nav-item {
  padding: 12px 16px;
  font-weight: 500;
  color: var(--gray-700);
  position: relative;
  transition: all 0.3s ease;
  border-radius: 8px;
  text-decoration: none;
}

.nav-item:hover {
  color: var(--gray-800);
  background-color: rgba(125, 211, 160, 0.1);
  transform: translateY(-1px);
}

.nav-item.active {
  color: var(--gray-800);
  background-color: rgba(125, 211, 160, 0.15);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent-purple);
}

/* 公告栏 */
.announcement-bar {
  background: white;
  padding: 8px 0;
  border-bottom: 1px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.announcement-bar:hover {
  background-color: rgba(125, 211, 160, 0.05);
}

.announcement-content {
  max-width: 800px;  /* 缩小最大宽度 */
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
}

.announcement-scroll {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  max-width: 600px;  /* 限制滚动区域宽度 */
  margin: 0 auto;    /* 居中显示 */
}

.announcement-text {
  display: inline-block;
  color: #FF0000;
  font-size: 16px;  /* 稍微缩小字体 */
  font-weight: 600;
  padding-left: 100%;
  animation: scroll-text 15s linear infinite;  /* 加快滚动速度 */
}

.announcement-text strong {
  color: #FF0000;
  font-weight: 700;
  font-size: 18px;  /* 相应缩小粗体字体 */
}

/* 滚动动画 */
@keyframes scroll-text {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 鼠标悬停时暂停滚动 */
.announcement-scroll:hover .announcement-text {
  animation-play-state: paused;
}

/* 移动端调整 */
@media (max-width: 768px) {
  .announcement-content {
    max-width: 90%;  /* 移动端使用百分比宽度 */
    padding: 0 15px;
  }
  
  .announcement-scroll {
    max-width: 100%;  /* 移动端使用全宽 */
  }
  
  .announcement-text {
    font-size: 14px;  /* 移动端更小字体 */
    animation-duration: 12s;  /* 移动端更快滚动 */
  }
  
  .announcement-text strong {
    font-size: 16px;  /* 移动端粗体字体 */
  }
}

.announcement-actions {
  display: flex;
  gap: 12px;
}

.queue-btn {
  padding: 6px 16px;
  border-radius: 16px;
  border: 1px solid var(--gray-700);
  background: white;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.queue-btn.featured {
  background: var(--gradient-accent);
  color: white;
  border: none;
}

.queue-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 主内容区 */
.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 20px;
}

/* 页面头部 */
.page-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
  position: relative;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid var(--gray-300);
  position: absolute;
  left: 0;
}

.back-home-btn:hover {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* 区域标题 */
.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title.centered {
  justify-content: center;
  margin-bottom: 0;
  text-align: center;
  width: 100%;
}

/* 1. 图片工具区 */
.tools-section {
  margin-bottom: 40px;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.tool-card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.3s ease;
}

.tool-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.tool-header {
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--gray-100);
}

.tool-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.tool-expand {
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.3s ease;
}

.tool-expand:hover {
  color: var(--primary-mint);
}

.tool-content {
  padding: 16px;
}

/* 拖拽区域 */
.drop-zone {
  border: 2px dashed var(--gray-300);
  border-radius: 8px;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--gray-50);
}

.drop-zone:hover {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.1);
}

.drop-zone.active {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.2);
}

/* 控件样式 */
.control-group {
  margin: 16px 0;
}

.control-group label {
  display: block;
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.control-group input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary-mint);
  border-radius: 50%;
  cursor: pointer;
}

/* 按钮样式 */
.btn-primary, .btn-secondary {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 14px;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-secondary {
  background: white;
  border: 1px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-primary:hover, .btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 工具抽屉 */
.tool-drawer {
  display: none;
  background: var(--gray-50);
  border-top: 1px solid var(--gray-200);
  padding: 20px;
  max-height: 400px;
  overflow-y: auto;
}

.tool-drawer.active {
  display: block;
}

.drawer-content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

/* 预设选项 */
.preset-options {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.preset-btn {
  padding: 6px 12px;
  border-radius: 16px;
  border: 1px solid var(--gray-300);
  background: white;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-btn:hover, .preset-btn.active {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
}

/* 位置选择网格 */
.position-grid {
  display: grid;
  grid-template-columns: repeat(3, 40px);
  gap: 8px;
  margin: 12px 0;
}

.pos-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pos-btn:hover, .pos-btn.active {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
}

/* 更多工具卡片 */
.tool-card.more-tools {
  background: linear-gradient(135deg, #A7E8BD 0%, #92C5F7 100%);
}

.more-tools .tool-content {
  text-align: center;
  padding: 40px;
}

.more-tools-link {
  color: white;
}

.more-tools-link .icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.more-tools-link h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.more-tools-link small {
  font-size: 12px;
  opacity: 0.9;
}

/* 2. 约稿画师专区 */
.commission-section {
  margin-bottom: 40px;
}

.commission-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.more-artists-btn {
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--soft-pink) 100%);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(203, 166, 247, 0.3);
  animation: pulse-glow 2s infinite;
  text-decoration: none;
  display: inline-block;
}

.more-artists-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 25px rgba(203, 166, 247, 0.4);
  animation: none;
}

@keyframes pulse-glow {
  0%, 100% { 
    box-shadow: 0 4px 15px rgba(203, 166, 247, 0.3);
  }
  50% { 
    box-shadow: 0 4px 20px rgba(203, 166, 247, 0.5);
  }
}

.commission-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.commission-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--gray-50);
  border-radius: 16px;
  transition: all 0.3s ease;
}

.commission-item:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* 可点击的commission-item样式 */
.commission-item[onclick] {
  cursor: pointer;
  transition: all 0.3s ease;
}

.commission-item[onclick]:hover {
  background: var(--gray-100);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--primary-mint);
}

.commission-item[onclick]:active {
  transform: translateY(0);
  box-shadow: var(--shadow);
}

.commission-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.artist-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.commission-item:hover .artist-avatar {
  transform: scale(1.1);
}

.avatar-placeholder {
  font-size: 1.5rem;
}

.commission-info {
  text-align: center;
  flex: 1;
}

.commission-info h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 6px;
}

.tags {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.stats {
  font-size: 14px;
  color: var(--soft-pink);
  font-weight: 600;
  margin-bottom: 12px;
}

.contact-artist-btn {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 100%;
  max-width: 100px;
}

.contact-artist-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  filter: brightness(1.1);
}

.commission-right {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.artwork-preview {
  width: 120px;
  height: 90px;
  border-radius: 12px;
  background: white;
  border: 2px dashed var(--gray-300);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.commission-item:hover .artwork-preview {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.1);
}

.preview-placeholder {
  font-size: 12px;
  color: var(--gray-400);
  text-align: center;
  line-height: 1.2;
}

/* 当有真实图片时的样式（为后续功能准备） */
.artwork-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .commission-showcase {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 16px;
  }
  
  .commission-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .commission-item {
    flex-direction: column;
    text-align: center;
  }
  
  .commission-left {
    width: 100%;
  }
  
  .commission-right {
    width: 100%;
    margin-top: 12px;
  }
  
  .artwork-preview {
    width: 100%;
    height: 120px;
  }
}

/* 3. 插队提审区 */
.queue-section {
  margin-bottom: 40px;
}

.queue-container {
  background: white;
  border-radius: 12px;
  padding: 30px;
  border: 1px solid var(--gray-200);
}

.queue-header {
  text-align: center;
  margin-bottom: 20px;
}

.queue-tagline {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.queue-options {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.queue-option {
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 12px;
  padding: 16px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.queue-option.featured {
  background: var(--gradient-warm);
  border: none;
}

.queue-option:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.price {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
}

.queue-option.featured .price {
  color: white;
}

.action {
  display: block;
  font-size: 14px;
  color: var(--gray-600);
  margin-top: 4px;
}

.queue-option.featured .action {
  color: white;
}

.queue-rules {
  text-align: center;
  color: var(--gray-600);
  font-size: 14px;
}

.queue-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

.queue-links a {
  color: var(--primary-mint);
  font-weight: 500;
}

/* 插队详情链接样式 - 更醒目 */
.queue-detail-link {
  color: var(--primary-mint) !important;
  font-weight: 600 !important;
  font-size: 16px !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
  text-underline-offset: 4px !important;
  transition: all 0.3s ease !important;
  display: inline-block !important;
  padding: 4px 8px !important;
  border-radius: 6px !important;
  background: rgba(167, 232, 189, 0.1) !important;
}

.queue-detail-link:hover {
  color: white !important;
  background: var(--primary-mint) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 8px rgba(167, 232, 189, 0.3) !important;
}

/* 插队卡片点击效果 */
.queue-container {
  transition: all 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.queue-container:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--primary-mint);
}

/* 社区区域 */
.community-section {
  margin-bottom: 40px;
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.community-tabs {
  display: flex;
  gap: 20px;
}

.tab-link {
  color: var(--gray-600);
  font-weight: 500;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
}

.tab-link.active, .tab-link:hover {
  color: var(--primary-mint);
  border-bottom-color: var(--primary-mint);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
}

.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.post-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: var(--gray-100);
}

.post-info {
  padding: 12px;
}

.post-info h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.post-author {
  font-size: 12px;
  color: var(--gray-500);
}

.community-more {
  text-align: center;
  margin-top: 20px;
}

.btn-more {
  display: inline-block;
  padding: 10px 24px;
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  color: var(--gray-700);
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-more:hover {
  background: var(--gray-50);
  transform: translateY(-2px);
}

/* 反馈留言卡片样式 */
.feedback-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.feedback-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  cursor: pointer;
}

.feedback-icon {
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 2px;
}

.feedback-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 8px;
  line-height: 1.4;
}

.feedback-author {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.feedback-time {
  font-size: 11px;
  color: var(--gray-400);
}

/* 需求卡片样式 */
.demand-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--gray-200);
  transition: all 0.3s ease;
  position: relative;
}

.demand-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
  cursor: pointer;
}

.demand-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  background: linear-gradient(135deg, #FF6B9D 0%, #4ECDC4 100%);
  color: white;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.demand-info h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
  line-height: 1.4;
}

.demand-budget {
  font-size: 14px;
  font-weight: 600;
  color: #FF6B9D;
  margin-bottom: 8px;
}

.demand-deadline {
  font-size: 12px;
  color: var(--gray-600);
  margin-bottom: 8px;
}

.demand-tags {
  font-size: 11px;
  color: var(--gray-500);
}

/* 底部 */
.footer {
  background: var(--gradient-primary);
  color: black;
  padding: 40px 0;
  margin-top: 60px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: black;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--secondary-blue);
}

.qr-code {
  position: relative;
  cursor: pointer;
}

.qr-popup {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  padding: 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  margin-bottom: 10px;
}

.qr-code:hover .qr-popup {
  display: block;
}

.qr-popup img {
  width: 120px;
  height: 120px;
  background: var(--gray-100);
}

/* 移动端导航 */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--gray-200);
  z-index: 100;
}

.mobile-nav .nav-item {
  flex: 1;
  text-align: center;
  padding: 8px 0;
  font-size: 12px;
  color: var(--gray-600);
}

.mobile-nav .nav-item.active {
  color: var(--primary-mint);
}

.mobile-nav .icon {
  display: block;
  font-size: 20px;
  margin-bottom: 2px;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 3px;
  background: var(--gray-600);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* 响应式设计 */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .commission-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-center {
    display: none;
  }
  
  .header-right {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  body {
    padding-bottom: 60px;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }
  
  .commission-grid {
    grid-template-columns: 1fr;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .queue-options {
    flex-direction: column;
  }
  
  .announcement-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .community-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  
  .community-tabs {
    font-size: 14px;
    gap: 12px;
  }
  
  /* 页面头部移动端适配 */
  .page-header {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
  
  .back-home-btn {
    align-self: flex-start;
  }
  
  .section-title.centered {
    justify-content: center;
    width: 100%;
  }
} 

/* 工具图标网格 */
.tool-icons {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-top: 12px;
}

.tool-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}

.tool-icon-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.tool-icon-card.more {
  background: var(--gradient-primary);
  color: white;
  border: none;
}

.tool-icon-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.tool-icon-card.more .tool-icon-badge {
  background: rgba(255,255,255,.2);
  color: #fff;
}

.tool-icon-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

.tool-icon-card.more .tool-icon-title {
  color: #fff;
}

@media (max-width: 1024px) {
  .tool-icons { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .tool-icons { grid-template-columns: repeat(2, 1fr); }
} 

/* 工具页面专用样式 */
.tool-header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 30px;
}

.back-btn {
  color: var(--gray-600);
  font-weight: 500;
  transition: color 0.3s ease;
}

.back-btn:hover {
  color: var(--primary-mint);
}

.tool-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0;
}

.tool-actions {
  display: flex;
  gap: 12px;
}

.help-btn, .share-btn {
  padding: 8px 16px;
  border: 1px solid var(--gray-300);
  background: white;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.help-btn:hover, .share-btn:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
}

/* 压缩工具容器 */
.compress-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 大型拖拽区域 */
.file-selection-area {
  margin-bottom: 30px;
}

.drop-zone-large {
  border: 3px dashed var(--gray-300);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  background: white;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-zone-large:hover, .drop-zone-large.drag-over {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.05);
  transform: scale(1.02);
}

.drop-content h3 {
  font-size: 1.2rem;
  color: var(--gray-800);
  margin: 16px 0 8px;
}

.drop-content p {
  color: var(--gray-600);
  margin-bottom: 20px;
}

.drop-icon {
  font-size: 4rem;
  color: var(--gray-400);
}

.select-files-btn {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.select-files-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 模式选择 */
.mode-section {
  margin-bottom: 30px;
}

.mode-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.mode-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.mode-btn {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.mode-btn:hover {
  border-color: var(--primary-mint);
  transform: translateY(-2px);
}

.mode-btn.active {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.1);
}

.mode-btn.pro {
  background: linear-gradient(135deg, rgba(203, 166, 247, 0.1), rgba(255, 179, 186, 0.1));
  border-color: var(--accent-purple);
}

.mode-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 8px;
}

.mode-title {
  font-weight: 600;
  color: var(--gray-800);
  display: block;
  margin-bottom: 4px;
}

.mode-desc {
  font-size: 12px;
  color: var(--gray-600);
}

.pro-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--gradient-accent);
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  font-weight: 600;
}

/* 设置面板 */
.settings-section {
  margin-bottom: 30px;
}

.setting-panel {
  display: none;
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.setting-panel.active {
  display: block;
}

.setting-panel h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

/* 质量预设 */
.quality-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.preset-btn {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-btn:hover {
  background: var(--gray-100);
}

.preset-btn.active {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
}

.preset-title {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.preset-desc {
  font-size: 12px;
  opacity: 0.8;
}

.quality-slider {
  margin-top: 16px;
}

.quality-slider label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

/* 目标大小设置 */
.size-input-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.size-input-group input {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 16px;
}

.size-presets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.size-preset {
  padding: 8px 16px;
  background: var(--gray-100);
  border: none;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.size-preset:hover {
  background: var(--primary-mint);
  color: white;
}

/* 云端功能 */
.cloud-features {
  margin-bottom: 20px;
}

.feature-item {
  padding: 8px 0;
  color: var(--gray-700);
}

.upgrade-prompt {
  text-align: center;
  padding: 20px;
  background: var(--gray-50);
  border-radius: 12px;
}

.upgrade-btn {
  background: var(--gradient-accent);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 12px;
}

.pro-tag {
  background: var(--gradient-accent);
  color: white;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

/* 文件列表 */
.files-section {
  margin-bottom: 30px;
}

.files-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.files-header h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.clear-all-btn {
  background: none;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
}

.clear-all-btn:hover {
  background: var(--gray-50);
}

.files-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.file-item-enhanced {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.file-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.file-thumbnail {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
}

.file-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-details {
  flex: 1;
}

.file-name {
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.file-size {
  font-size: 12px;
  color: var(--gray-500);
}

.file-status {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 2px;
}

.file-status.success {
  color: var(--success-green);
  font-weight: 500;
}

.file-actions {
  display: flex;
  gap: 8px;
}

.preview-file-btn, .remove-file-btn {
  padding: 6px 12px;
  border: none;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preview-file-btn {
  background: var(--secondary-blue);
  color: white;
}

.remove-file-btn {
  background: var(--gray-200);
  color: var(--gray-600);
}

.preview-file-btn:hover, .remove-file-btn:hover {
  transform: translateY(-1px);
}

/* 预览对比 */
.preview-section {
  margin-bottom: 30px;
}

.preview-section h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.preview-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.preview-item {
  text-align: center;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 500;
}

.preview-image-container {
  position: relative;
  background: var(--gray-100);
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-image-container img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.compression-ratio {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

.compression-ratio.excellent {
  background: var(--success-green);
}

.compression-ratio.good {
  background: var(--warning-yellow);
}

.preview-arrow {
  font-size: 2rem;
  color: var(--gray-400);
}

/* 操作按钮 */
.action-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 30px;
}

.btn-success {
  background: var(--success-green);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* 进度条 */
.progress-section {
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: 500;
}

.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .tool-header-nav {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }
  
  .tool-actions {
    justify-content: center;
  }
  
  .mode-buttons {
    grid-template-columns: 1fr;
  }
  
  .quality-presets {
    grid-template-columns: 1fr;
  }
  
  .preview-compare {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .preview-arrow {
    transform: rotate(90deg);
  }
  
  .action-buttons {
    flex-direction: column;
  }
} 

/* 格式转换工具专用样式 */
.convert-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 格式检测提示 */
.format-detection {
  background: linear-gradient(135deg, var(--warning-yellow), var(--peach));
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.detection-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.detection-icon {
  font-size: 1.2rem;
}

/* 格式选择区域 */
.format-section {
  margin-bottom: 30px;
}

.format-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.format-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.format-option {
  background: white;
  border: 2px solid var(--gray-200);
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
}

.format-option:hover {
  border-color: var(--secondary-blue);
  transform: translateY(-2px);
}

.format-option.active {
  border-color: var(--secondary-blue);
  background: rgba(137, 207, 240, 0.1);
}

.format-option.suggested {
  border-color: var(--warning-yellow);
  background: rgba(251, 191, 36, 0.1);
  animation: suggest-pulse 2s infinite;
}

@keyframes suggest-pulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 8px rgba(251, 191, 36, 0);
  }
}

.format-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.format-info {
  flex: 1;
}

.format-name {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.format-desc {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.3;
}

.format-check {
  font-size: 1.5rem;
  color: var(--secondary-blue);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.format-option.active .format-check {
  opacity: 1;
}

/* 格式建议 */
.format-suggestion {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(255, 218, 185, 0.1));
  border: 1px solid var(--warning-yellow);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: center;
}

.suggestion-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.suggestion-icon {
  font-size: 1.2rem;
}

.suggestion-text {
  color: var(--gray-700);
  font-weight: 500;
}

/* 转换设置 */
.convert-settings {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.convert-settings h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.setting-item label {
  font-weight: 500;
  color: var(--gray-700);
}

.quality-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quality-control input[type="range"] {
  flex: 1;
}

.naming-options, .batch-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin: 0;
}

.suffix-input {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.suffix-input input {
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 14px;
}

.suffix-input small {
  color: var(--gray-500);
  font-size: 12px;
}

/* 转换预览 */
.convert-preview {
  margin-bottom: 30px;
}

.convert-preview h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  background: white;
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
}

.format-badge {
  background: var(--secondary-blue);
  color: white;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.file-conversion {
  font-size: 12px;
  color: var(--gray-600);
  margin-top: 4px;
}

.current-format {
  color: var(--gray-700);
  font-weight: 500;
}

.target-format {
  color: var(--secondary-blue);
  font-weight: 600;
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .format-options {
    grid-template-columns: 1fr;
  }
  
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .format-option {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }
  
  .format-info {
    text-align: center;
  }
  
  .preview-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .preview-arrow {
    transform: rotate(90deg);
  }
} 

/* 尺寸适配工具专用样式 */
.resize-container, .watermark-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 模式标签页 */
.resize-mode-section, .watermark-type-section {
  margin-bottom: 30px;
}

.mode-tabs, .type-buttons {
  display: flex;
  gap: 16px;
  background: var(--gray-100);
  padding: 4px;
  border-radius: 12px;
}

.mode-tab, .type-btn {
  flex: 1;
  padding: 12px 20px;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.mode-tab.active, .type-btn.active {
  background: white;
  box-shadow: var(--shadow-sm);
  color: var(--gray-800);
  font-weight: 600;
}

.type-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
}

.type-icon {
  font-size: 2rem;
}

.type-title {
  font-weight: 600;
  color: var(--gray-800);
}

.type-desc {
  font-size: 12px;
  color: var(--gray-600);
}

/* 预设分类 */
.preset-categories {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.category-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 12px;
}

.category-tab {
  padding: 8px 16px;
  background: none;
  border: none;
  color: var(--gray-600);
  cursor: pointer;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.category-tab.active {
  background: var(--primary-mint);
  color: white;
}

.preset-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.preset-grid.active {
  display: grid;
}

.preset-item {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.preset-item:hover {
  background: var(--primary-mint);
  color: white;
  transform: translateY(-2px);
}

.preset-item.active {
  background: var(--secondary-blue);
  color: white;
  border-color: var(--secondary-blue);
}

.preset-name {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.preset-size {
  font-size: 12px;
  opacity: 0.8;
}

/* 自定义和比例设置 */
.custom-section, .ratio-section {
  display: none;
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

.custom-section.active, .ratio-section.active {
  display: block;
}

.custom-inputs, .ratio-inputs {
  display: flex;
  gap: 20px;
  align-items: end;
}

.size-input, .ratio-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.size-input input, .ratio-input input, .ratio-input select {
  padding: 12px;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  font-size: 16px;
}

/* 适配设置 */
.fit-settings {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.fit-options {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.fit-btn {
  flex: 1;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.fit-btn:hover {
  background: var(--gray-100);
}

.fit-btn.active {
  background: var(--secondary-blue);
  color: white;
  border-color: var(--secondary-blue);
}

.fit-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 8px;
}

.fit-title {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.fit-desc {
  font-size: 12px;
  opacity: 0.8;
}

.bg-control {
  display: flex;
  align-items: center;
  gap: 12px;
}

.bg-presets {
  display: flex;
  gap: 8px;
}

.bg-preset, .color-preset {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  cursor: pointer;
  transition: all 0.3s ease;
}

.bg-preset:hover, .color-preset:hover {
  transform: scale(1.1);
  border-color: var(--gray-500);
}

/* 文件网格显示 */
.files-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* 文件信息头部样式 */
.files-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.usage-info {
  font-size: 12px;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.clear-all-btn {
  background: #ff6b6b;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.clear-all-btn:hover {
  background: #ff5252;
  transform: translateY(-1px);
}

/* 禁用按钮样式 */
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--gray-400) !important;
  border-color: var(--gray-400) !important;
  transform: none !important;
}

.btn-primary:disabled:hover,
.btn-secondary:disabled:hover {
  transform: none !important;
}

.file-grid-item {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.file-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-grid-thumbnail {
  width: 100%;
  height: 120px;
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.file-grid-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-grid-info {
  padding: 12px;
}

.file-grid-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-grid-size {
  font-size: 12px;
  color: var(--gray-500);
}

.file-grid-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.file-grid-actions button {
  flex: 1;
  padding: 6px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}

/* 水印工具专用样式 */
.text-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.setting-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.text-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.template-btn {
  padding: 6px 12px;
  background: var(--gray-100);
  border: none;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.template-btn:hover {
  background: var(--primary-mint);
  color: white;
}

.font-controls, .effect-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-row span:first-child {
  min-width: 60px;
  font-size: 14px;
  color: var(--gray-700);
}

.control-row input[type="range"] {
  flex: 1;
}

.control-row select {
  flex: 1;
  padding: 6px 12px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
}

.color-presets {
  display: flex;
  gap: 6px;
  margin-left: 8px;
}

/* 实时预览 */
.watermark-preview {
  margin-bottom: 30px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

.preview-header h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
}

.preview-navigation {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-nav-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-700);
}

.preview-nav-btn:hover:not(:disabled) {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
  transform: translateY(-1px);
}

.preview-nav-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preview-counter {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

.preview-container {
  padding: 24px;
}

.preview-canvas-container {
  position: relative;
  text-align: center;
}

#watermark-preview-canvas {
  max-width: 100%;
  max-height: 400px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.preview-info {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin: 12px 0;
  font-size: 14px;
  color: var(--gray-600);
}

.preview-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.preview-control-btn {
  padding: 6px 12px;
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-700);
}

.preview-control-btn:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.preview-control-btn.download {
  background: var(--success-green);
  color: white;
  border-color: var(--success-green);
}

.preview-control-btn.download:hover {
  background: #059669;
}

/* 开关按钮样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-mint);
}

input:checked + .slider:before {
  transform: translateX(26px);
}

.slider:hover {
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* 拖拽提示 */
.drag-hint {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 10;
  animation: fadeInOut 3s ease-in-out;
  pointer-events: none;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
  20% { opacity: 1; transform: translateX(-50%) translateY(0); }
  80% { opacity: 1; transform: translateX(-50%) translateY(0); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

/* 图片水印上传 */
.image-watermark-upload {
  margin-bottom: 20px;
}

.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.05);
}

.upload-icon {
  font-size: 3rem;
  color: var(--gray-400);
  margin-bottom: 12px;
}

.upload-content p {
  color: var(--gray-700);
  font-weight: 500;
  margin-bottom: 4px;
}

.upload-content small {
  color: var(--gray-500);
}

/* 响应式调整 */
@media (max-width: 1024px) {
  .preset-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .text-settings-grid {
    grid-template-columns: 1fr;
  }
  
  .files-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .mode-tabs, .type-buttons {
    flex-direction: column;
  }
  
  .fit-options {
    flex-direction: column;
  }
  
  .custom-inputs, .ratio-inputs {
    flex-direction: column;
  }
  
  .preset-grid {
    grid-template-columns: 1fr;
  }
  
  .files-grid {
    grid-template-columns: 1fr;
  }
} 

/* 虚线框内的文件预览网格 */
.files-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  padding: 20px;
}

.file-preview-item {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
}

.file-preview-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.file-preview-item.processing {
  border: 2px solid var(--secondary-blue);
}

.file-preview-item.completed {
  border: 2px solid var(--success-green);
}

.file-preview-thumbnail {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
  margin-bottom: 8px;
  position: relative;
}

.file-preview-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-preview-info {
  text-align: center;
  margin-bottom: 8px;
}

.file-preview-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-800);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-size {
  font-size: 11px;
  color: var(--gray-500);
}

.file-preview-progress {
  width: 100%;
  height: 4px;
  background: var(--gray-200);
  border-radius: 2px;
  overflow: hidden;
  margin: 8px 0;
  display: none;
}

.file-preview-progress.active {
  display: block;
}

.file-preview-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.3s ease;
}

.file-preview-status {
  font-size: 11px;
  color: var(--gray-600);
  margin-bottom: 8px;
  min-height: 16px;
}

.file-preview-status.success {
  color: var(--success-green);
  font-weight: 500;
}

.file-preview-status.error {
  color: #EF4444;
  font-weight: 500;
}

.file-preview-actions {
  display: flex;
  gap: 6px;
}

.file-preview-actions button {
  flex: 1;
  padding: 6px 8px;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.file-delete-btn {
  background: var(--gray-200);
  color: var(--gray-600);
}

.file-delete-btn:hover {
  background: #EF4444;
  color: white;
}

.file-download-btn {
  background: var(--success-green);
  color: white;
  display: none;
}

.file-download-btn.active {
  display: block;
}

.file-download-btn:hover {
  background: #059669;
}

/* 压缩比例显示 */
.compression-info {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  font-size: 10px;
  padding: 4px 6px;
  border-radius: 8px;
  font-weight: 600;
  display: none;
}

.compression-info.active {
  display: block;
}

.compression-info.excellent {
  background: var(--success-green);
}

.compression-info.good {
  background: var(--warning-yellow);
  color: var(--gray-800);
}

/* 添加文件按钮（当有文件时显示） */
.add-more-files {
  background: var(--gray-100);
  border: 2px dashed var(--gray-300);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.add-more-files:hover {
  border-color: var(--primary-mint);
  background: rgba(167, 232, 189, 0.1);
}

.add-more-icon {
  font-size: 2rem;
  color: var(--gray-400);
  margin-bottom: 8px;
}

.add-more-text {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .files-preview-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
  
  .file-preview-thumbnail {
    height: 100px;
  }
}

@media (max-width: 480px) {
  .files-preview-grid {
    grid-template-columns: 1fr;
  }
} 

/* 定价页样式 */
.pricing-hero {
  text-align: center;
  margin-bottom: 24px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.pricing-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  position: relative;
}

.pricing-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pricing-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-800);
}

.coming-soon-badge {
  background: var(--gray-200);
  color: var(--gray-700);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
}

.pricing-card-body {
  padding: 16px 20px 20px;
}

.tier {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
}

.tier.free { border-color: var(--gray-200); }
.tier.standard { border-color: var(--secondary-blue); background: rgba(137, 207, 240, 0.06); }
.tier.pro { border-color: var(--accent-purple); background: rgba(203, 166, 247, 0.08); }

.tier-name {
  font-weight: 700;
  color: var(--gray-800);
}

.tier-desc {
  margin-top: 6px;
  font-size: 14px;
  color: var(--gray-600);
}

.tier-price {
  margin-top: 4px;
  font-weight: 700;
  color: var(--gray-800);
}

.pricing-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pricing-actions .btn-primary,
.pricing-actions .btn-secondary,
.pricing-actions a.btn-secondary {
  padding: 10px 16px;
  border-radius: 10px;
  text-align: center;
}

.pricing-note {
  margin-top: 10px;
  font-size: 13px;
  color: var(--gray-500);
}

.pricing-disabled .btn-primary,
.pricing-disabled .btn-secondary,
.pricing-disabled a.btn-secondary {
  pointer-events: none;
  opacity: 0.6;
}

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: 1fr; }
}



/* Pro门槛提示样式 */
.pro-required-banner {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  border: 1px solid #f59e0b;
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
}

.banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.banner-icon {
  font-size: 1.5rem;
  color: #f59e0b;
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-weight: 600;
  color: #92400e;
  margin-bottom: 4px;
}

.banner-reason {
  color: #b45309;
  font-size: 0.875rem;
}

.banner-actions {
  display: flex;
  gap: 8px;
  margin-left: 12px;
}

.banner-actions .btn-primary,
.banner-actions .btn-secondary {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}

/* 消息提示样式 */
.message-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 8px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 400px;
}

.message-toast.show {
  transform: translateX(0);
}

.message-toast.success {
  background: var(--success-green);
}

.message-toast.error {
  background: #ef4444;
}

.message-toast.warning {
  background: var(--warning-yellow);
  color: var(--gray-800);
}

.message-toast.info {
  background: var(--secondary-blue);
}

.toast-icon {
  font-size: 1.125rem;
}

/* 企业版样式 */
.tier.enterprise {
  border-color: var(--warning-yellow);
  background: rgba(251, 191, 36, 0.06);
}

.tier-features {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature {
  font-size: 0.875rem;
  color: var(--gray-600);
}

/* 格式确认弹窗样式 */
.format-confirm-dialog .dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.format-confirm-dialog .dialog-content {
  background: white;
  border-radius: 12px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.format-confirm-dialog h3 {
  margin: 0 0 16px 0;
  color: var(--gray-800);
}

.format-info {
  background: var(--gray-50);
  padding: 16px;
  border-radius: 8px;
  margin: 16px 0;
}

.format-info p {
  margin: 8px 0;
  font-size: 0.875rem;
  color: var(--gray-700);
}

.confirm-text {
  margin: 16px 0;
  font-weight: 500;
  color: var(--gray-800);
}

.dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 20px;
}

.dialog-actions button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dialog-actions .btn-primary {
  background: var(--primary-mint);
  color: var(--gray-800);
}

.dialog-actions .btn-primary:hover {
  background: #8dd3aa;
}

.dialog-actions .btn-secondary {
  background: var(--gray-200);
  color: var(--gray-700);
}

.dialog-actions .btn-secondary:hover {
  background: var(--gray-300);
}

/* 格式选项禁用状态 */
.format-option.disabled {
  opacity: 0.5 !important;
  pointer-events: none !important;
  background: var(--gray-100) !important;
}

.format-option.disabled .format-name {
  color: var(--gray-400) !important;
}

.format-option.disabled .format-desc {
  color: var(--gray-400) !important;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .preview-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    padding: 16px;
  }
  
  .message-toast {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .format-confirm-dialog .dialog-content {
    margin: 20px;
    width: auto;
  }
  
  .dialog-actions {
    flex-direction: column;
  }
  
  .dialog-actions button {
    width: 100%;
  }
}

/* ========== 图片裁剪工具专用样式 ========== */
.crop-container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 裁剪工作区 */
.crop-workspace {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.crop-image-container {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 400px;
  background: var(--gray-50);
  border-radius: 12px;
  overflow: hidden;
}

#crop-source-image {
  max-width: 100%;
  max-height: 500px;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* 裁剪覆盖层 */
.crop-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

/* 裁剪框 */
.crop-box {
  position: absolute;
  border: 2px solid white;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 0 9999px rgba(0, 0, 0, 0.5);
  cursor: move;
  pointer-events: all;
  min-width: 50px;
  min-height: 50px;
}

.crop-border {
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border: 2px solid white;
  pointer-events: none;
}

/* 网格线 */
.grid-line {
  position: absolute;
  background: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.grid-line.horizontal {
  left: 0;
  right: 0;
  height: 1px;
}

.grid-line.vertical {
  top: 0;
  bottom: 0;
  width: 1px;
}

/* 调整手柄 */
.resize-handle {
  position: absolute;
  background: white;
  border: 2px solid var(--primary-mint);
  width: 12px;
  height: 12px;
  border-radius: 2px;
  pointer-events: all;
}

.resize-handle.nw {
  top: -6px;
  left: -6px;
  cursor: nw-resize;
}

.resize-handle.ne {
  top: -6px;
  right: -6px;
  cursor: ne-resize;
}

.resize-handle.sw {
  bottom: -6px;
  left: -6px;
  cursor: sw-resize;
}

.resize-handle.se {
  bottom: -6px;
  right: -6px;
  cursor: se-resize;
}

.resize-handle.n {
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  cursor: n-resize;
}

.resize-handle.s {
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  cursor: s-resize;
}

.resize-handle.w {
  left: -6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: w-resize;
}

.resize-handle.e {
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  cursor: e-resize;
}

/* 遮罩层 */
.crop-mask {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* 比例选择 */
.ratio-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.ratio-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
  text-align: center;
}

.ratio-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.ratio-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-700);
}

.ratio-btn:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.ratio-btn.active {
  background: var(--primary-mint);
  color: white;
  border-color: var(--primary-mint);
  box-shadow: 0 2px 8px rgba(167, 232, 189, 0.3);
}

/* 结果预览 */
.result-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
  text-align: center;
}

.result-section h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 20px;
}

.result-preview {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

#result-canvas {
  max-width: 100%;
  max-height: 400px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
}

.result-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
}

/* 响应式调整 - 裁剪工具 */
@media (max-width: 768px) {
  .crop-image-container {
    min-height: 300px;
  }
  
  #crop-source-image {
    max-height: 350px;
  }
  
  .ratio-buttons {
    justify-content: center;
  }
  
  .ratio-btn {
    flex: 0 0 auto;
    min-width: 60px;
  }
  
  .result-actions {
    flex-direction: column;
  }
  
  .resize-handle {
    width: 16px;
    height: 16px;
  }
  
  .resize-handle.nw,
  .resize-handle.ne,
  .resize-handle.sw,
  .resize-handle.se {
    top: -8px;
    left: -8px;
  }
  
  .resize-handle.ne,
  .resize-handle.se {
    right: -8px;
    left: auto;
  }
  
  .resize-handle.sw,
  .resize-handle.se {
    bottom: -8px;
    top: auto;
  }
}

/* ========== 尺寸适配预览功能样式 ========== */
.preview-section {
  background: white;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  margin-bottom: 30px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.preview-header h3 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--gray-800);
  margin: 0;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.preview-control-btn {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-700);
}

.preview-control-btn:hover:not(:disabled) {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.preview-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.preview-control-btn.close {
  background: #EF4444;
  color: white;
  border-color: #EF4444;
}

.preview-control-btn.close:hover {
  background: #DC2626;
}

.preview-counter {
  font-size: 14px;
  color: var(--gray-600);
  font-weight: 500;
  min-width: 60px;
  text-align: center;
}

/* 单图预览对比 */
.preview-comparison {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}

.preview-item {
  text-align: center;
}

.preview-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 12px;
}

.preview-image-container {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.preview-image-container img,
.preview-image-container canvas {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.preview-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-600);
}

.preview-arrow {
  font-size: 2rem;
  color: var(--primary-mint);
  font-weight: bold;
}

/* 预览设置信息 */
.preview-settings-info {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.setting-item {
  text-align: center;
}

.setting-label {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 4px;
}

.setting-value {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-800);
}

/* 多图网格预览 */
.preview-grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}

.preview-grid-item {
  background: var(--gray-50);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: all 0.3s ease;
}

.preview-grid-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.preview-grid-item .preview-label {
  font-size: 14px;
  margin-bottom: 8px;
}

.preview-grid-item .preview-image-container {
  min-height: 120px;
  padding: 8px;
}

.preview-grid-item img,
.preview-grid-item canvas {
  max-width: 100%;
  max-height: 100px;
  margin-bottom: 8px;
}

.preview-grid-item .preview-info {
  font-size: 11px;
}

/* 预览操作按钮 */
.preview-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding-top: 16px;
  border-top: 1px solid var(--gray-200);
}

/* 加载状态 */
.preview-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--gray-600);
}

.preview-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary-mint);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* 响应式调整 - 预览功能 */
@media (max-width: 1024px) {
  .preview-comparison {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .preview-arrow {
    transform: rotate(90deg);
  }
  
  .preview-settings-info {
    grid-template-columns: 1fr;
  }
  
  .preview-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .preview-header {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  
  .preview-controls {
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .preview-actions {
    flex-direction: column;
  }
  
  .preview-grid-container {
    grid-template-columns: 1fr;
  }
  
  .preview-control-btn {
    font-size: 12px;
    padding: 8px 12px;
  }
} 

/* ========== 格式转换页面预览网格 - 与压缩页面完全一致 ========== */
#convert-preview-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 0;
  max-height: none;
  overflow: visible;
}

@media (max-width: 1280px) { #convert-preview-grid { grid-template-columns: repeat(6, 1fr); } }
@media (max-width: 1024px) { #convert-preview-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 768px)  { #convert-preview-grid { grid-template-columns: repeat(2, 1fr); } }

/* 格式转换预览项样式 - 完全复制压缩页面的file-card样式 */
#convert-preview-grid .preview-item {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 10px;
  transition: all 0.3s ease;
}

#convert-preview-grid .preview-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#convert-preview-grid .preview-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f3f4f6;
  border-radius: 8px;
  margin-bottom: 6px;
  overflow: hidden;
  position: relative;
}

#convert-preview-grid .preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
}

/* 状态标签样式 - 对应压缩页面的compression-badge */
#convert-preview-grid .image-status {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: bold;
}

#convert-preview-grid .image-status.status-pending {
  background: rgba(251, 191, 36, 0.9);
  color: white;
}

#convert-preview-grid .image-status.status-success {
  background: rgba(16, 185, 129, 0.9);
  color: white;
}

/* 文件信息样式 - 对应压缩页面的file-info */
#convert-preview-grid .image-info {
  text-align: center;
  font-size: 12px;
  margin: 4px 0;
}

#convert-preview-grid .image-name {
  font-weight: 500;
  margin-bottom: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#convert-preview-grid .image-size {
  color: #666;
  font-size: 11px;
  margin-bottom: 4px;
}

#convert-preview-grid .format-conversion {
  font-size: 11px;
  color: #666;
  margin: 6px 0;
  min-height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#convert-preview-grid .current-format,
#convert-preview-grid .target-format {
  background: rgba(167, 232, 189, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

/* 操作按钮样式 - 对应压缩页面的file-actions */
#convert-preview-grid .preview-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

#convert-preview-grid .action-btn {
  flex: 1;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#convert-preview-grid .delete-btn {
  background: #EF4444;
  color: white;
}

#convert-preview-grid .delete-btn:hover {
  background: #DC2626;
}

#convert-preview-grid .download-btn {
  background: #10B981;
  color: white;
}

#convert-preview-grid .download-btn:hover {
  background: #059669;
}

/* 隐藏原有的image-overlay，使用压缩页面风格 */
#convert-preview-grid .image-overlay {
  display: none;
}

/* 升级弹窗样式补充 */
.upgrade-note {
  margin-top: 16px;
  padding: 12px;
  background: rgba(167, 232, 189, 0.1);
  border-radius: 8px;
  border-left: 4px solid var(--primary-mint);
}

.upgrade-note small {
  color: var(--gray-600);
  font-style: italic;
}

/* 加载动画样式 */
.loading-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  grid-column: 1 / -1;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #4ECDC4;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-placeholder p {
  color: var(--gray-500);
  font-size: 14px;
  margin: 0;
}