/* ============================================
   壹标网主题系统 - Theme System
   支持10种设计风格切换
   ============================================ */

/* ===== 默认主题变量（所有主题的基础） ===== */
:root {
  /* 背景 */
  --bg: #f6f8f7;
  --bg-secondary: #eef2f0;
  --bg-card: #ffffff;
  --bg-hover: #eef2f0;
  
  /* 文字 */
  --text: #191e1d;
  --text-secondary: #58615e;
  --text-tertiary: #97a09c;
  
  /* 边框 */
  --border: #e9edeb;
  --border-light: #f0f3f1;
  
  /* 主题色 */
  --accent: #0e7c6e;
  --accent-secondary: #2f9e8f;
  --accent-gradient: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 100%);
  
  /* 功能色 */
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  /* 阴影 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.2);
  --shadow-accent: 0 4px 16px rgba(14, 124, 110, 0.26);
  
  /* 圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  /* 导航栏 */
  --nav-bg: rgba(246, 248, 247, 0.85);
  --nav-border: #e9edeb;
  
  /* 按钮 */
  --btn-bg: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 100%);
  --btn-text: #ffffff;
  --btn-hover-opacity: 0.9;
}

/* ===== 主题1：深色科技风（默认） ===== */
body.theme-dark {
  --bg: #f6f8f7;
  --bg-secondary: #eef2f0;
  --bg-card: #ffffff;
  --bg-hover: #eef2f0;
  --text: #191e1d;
  --text-secondary: #58615e;
  --text-tertiary: #97a09c;
  --border: #e9edeb;
  --border-light: #f0f3f1;
  --accent: #0e7c6e;
  --accent-secondary: #2f9e8f;
  --accent-gradient: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 100%);
  --nav-bg: rgba(246, 248, 247, 0.85);
  --nav-border: #e9edeb;
  --btn-bg: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 100%);
  --shadow-accent: 0 4px 16px rgba(14, 124, 110, 0.26);
}

/* ===== 主题2：极简白科技风 ===== */
body.theme-minimal {
  --bg: #fafbfc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f7;
  --text: #191e1d;
  --text-secondary: #4a5568;
  --text-tertiary: #97a09c;
  --border: #e8eaed;
  --border-light: #f0f0f3;
  --accent: #0099cc;
  --accent-secondary: #0077aa;
  --accent-gradient: linear-gradient(135deg, #0099cc 0%, #0077aa 100%);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: #e8eaed;
  --btn-bg: #191e1d;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 4px 16px rgba(0, 153, 204, 0.2);
}

/* ===== 主题3：渐变流光风 ===== */
body.theme-gradient {
  --bg: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 50%, #f093fb 100%);
  --bg-secondary: rgba(255, 255, 255, 0.15);
  --bg-card: rgba(255, 255, 255, 0.2);
  --bg-hover: rgba(255, 255, 255, 0.25);
  --text: #191e1d;
  --text-secondary: rgba(255, 255, 255, 0.9);
  --text-tertiary: rgba(255, 255, 255, 0.7);
  --border: rgba(255, 255, 255, 0.3);
  --border-light: rgba(255, 255, 255, 0.2);
  --accent: #ffd700;
  --accent-secondary: #ff8c00;
  --accent-gradient: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  --nav-bg: rgba(255, 255, 255, 0.15);
  --nav-border: rgba(255, 255, 255, 0.25);
  --btn-bg: linear-gradient(135deg, #ffd700 0%, #ff8c00 100%);
  --shadow-accent: 0 4px 16px rgba(255, 215, 0, 0.4);
}

/* ===== 主题4：黑金高端风 ===== */
body.theme-luxury {
  --bg: #0a0a0a;
  --bg-secondary: rgba(212, 175, 55, 0.03);
  --bg-card: rgba(212, 175, 55, 0.05);
  --bg-hover: rgba(212, 175, 55, 0.08);
  --text: #f5f5f5;
  --text-secondary: #b0b0b0;
  --text-tertiary: #808080;
  --border: rgba(212, 175, 55, 0.3);
  --border-light: rgba(212, 175, 55, 0.15);
  --accent: #d4af37;
  --accent-secondary: #f4e4bc;
  --accent-gradient: linear-gradient(135deg, #d4af37 0%, #f4e4bc 100%);
  --nav-bg: rgba(10, 10, 10, 0.95);
  --nav-border: rgba(212, 175, 55, 0.3);
  --btn-bg: linear-gradient(135deg, #d4af37 0%, #f4e4bc 100%);
  --btn-text: #0a0a0a;
  --shadow-accent: 0 4px 16px rgba(212, 175, 55, 0.3);
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-xl: 8px;
}

/* ===== 主题5：蓝白专业风 ===== */
body.theme-professional {
  --bg: #f5f7fa;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f0f7ff;
  --text: #191e1d;
  --text-secondary: #58615e;
  --text-tertiary: #8c98a8;
  --border: #e7f3f0;
  --border-light: #e8f0fe;
  --accent: #0a665a;
  --accent-secondary: #0e7c6e;
  --accent-gradient: linear-gradient(135deg, #0a665a 0%, #0e7c6e 100%);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: #e7f3f0;
  --btn-bg: linear-gradient(135deg, #0a665a 0%, #0e7c6e 100%);
  --shadow-sm: 0 2px 8px rgba(0, 102, 255, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 102, 255, 0.08);
  --shadow-lg: 0 8px 32px rgba(0, 102, 255, 0.1);
  --shadow-accent: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* ===== 主题6：豆包风·浅紫柔渐变 ===== */
body.theme-doubao {
  --bg: linear-gradient(180deg, #f8f7ff 0%, #f0efff 50%, #f8f7ff 100%);
  --bg-secondary: rgba(255, 255, 255, 0.7);
  --bg-card: rgba(255, 255, 255, 0.8);
  --bg-hover: rgba(139, 92, 246, 0.06);
  --text: #1f2329;
  --text-secondary: #86909c;
  --text-tertiary: #a9aeb8;
  --border: rgba(139, 92, 246, 0.12);
  --border-light: rgba(139, 92, 246, 0.08);
  --accent: #2f9e8f;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  --nav-bg: rgba(255, 255, 255, 0.85);
  --nav-border: rgba(124, 58, 237, 0.1);
  --btn-bg: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
  --shadow-sm: 0 2px 12px rgba(139, 92, 246, 0.06);
  --shadow-md: 0 4px 16px rgba(139, 92, 246, 0.08);
  --shadow-lg: 0 8px 32px rgba(139, 92, 246, 0.1);
  --shadow-accent: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* ===== 主题7：文心一言风·浅蓝专业 ===== */
body.theme-wenxin {
  --bg: linear-gradient(180deg, #f0f7ff 0%, #e8f0fe 50%, #f0f7ff 100%);
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #e6f0ff;
  --text: #191e1d;
  --text-secondary: #58615e;
  --text-tertiary: #8c98a8;
  --border: #e7f3f0;
  --border-light: #e8f0fe;
  --accent: #0a665a;
  --accent-secondary: #0e7c6e;
  --accent-gradient: linear-gradient(135deg, #0a665a 0%, #0e7c6e 100%);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: #e7f3f0;
  --btn-bg: linear-gradient(135deg, #0a665a 0%, #0e7c6e 100%);
  --shadow-accent: 0 4px 12px rgba(0, 102, 255, 0.3);
}

/* ===== 主题8：通义千问风·浅橙温暖 ===== */
body.theme-tongyi {
  --bg: linear-gradient(180deg, #fff8f0 0%, #fff3e6 50%, #fff8f0 100%);
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #fff3e6;
  --text: #2c2c2c;
  --text-secondary: #8c8c8c;
  --text-tertiary: #bfbfbf;
  --border: #ffe0b3;
  --border-light: #fff3e6;
  --accent: #ff6a00;
  --accent-secondary: #ff9500;
  --accent-gradient: linear-gradient(135deg, #ff6a00 0%, #ff9500 100%);
  --nav-bg: rgba(255, 255, 255, 0.9);
  --nav-border: #ffe0b3;
  --btn-bg: linear-gradient(135deg, #ff6a00 0%, #ff9500 100%);
  --shadow-accent: 0 4px 12px rgba(255, 106, 0, 0.3);
}

/* ===== 主题9：精致AI风·渐变边框发光 ===== */
body.theme-premium {
  --bg: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f1f5f9;
  --text: #0f172a;
  --text-secondary: #64748b;
  --text-tertiary: #94a3b8;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --accent: #0e7c6e;
  --accent-secondary: #2f9e8f;
  --accent-gradient: linear-gradient(135deg, #0e7c6e 0%, #2f9e8f 100%);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-border: rgba(99, 102, 241, 0.1);
  --btn-bg: linear-gradient(135deg, #0e7c6e 0%, #818cf8 100%);
  --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.06);
  --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.08);
  --shadow-lg: 0 8px 32px rgba(99, 102, 241, 0.1);
  --shadow-accent: 0 4px 16px rgba(99, 102, 241, 0.35);
}

/* ===== 主题10：极简高级风·Apple Linear ===== */
body.theme-apple {
  --bg: #ffffff;
  --bg-secondary: #fafafa;
  --bg-card: #ffffff;
  --bg-hover: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --text-tertiary: #86868b;
  --border: #d2d2d7;
  --border-light: #e8e8ed;
  --accent: #0071e3;
  --accent-secondary: #0077ed;
  --accent-gradient: linear-gradient(135deg, #0071e3 0%, #0077ed 100%);
  --nav-bg: rgba(255, 255, 255, 0.8);
  --nav-border: #e8e8ed;
  --btn-bg: #1d1d1f;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-accent: 0 4px 12px rgba(0, 113, 227, 0.2);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

/* ===== 主题选择器样式 ===== */
.theme-switcher {
  position: relative;
  display: inline-block;
}

.theme-switcher-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.theme-switcher-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
}

.theme-switcher-btn .theme-icon {
  font-size: 16px;
}

.theme-switcher-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 240px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1000;
  display: none;
  animation: dropdownFadeIn 0.2s ease;
}

.theme-switcher-dropdown.show {
  display: block;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.theme-dropdown-header {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px;
}

.theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.theme-option:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.theme-option.active {
  background: var(--bg-hover);
  color: var(--accent);
  font-weight: 600;
}

.theme-option.active::after {
  content: '✓';
  margin-left: auto;
  font-weight: 700;
}

.theme-color-preview {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

/* 深色主题下的下拉菜单适配 */
body.theme-dark .theme-switcher-dropdown,
body.theme-luxury .theme-switcher-dropdown {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
}

/* 渐变主题下的下拉菜单适配 */
body.theme-gradient .theme-switcher-dropdown {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
}
