/* ============================================================
   呢喃的爱 (ninan.love) - 全局样式
   温馨亲子风设计系统
   ============================================================ */

:root {
  /* 色彩体系 */
  --primary: #FF7EB3;
  --primary-dark: #E8609A;
  --primary-light: #FFB8D4;
  --secondary: #7EB3FF;
  --secondary-dark: #5A94E0;
  --accent: #FFB347;
  --accent-dark: #E89A30;
  --success: #5ED49C;
  --warning: #FFD166;
  --danger: #FF6B6B;
  --info: #7EB3FF;

  /* 背景 */
  --bg: #FFF5F9;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-overlay: rgba(0, 0, 0, 0.5);

  /* 文字 */
  --text: #4A4A4A;
  --text-dark: #2D2D2D;
  --text-secondary: #9B9B9B;
  --text-light: #C0C0C0;
  --text-white: #FFFFFF;

  /* 边框 */
  --border: #F0E0E8;
  --border-light: #F8F0F4;

  /* 渐变 */
  --gradient: linear-gradient(135deg, #FF7EB3, #B4A0FF);
  --gradient-warm: linear-gradient(135deg, #FF7EB3, #FFB347);
  --gradient-cool: linear-gradient(135deg, #7EB3FF, #B4A0FF);
  --gradient-hero: linear-gradient(135deg, #FF7EB3 0%, #C471ED 50%, #B4A0FF 100%);

  /* 阴影 */
  --shadow: 0 4px 20px rgba(255, 126, 179, 0.15);
  --shadow-hover: 0 8px 30px rgba(255, 126, 179, 0.25);
  --shadow-card: 0 2px 12px rgba(255, 126, 179, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);

  /* 圆角 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* 间距 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;

  /* 字体 */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 13px;
  --font-size-base: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 22px;
  --font-size-2xl: 28px;
  --font-size-3xl: 36px;

  /* 导航栏高度 */
  --navbar-height: 64px;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; display: block; }

input, textarea, select, button { font-family: inherit; font-size: inherit; }

/* ===== 导航栏 ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 var(--space-xl);
  transition: box-shadow 0.3s;
}

.navbar.scrolled { box-shadow: var(--shadow-sm); }

.navbar-inner {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--primary-dark);
  text-decoration: none;
}

.navbar-brand .brand-icon {
  font-size: 28px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.navbar-nav a {
  color: var(--text);
  font-size: var(--font-size-base);
  font-weight: 500;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
  background: rgba(255, 126, 179, 0.08);
}

.navbar-user {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.navbar-user .nickname {
  font-weight: 600;
  color: var(--text-dark);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text);
  padding: var(--space-sm);
}

/* ===== 登录状态闪烁修复 ===== */
.navbar:not(.js-ready) #nav-user,
.navbar:not(.js-ready) #nav-login {
  display: none !important;
}

/* ===== 按钮 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-sm { padding: 6px 16px; font-size: var(--font-size-sm); }
.btn-lg { padding: 14px 36px; font-size: var(--font-size-md); }

.btn-primary {
  background: var(--gradient);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(255, 126, 179, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 126, 179, 0.4);
  color: var(--text-white);
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-secondary:hover {
  background: var(--primary);
  color: var(--text-white);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #FF9A44);
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(255, 179, 71, 0.3);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 179, 71, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--primary); background: rgba(255,126,179,0.08); }

.btn-danger {
  background: var(--danger);
  color: var(--text-white);
}
.btn-danger:hover { background: #e55555; }

.btn-success {
  background: var(--success);
  color: var(--text-white);
}
.btn-success:hover { background: #4cc08a; }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== 卡片 ===== */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: all 0.3s;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.card-body { padding: var(--space-lg); }

.card-cover {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  background: var(--border-light);
}

.card-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== 标签/徽章 ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.6;
  white-space: nowrap;
}

.badge-primary { background: rgba(255,126,179,0.15); color: var(--primary-dark); }
.badge-secondary { background: rgba(126,179,255,0.15); color: var(--secondary-dark); }
.badge-accent { background: rgba(255,179,71,0.15); color: var(--accent-dark); }
.badge-success { background: rgba(94,212,156,0.15); color: #3aad78; }
.badge-warning { background: rgba(255,209,102,0.2); color: #cc9a00; }
.badge-danger { background: rgba(255,107,107,0.15); color: #e55555; }
.badge-member {
  background: var(--gradient);
  color: var(--text-white);
  padding: 2px 12px;
}

/* ===== 模态框 ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-overlay);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s;
}

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

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s;
}

.modal-header {
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.modal-title {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--text-dark);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 4px;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-body { padding: var(--space-lg); }

.modal-footer {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

/* ===== 表单 ===== */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-base);
  color: var(--text);
  background: var(--bg-white);
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 126, 179, 0.1);
}

.form-textarea { resize: vertical; min-height: 100px; }

.form-hint {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

/* ===== Toast 提示 ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.toast {
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  font-weight: 500;
  box-shadow: var(--shadow);
  animation: slideInRight 0.3s;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  max-width: 360px;
}

.toast-success { background: #e8faf0; color: #2d8f5e; border-left: 4px solid var(--success); }
.toast-error { background: #fff0f0; color: #cc3333; border-left: 4px solid var(--danger); }
.toast-info { background: #f0f5ff; color: #3366cc; border-left: 4px solid var(--info); }
.toast-warning { background: #fffbe6; color: #b38f00; border-left: 4px solid var(--warning); }

/* ===== 布局容器 ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.page-content {
  padding-top: calc(var(--navbar-height) + var(--space-xl));
  min-height: 100vh;
}

.page-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-lg);
}

.section-title {
  font-size: var(--font-size-xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-md);
}

/* ===== 网格 ===== */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== 空状态 ===== */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.empty-state .empty-icon {
  font-size: 64px;
  margin-bottom: var(--space-lg);
  opacity: 0.5;
}

.empty-state .empty-text {
  font-size: var(--font-size-md);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

/* ===== 进度条 ===== */
.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* ===== 音频播放器 ===== */
.audio-player {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-md) var(--space-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.player-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--gradient);
  color: var(--text-white);
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.player-btn:hover { transform: scale(1.1); }

.player-info {
  flex: 1;
  min-width: 0;
}

.player-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-progress {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-top: 4px;
  cursor: pointer;
}

.player-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  transition: width 0.1s;
}

.player-time {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  flex-shrink: 0;
}

/* ===== 状态指示 ===== */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: var(--space-xs);
}

.status-dot.pending { background: var(--warning); }
.status-dot.processing { background: var(--info); animation: pulse 1.5s infinite; }
.status-dot.completed { background: var(--success); }
.status-dot.failed { background: var(--danger); }

/* ===== 选项卡 ===== */
.tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 2px solid var(--border-light);
  margin-bottom: var(--space-lg);
  overflow-x: auto;
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  border: none;
  background: none;
  font-size: var(--font-size-base);
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.2s;
}

.tab:hover { color: var(--primary); }

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* ===== 动画 ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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

.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ===== 认证页面 ===== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: var(--space-lg);
}

.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.auth-header h1 {
  font-size: var(--font-size-2xl);
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: var(--text-secondary);
  margin-top: var(--space-sm);
}

.auth-form .form-group { margin-bottom: var(--space-md); }

.auth-footer {
  text-align: center;
  margin-top: var(--space-lg);
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ===== Hero区域 ===== */
.hero {
  background: var(--gradient-hero);
  color: var(--text-white);
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 40px;
  background: var(--bg);
  border-radius: 50% 50% 0 0;
}

.hero h1 {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero p {
  font-size: var(--font-size-lg);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.hero-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero .btn { font-size: var(--font-size-md); }

/* ===== 三步流程 ===== */
.steps {
  padding: var(--space-2xl) 0;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  text-align: center;
}

.step-item {
  position: relative;
}

.step-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto var(--space-md);
  box-shadow: var(--shadow);
}

.step-number {
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--text-white);
  background: var(--primary-dark);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(20px);
}

.step-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.step-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ===== 特性区域 ===== */
.features {
  padding: var(--space-2xl) 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

.feature-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  display: flex;
  gap: var(--space-md);
  transition: all 0.3s;
  min-height: 100px;
  align-items: flex-start;
}

.feature-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 36px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-icon img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.feature-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: var(--space-xs);
}

.feature-desc {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ===== 故事库页面 ===== */
.stories-header {
  padding: calc(var(--navbar-height) + var(--space-xl)) 0 var(--space-lg);
  background: var(--gradient-hero);
  color: var(--text-white);
  text-align: center;
}

.stories-header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.stories-header p {
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

.stories-search {
  display: flex;
  gap: var(--space-sm);
  max-width: 500px;
  margin: 0 auto;
}

.stories-search input {
  flex: 1;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-full);
  font-size: var(--font-size-base);
  outline: none;
}

.stories-categories {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md) 0;
  flex-wrap: wrap;
}

.category-tag {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border);
  background: var(--bg-white);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
}

.category-tag:hover,
.category-tag.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-white);
}

.story-card .card-cover {
  aspect-ratio: 3/2;
}

.story-card .story-meta {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  margin: var(--space-sm) 0;
  flex-wrap: wrap;
}

.story-card .story-duration {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
}

.story-card .story-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

/* ===== 声音上传页面 ===== */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-2xl);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--bg-white);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary);
  background: rgba(255, 126, 179, 0.05);
}

.upload-zone .upload-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.6;
}

.upload-zone .upload-text {
  font-size: var(--font-size-md);
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.upload-zone .upload-hint {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.record-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-xl);
  box-shadow: var(--shadow-card);
  text-align: center;
  margin: var(--space-lg) 0;
}

.record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid var(--primary);
  background: var(--bg-white);
  color: var(--primary);
  font-size: 32px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-md);
}

.record-btn.recording {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--text-white);
  animation: pulse 1s infinite;
}

.record-timer {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: var(--space-sm);
}

.detection-text {
  background: rgba(255, 126, 179, 0.08);
  border-radius: var(--radius-sm);
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-md);
  line-height: 1.8;
  color: var(--text-dark);
  border-left: 4px solid var(--primary);
  margin: var(--space-lg) 0;
}

.sample-card {
  background: var(--bg-white);
  border-radius: var(--radius-sm);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-sm);
}

/* ===== 订单中心 ===== */
.order-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-md);
  display: flex;
  gap: var(--space-lg);
  align-items: flex-start;
}

.order-cover {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--border-light);
}

.order-info {
  flex: 1;
  min-width: 0;
}

.order-name {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-dark);
}

.order-story-title {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
  margin: var(--space-xs) 0;
}

.order-status {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-sm) 0;
}

.order-time {
  font-size: var(--font-size-xs);
  color: var(--text-light);
}

.order-actions {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ===== 专辑页面 ===== */
.album-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}

.album-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.album-card .album-cover {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: white;
}

.album-card .album-info {
  padding: var(--space-md);
}

.album-card .album-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--text-dark);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.album-card .album-meta {
  font-size: var(--font-size-xs);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== 个人中心 ===== */
.profile-header {
  background: var(--gradient-hero);
  color: var(--text-white);
  padding: calc(var(--navbar-height) + var(--space-xl)) 0 var(--space-xl);
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto var(--space-md);
  border: 3px solid rgba(255,255,255,0.6);
}

.profile-nickname {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.profile-stat {
  text-align: center;
}

.profile-stat .stat-value {
  font-size: var(--font-size-xl);
  font-weight: 700;
}

.profile-stat .stat-label {
  font-size: var(--font-size-xs);
  opacity: 0.8;
}

.quota-section {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--space-lg);
}

.quota-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.quota-text {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* ===== 管理后台 ===== */
.admin-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 0;
}

.admin-sidebar {
  width: 240px;
  background: var(--text-dark);
  color: var(--text-white);
  padding: var(--space-lg) 0;
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.admin-sidebar .admin-brand {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary-light);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--space-md);
}

.admin-nav { list-style: none; }

.admin-nav li a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  color: rgba(255,255,255,0.7);
  transition: all 0.2s;
  font-size: var(--font-size-sm);
}

.admin-nav li a:hover,
.admin-nav li a.active {
  background: rgba(255,255,255,0.1);
  color: var(--text-white);
}

.admin-main {
  flex: 1;
  margin-left: 240px;
  padding: var(--space-xl);
  background: #f5f7fa;
  min-height: 100vh;
}

.admin-header {
  margin-bottom: var(--space-xl);
}

.admin-header h1 {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-dark);
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.stat-card {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.stat-card .stat-icon {
  font-size: 24px;
  margin-bottom: var(--space-sm);
}

.stat-card .stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-dark);
}

.stat-card .stat-label {
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

/* 后台表格 */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.admin-table th {
  background: #f8f9fc;
  padding: var(--space-md) var(--space-md);
  text-align: left;
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 2px solid var(--border-light);
}

.admin-table td {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border-light);
  font-size: var(--font-size-sm);
  color: var(--text);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }

.admin-table tr:hover td { background: rgba(255,126,179,0.03); }

.admin-table .audio-mini-player {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.admin-table .audio-mini-player button {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: white;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.admin-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.admin-toolbar .search-box {
  display: flex;
  gap: var(--space-sm);
}

.admin-toolbar .search-box input {
  padding: 8px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  outline: none;
  width: 250px;
}

.admin-toolbar .search-box input:focus {
  border-color: var(--primary);
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .navbar { padding: 0 var(--space-md); }
  .navbar-nav { display: none; }
  .mobile-menu-btn { display: block; }

  .navbar-nav.show {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: white;
    padding: var(--space-md);
    box-shadow: var(--shadow);
    gap: var(--space-sm);
  }

  .container { padding: 0 var(--space-md); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: var(--font-size-2xl); }

  .order-card { flex-direction: column; gap: var(--space-md); }
  .order-actions { width: 100%; }

  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat-cards { grid-template-columns: 1fr; }
  .hero { padding: 80px 0 40px; }
  .hero h1 { font-size: var(--font-size-xl); }
}
