/* ============================================
   Self-Growth 工作台 - 奶蓝色主题样式
   ============================================ */

:root {
  /* 奶蓝色主题色 */
  --primary-blue: #A8D8EA;
  --primary-light: #C5E8F4;
  --primary-dark: #7BBDD4;
  --primary-pale: #E8F4F8;
  --cream-white: #F0F8FF;
  --soft-pink: #FFE4EC;
  --accent-yellow: #FFF3CD;
  --accent-mint: #D4EDDA;
  --text-dark: #2D3748;
  --text-medium: #4A5568;
  --text-light: #718096;
  --border-color: #B8DDE8;
  --shadow-soft: 0 2px 12px rgba(168, 216, 234, 0.25);
  --shadow-hover: 0 4px 20px rgba(168, 216, 234, 0.35);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  /* 字体 */
  --font-cn: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-en: 'Quicksand', 'Dancing Script', cursive;
  --font-display: 'Dancing Script', cursive;

  /* 导航 */
  --sidebar-width: 240px;
  --sidebar-collapsed: 70px;
}

/* ========== 全局重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-cn);
  background: linear-gradient(135deg, var(--cream-white) 0%, var(--primary-pale) 50%, #E3F2FD 100%);
  color: var(--text-dark);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ========== 喜羊羊装饰背景 ========== */
.goat-decoration {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  font-size: 80px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.goat-deco-1 { top: 10%; right: 5%; animation: floatGoat 6s ease-in-out infinite; }
.goat-deco-2 { bottom: 15%; left: 3%; animation: floatGoat 8s ease-in-out infinite 1s; font-size: 60px; }
.goat-deco-3 { top: 45%; right: 8%; animation: floatGoat 7s ease-in-out infinite 2s; font-size: 50px; }

@keyframes floatGoat {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-15px) rotate(3deg); }
}

/* ========== 左侧导航栏 ========== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary-blue) 40%, var(--primary-dark) 100%);
  border-right: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 24px rgba(123, 189, 212, 0.2);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.4); border-radius: 4px; }

.sidebar-header {
  padding: 28px 20px 20px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.logo-area {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 4px;
}

.logo-icon {
  font-size: 32px;
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.logo-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
  letter-spacing: 1px;
}

.logo-subtitle {
  font-family: var(--font-en);
  font-size: 11px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.nav-section {
  flex: 1;
  padding: 16px 12px;
}

/* 导航项 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
  font-weight: 500;
  font-size: 14.5px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: rgba(255,255,255,0.2);
  transition: width 0.3s ease;
  border-radius: var(--radius-sm);
}

.nav-item:hover::before {
  width: 100%;
}

.nav-item:hover {
  transform: translateX(4px);
}

.nav-item.active {
  background: rgba(255,255,255,0.3);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(4px);
}

.nav-item i:first-child {
  width: 20px;
  text-align: center;
  font-size: 16px;
  position: relative;
  z-index: 1;
}

.nav-item span {
  position: relative;
  z-index: 1;
  flex: 1;
}

.toggle-arrow {
  font-size: 11px !important;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1 !important;
}

.nav-group.open .toggle-arrow {
  transform: rotate(180deg);
}

/* 子导航 */
.nav-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 14px;
}

.nav-group.open .nav-children {
  max-height: 500px;
}

.nav-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  color: rgba(255,255,255,0.88);
  font-size: 13px;
  margin: 2px 0;
}

.nav-child:hover {
  background: rgba(255,255,255,0.18);
  color: white;
  transform: translateX(4px);
}

.nav-child.active {
  background: rgba(255,255,255,0.32);
  color: white;
  font-weight: 500;
}

.nav-child i {
  width: 16px;
  text-align: center;
  font-size: 13px;
}

.sidebar-footer {
  padding: 16px 20px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.2);
}

.footer-text {
  font-family: var(--font-en);
  font-size: 11px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 1px;
}

/* ========== 主内容区 ========== */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  padding: 30px 36px;
  position: relative;
  z-index: 1;
}

/* ========== 页面通用组件 ========== */

/* 页面标题区 */
.page-header {
  margin-bottom: 28px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.page-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  gap: 12px;
}

.page-title .title-icon {
  font-size: 34px;
}

.page-subtitle {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--primary-dark);
  margin-top: 4px;
  font-style: italic;
}

/* 每日激励语卡片 */
.daily-quote {
  background: linear-gradient(135deg, var(--primary-pale) 0%, #E0F2FE 50%, var(--soft-pink) 100%);
  border-radius: var(--radius-lg);
  padding: 20px 28px;
  margin-bottom: 28px;
  border: 2px dashed var(--border-color);
  position: relative;
  overflow: hidden;
}

.daily-quote::before {
  content: '🐑';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 48px;
  opacity: 0.15;
}

.quote-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-medium);
  font-weight: 500;
  position: relative;
  z-index: 1;
}

.quote-en {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--primary-dark);
  margin-top: 8px;
  font-style: italic;
  position: relative;
  z-index: 1;
}

/* 卡片容器 */
.card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(168,216,234,0.06) 0%, transparent 70%);
  pointer-events: none;
}

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

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-title .icon {
  font-size: 20px;
}

/* 按钮样式 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-cn);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  box-shadow: 0 3px 12px rgba(123, 189, 212, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(123, 189, 212, 0.45);
}

.btn-secondary {
  background: var(--primary-pale);
  color: var(--primary-dark);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--primary-light);
}

.btn-success {
  background: linear-gradient(135deg, #81C995, #5AB87B);
  color: white;
}

.btn-danger {
  background: linear-gradient(135deg, #F5A3A3, #E57373);
  color: white;
}

.btn-small {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
}

.btn-round {
  border-radius: 50px;
}

/* 输入框 */
.input-group {
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-medium);
  margin-bottom: 6px;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-cn);
  font-size: 14px;
  color: var(--text-dark);
  background: white;
  transition: all 0.3s ease;
  outline: none;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(168, 216, 234, 0.2);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* 网格布局 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 标签/徽章 */
.tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 500;
}

.tag-blue { background: var(--primary-pale); color: var(--primary-dark); }
.tag-green { background: var(--accent-mint); color: #2E7D32; }
.tag-yellow { background: var(--accent-yellow); color: #856404; }
.tag-red { background: #FFEBEE; color: #C62828; }
.tag-pink { background: var(--soft-pink); color: #AD1457; }

/* 进度条 */
.progress-bar {
  height: 10px;
  background: var(--primary-pale);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-blue), var(--primary-dark));
  border-radius: 10px;
  transition: width 0.5s ease;
}

/* 视频播放器区域 */
.video-area {
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 300px;
}

.video-area video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-placeholder {
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.video-placeholder i {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

/* 文件上传区域 */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--primary-pale);
}

.upload-zone:hover {
  border-color: var(--primary-blue);
  background: var(--primary-light);
}

.upload-zone i {
  font-size: 36px;
  color: var(--primary-dark);
  margin-bottom: 10px;
  display: block;
}

.upload-zone p {
  color: var(--text-light);
  font-size: 14px;
}

/* ========== AI 对话浮窗 ========== */
.ai-chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.ai-chat-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(123, 189, 212, 0.4);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(123, 189, 212, 0.5);
}

.ai-chat-panel {
  position: absolute;
  bottom: 68px;
  right: 0;
  width: 380px;
  height: 520px;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--border-color);
}

.ai-chat-panel.show {
  display: flex;
  animation: slideUp 0.3s ease;
}

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

.ai-chat-header {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 15px;
}

.ai-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.ai-close-btn:hover { opacity: 1; }

.ai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  display: flex;
  gap: 10px;
  max-width: 90%;
}

.ai-message.user {
  flex-direction: row-reverse;
  align-self: flex-end;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  background: var(--primary-pale);
}

.ai-msg-text {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.ai-message.bot .ai-msg-text {
  background: var(--primary-pale);
  color: var(--text-dark);
  border-bottom-left-radius: 4px;
}

.ai-message.user .ai-msg-text {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  border-bottom-right-radius: 4px;
}

.ai-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 14px;
  border-top: 1px solid var(--border-color);
  background: var(--cream-white);
}

.ai-input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border-color);
  border-radius: 50px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s;
}

.ai-input:focus { border-color: var(--primary-blue); }

.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.ai-send-btn:hover { transform: scale(1.05); }

/* ========== 主页特定样式 ========== */
.home-welcome {
  text-align: center;
  padding: 40px 20px;
}

.home-welcome h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.home-welcome .welcome-en {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--primary-dark);
  font-style: italic;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin: 30px 0;
}

.stat-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 22px 16px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.stat-card .stat-icon {
  font-size: 36px;
  margin-bottom: 10px;
  display: block;
}

.stat-card .stat-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.stat-card .stat-desc {
  font-size: 12px;
  color: var(--text-light);
}

/* ========== 健身页面特定样式 ========== */
.exercise-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.exercise-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  transition: all 0.3s ease;
  cursor: pointer;
}

.exercise-item:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-hover);
}

.exercise-item .ex-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--primary-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.exercise-item .ex-info {
  flex: 1;
}

.exercise-item .ex-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
}

.exercise-item .ex-detail {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 2px;
}

.exercise-item .ex-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.exercise-item.completed .ex-check {
  background: linear-gradient(135deg, #81C995, #5AB87B);
  border-color: transparent;
  color: white;
}

.exercise-item.completed .ex-name {
  text-decoration: line-through;
  color: var(--text-light);
}

/* ========== 英语单词卡片 ========== */
.word-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.word-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 6px;
  height: 100%;
  background: linear-gradient(180deg, var(--primary-blue), var(--primary-dark));
}

.word-main {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.word-spelling {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  font-family: var(--font-en);
}

.word-phonetic {
  font-size: 16px;
  color: var(--primary-dark);
  font-family: var(--font-en);
}

.word-pos {
  font-size: 14px;
  color: white;
  background: var(--primary-blue);
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 500;
}

.word-meaning {
  font-size: 18px;
  color: var(--text-medium);
  margin-bottom: 14px;
  line-height: 1.6;
}

.word-section {
  margin: 12px 0;
  padding-left: 12px;
  border-left: 3px solid var(--primary-pale);
}

.word-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.word-section-content {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.8;
}

.word-example {
  font-style: italic;
  color: var(--text-light);
  background: var(--primary-pale);
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 6px;
}

.word-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--primary-pale);
}

.word-counter {
  font-size: 14px;
  color: var(--text-light);
}

.word-actions {
  display: flex;
  gap: 10px;
}

/* 速刷模式 */
.speed-card {
  perspective: 1000px;
  height: 320px;
  cursor: pointer;
}

.speed-card-inner {
  width: 100%;
  height: 100%;
  transition: transform 0.6s;
  transform-style: preserve-3d;
  position: relative;
}

.speed-card.flipped .speed-card-inner {
  transform: rotateY(180deg);
}

.speed-front, .speed-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
}

.speed-front {
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
  color: white;
}

.speed-back {
  background: white;
  transform: rotateY(180deg);
}

.speed-word {
  font-size: 42px;
  font-weight: 700;
  font-family: var(--font-en);
}

.speed-hint {
  font-size: 14px;
  opacity: 0.8;
  margin-top: 8px;
}

/* ========== 口语素材卡片 ========== */
.material-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  transition: all 0.3s ease;
}

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

.material-thumbnail {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--primary-pale), var(--primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  position: relative;
}

.material-info {
  padding: 16px 20px;
}

.material-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.material-meta {
  font-size: 13px;
  color: var(--text-light);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ========== 待办事项 ========== */
.todo-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(168, 216, 234, 0.2);
  border-left: 4px solid var(--primary-blue);
  transition: all 0.3s ease;
}

.todo-item:hover {
  box-shadow: var(--shadow-soft);
}

.todo-checkbox {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s;
}

.todo-checkbox.checked {
  background: linear-gradient(135deg, #81C995, #5AB87B);
  border-color: transparent;
  color: white;
}

.todo-content {
  flex: 1;
}

.todo-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dark);
}

.todo-text.done {
  text-decoration: line-through;
  color: var(--text-light);
}

.todo-deadline {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
}

.todo-deadline.urgent {
  color: #E57373;
  font-weight: 600;
}

.todo-delete {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  transition: color 0.2s;
}

.todo-delete:hover { color: #E57373; }

/* ========== 会议记录 ========== */
.meeting-item {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  border-left: 4px solid var(--primary-blue);
}

.meeting-time {
  font-size: 13px;
  color: var(--primary-dark);
  font-weight: 600;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.meeting-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.meeting-content {
  font-size: 14px;
  color: var(--text-medium);
  line-height: 1.7;
  white-space: pre-wrap;
}

/* ========== 饮食计划 ========== */
.diet-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.diet-stat {
  background: white;
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
}

.diet-stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  font-family: var(--font-en);
}

.diet-stat-label {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 4px;
}

.meal-plan {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(168, 216, 234, 0.3);
  margin-bottom: 16px;
}

.meal-type {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-pale);
}

.meal-type-icon {
  font-size: 24px;
}

.meal-food-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.meal-food-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--primary-pale);
  border-radius: 8px;
  font-size: 14px;
}

.food-name {
  font-weight: 500;
  color: var(--text-dark);
}

.food-cal {
  font-size: 13px;
  color: var(--primary-dark);
  font-family: var(--font-en);
}

/* ========== 空状态 ========== */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-light);
}

.empty-state i {
  font-size: 56px;
  margin-bottom: 16px;
  display: block;
  opacity: 0.4;
}

.empty-state p {
  font-size: 15px;
}

/* ========== Modal 弹窗 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

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

.modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 480px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 12px 48px rgba(0,0,0,0.2);
  animation: modalIn 0.3s ease;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ========== Tab 切换 ========== */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--primary-pale);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-medium);
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.tab-btn.active {
  background: white;
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-btn:hover:not(.active) {
  color: var(--text-dark);
}

/* ========== 搜索框 ========== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.search-input-wrapper {
  flex: 1;
  position: relative;
}

.search-input-wrapper input {
  padding-left: 40px;
}

.search-input-wrapper i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

/* ========== 响应式适配 ========== */
@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .home-stats { grid-template-columns: repeat(3, 1fr); }
  .diet-overview { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .sidebar .logo-title,
  .sidebar .logo-subtitle,
  .sidebar .nav-item span:not(.toggle-arrow),
  .sidebar .nav-child span,
  .sidebar .footer-text { display: none; }
  .sidebar .nav-item { justify-content: center; padding: 12px; }
  .sidebar .toggle-arrow { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); padding: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .home-stats { grid-template-columns: repeat(2, 1fr); }
  .ai-chat-panel { width: calc(100vw - 40px); right: -10px; }
}

/* ========== 动画 ========== */
.fade-in {
  animation: fadeIn 0.4s ease;
}

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

.slide-in {
  animation: slideIn 0.4s ease;
}

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

/* ========== 滚动条美化 ========== */
.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--primary-blue); border-radius: 6px; }

/* ========== 特殊装饰元素 ========== */
.sparkle {
  display: inline-block;
  animation: sparkle 1.5s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}
