:root {
  --primary: #58D68D;
  --primary-dark: #2ECC71;
  --bg: #F8F9FA;
  --card: #FFFFFF;
  --text: #2C3E50;
  --text-secondary: #7F8C8D;
  --border: #E8E8E8;
  --accent: #98D8C8;
  --danger: #E74C3C;
  --warning: #F39C12;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --font-size: 16px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 60px;
}

[data-theme="light"] { --primary: #58D68D; --primary-dark: #2ECC71; --bg: #F8F9FA; --card: #FFFFFF; --text: #2C3E50; --text-secondary: #7F8C8D; --border: #E8E8E8; --accent: #98D8C8; }
[data-theme="dark"] { --primary: #5DADE2; --primary-dark: #3498DB; --bg: #1A1A2E; --card: #252540; --text: #E8E8F0; --text-secondary: #9090A8; --border: #353550; --accent: #5DADE2; --shadow: 0 2px 12px rgba(0,0,0,0.3); }
[data-theme="mint"] { --primary: #56AB91; --primary-dark: #3DA87E; --bg: #F0FAF5; --card: #FFFFFF; --text: #2C5F4A; --text-secondary: #5D8A74; --border: #D4EDDA; --accent: #98D8C8; }
[data-theme="cream"] { --primary: #E67E22; --primary-dark: #D35400; --bg: #FFFBEB; --card: #FFFFFF; --text: #5D4037; --text-secondary: #8D6E63; --border: #FFE0B2; --accent: #F7DC6F; }
[data-theme="tech"] { --primary: #5DADE2; --primary-dark: #2980B9; --bg: #EBF5FB; --card: #FFFFFF; --text: #1B4F72; --text-secondary: #5D6D7E; --border: #D4E6F1; --accent: #76D7C4; }
[data-theme="plant"] { --primary: #58D68D; --primary-dark: #27AE60; --bg: #EAFAF1; --card: #FFFFFF; --text: #1E8449; --text-secondary: #52BE80; --border: #D5F5E3; --accent: #ABEBC6; }
[data-theme="purple"] { --primary: #BB8FCE; --primary-dark: #8E44AD; --bg: #F5EEF8; --card: #FFFFFF; --text: #4A235A; --text-secondary: #7D3C98; --border: #E8DAEF; --accent: #D7BDE2; }

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html {
  height: 100%;
  font-size: var(--font-size);
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-overflow-scrolling: touch;
}

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  margin: 0;
  position: relative;
  background: var(--bg);
  overflow: hidden;
}

/* 顶部状态栏 */
#top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  padding-top: calc(8px + var(--safe-top));
  background: var(--card);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 100;
  min-height: 52px;
  position: sticky;
  top: 0;
}

.top-left { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }

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

.user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }

.username {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.sync-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.top-right { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.weather {
  display: flex;
  align-items: center;
  gap: 3px;
  background: var(--accent);
  padding: 4px 8px;
  border-radius: 16px;
  font-size: 12px;
  flex-shrink: 0;
}

.weather-icon { font-size: 14px; line-height: 1; }
.weather-temp { font-size: 12px; line-height: 1; }

.icon-btn {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border: none;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.icon-btn:active { background: var(--border); }

/* 主内容区 */
#main-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  overscroll-behavior: contain;
}

.page {
  padding: 12px;
  animation: fadeIn 0.2s ease;
  min-height: 100%;
}

.page.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 按钮 */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-secondary {
  background: var(--border);
  color: var(--text);
  border: none;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.btn-ai {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 10px;
}

/* 底部Tab栏 */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: var(--card);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
  z-index: 1000;
  height: calc(var(--nav-height) + var(--safe-bottom));
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  background: transparent;
  border: none;
  padding: 4px 2px;
  cursor: pointer;
  flex: 1;
  min-width: 0;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.nav-item.active {
  color: var(--primary);
}

.nav-icon { font-size: 20px; line-height: 1.2; }
.nav-label { font-size: 9px; font-weight: 500; line-height: 1; }

/* 每日计划 */
.plan-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  flex: 1;
  background: var(--card);
  border-radius: 12px;
  padding: 10px 6px;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-num {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}

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

.plan-groups { display: flex; flex-direction: column; gap: 12px; }
.plan-group h3 { font-size: 13px; margin-bottom: 6px; color: var(--text); }
.task-list { display: flex; flex-direction: column; gap: 6px; }

.task-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}

.task-checkbox {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--border);
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

.task-checkbox.checked {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.task-content { flex: 1; min-width: 0; }

.task-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.task-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
  flex-wrap: wrap;
}

.priority-tag {
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
}

.priority-P1 { background: var(--danger); color: #fff; }
.priority-P2 { background: var(--warning); color: #fff; }
.priority-P3 { background: var(--accent); color: var(--text); }

.task-delete {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
}

.ai-suggestions { display: flex; flex-direction: column; gap: 6px; }

.ai-suggestion {
  background: linear-gradient(135deg, var(--accent), var(--card));
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  color: var(--text);
  border-left: 3px solid var(--primary);
}

/* 搜索和筛选 */
.filter-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.search-input {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  min-width: 0;
}

.filter-select {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text);
  outline: none;
  flex-shrink: 0;
}

/* 卡片网格 */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.inspiration-card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.card-cover {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, var(--accent), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
}

.card-body { padding: 10px; }

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

.card-ai-summary {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.tag {
  font-size: 10px;
  background: var(--accent);
  color: var(--text);
  padding: 2px 6px;
  border-radius: 8px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-secondary);
}

.card-actions { display: flex; gap: 4px; }
.action-btn { background: transparent; border: none; font-size: 14px; cursor: pointer; padding: 2px; }

/* 视频列表 */
.video-list { display: flex; flex-direction: column; gap: 10px; }

.video-card {
  display: flex;
  gap: 10px;
  background: var(--card);
  border-radius: 12px;
  padding: 10px;
  box-shadow: var(--shadow);
}

.video-cover {
  width: 80px;
  height: 80px;
  min-width: 80px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--warning), var(--danger));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.video-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }

.video-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.hot-tag {
  background: var(--danger);
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 600;
}

.video-actions { display: flex; gap: 6px; margin-top: 4px; }

/* 植物 */
.weather-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.weather-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.weather-big-icon { font-size: 32px; flex-shrink: 0; }
.weather-desc { font-size: 14px; font-weight: 600; color: var(--text); }
.weather-detail { font-size: 11px; color: var(--text-secondary); }

.weather-action {
  background: var(--accent);
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  color: var(--text);
  text-align: center;
}

.plant-tabs { display: flex; gap: 6px; margin-bottom: 10px; }

.plant-tab {
  flex: 1;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.plant-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.plant-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }

.plant-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.plant-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.plant-icon { font-size: 28px; flex-shrink: 0; }
.plant-name { font-size: 15px; font-weight: 600; }
.plant-sub { font-size: 11px; color: var(--text-secondary); }

.plant-params {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}

.param-item {
  background: var(--bg);
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 11px;
}

.param-label { color: var(--text-secondary); margin-right: 3px; }
.plant-actions { display: flex; gap: 6px; }

.ai-reminders { display: flex; flex-direction: column; gap: 6px; }
.ai-reminder {
  background: linear-gradient(135deg, var(--accent), var(--card));
  border-radius: 10px;
  padding: 10px;
  font-size: 12px;
  border-left: 3px solid var(--warning);
}

/* 备忘录 */
.note-list { display: flex; flex-direction: column; gap: 8px; }

.note-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.note-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.note-content {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}

.note-ai { font-size: 11px; color: var(--primary); margin-bottom: 4px; }

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-secondary);
}

/* 复盘 */
.review-types {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 10px;
}

.review-type {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 10px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}

.review-type.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.review-form {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}

.review-form textarea {
  width: 100%;
  min-height: 100px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  resize: vertical;
  font-family: inherit;
}

.review-list { display: flex; flex-direction: column; gap: 8px; }

.review-card {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.review-type-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.review-date { font-size: 11px; color: var(--text-secondary); }

.review-summary {
  font-size: 12px;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 6px;
}

.review-stats {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.review-stats span { color: var(--primary); font-weight: 600; }

/* 设置 */
.settings-section {
  background: var(--card);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}

.settings-section h3 {
  font-size: 14px;
  margin-bottom: 10px;
  color: var(--text);
}

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

.theme-item {
  background: var(--c);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 10px 4px;
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  font-weight: 500;
}

.theme-item.active {
  border-color: var(--primary);
  transform: scale(1.02);
}

.font-sizes { display: flex; gap: 6px; }

.font-btn {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
}

.font-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

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

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.switch span {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--border);
  border-radius: 24px;
  transition: 0.2s;
}

.switch span:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + span { background: var(--primary); }
.switch input:checked + span:before { transform: translateX(20px); }

.sync-info p { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.sync-info span { color: var(--primary); font-weight: 600; }

.account-edit { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.avatar-edit {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  cursor: pointer;
  flex-shrink: 0;
}

.nickname-input {
  flex: 1;
  min-width: 100px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.about-text { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }

/* 模态框 */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.15s;
}

.modal.hidden { display: none; }

.modal-content {
  background: var(--card);
  width: 100%;
  max-width: 100%;
  max-height: 85vh;
  border-radius: 16px 16px 0 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h2 { font-size: 16px; font-weight: 700; }

.modal-close {
  background: var(--border);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 14px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* 表单 */
.form-group { margin-bottom: 12px; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  font-family: inherit;
}

.form-group textarea { min-height: 70px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); }

.form-row { display: flex; gap: 8px; }
.form-row .form-group { flex: 1; }

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.form-actions button {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-save { background: var(--primary); color: #fff; }
.btn-cancel { background: var(--border); color: var(--text); }

/* Toast */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 13px;
  z-index: 3000;
  animation: toastIn 0.2s;
  max-width: 80%;
  text-align: center;
}

.toast.hidden { display: none; }

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -30px); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

/* AI分析结果 */
.ai-analysis { font-size: 13px; line-height: 1.5; color: var(--text); }

.ai-analysis h4 {
  font-size: 13px;
  margin: 10px 0 5px;
  color: var(--primary);
  border-left: 3px solid var(--primary);
  padding-left: 8px;
}

.ai-analysis ul { padding-left: 0; list-style: none; }
.ai-analysis li { padding: 4px 0; font-size: 12px; color: var(--text); }
.ai-analysis li:before { content: "• "; color: var(--primary); font-weight: bold; }

.ai-report-section { margin-bottom: 10px; }
.ai-report-section:last-child { margin-bottom: 0; }
.ai-report-section h4 { font-size: 13px; margin-bottom: 6px; color: var(--primary); }

.ai-stat-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.ai-stat-row:last-child { border-bottom: none; }
.ai-stat-row .label { color: var(--text-secondary); }
.ai-stat-row .value { color: var(--text); font-weight: 600; }

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-secondary);
}

.empty-state .empty-icon { font-size: 36px; margin-bottom: 8px; }
.empty-state .empty-text { font-size: 13px; }

/* 滚动条 */
#main-content::-webkit-scrollbar { width: 0; display: none; }
.modal-body::-webkit-scrollbar { width: 3px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ========== 响应式适配 ========== */

/* 小屏手机（宽度<360px） */
@media (max-width: 359px) {
  .page { padding: 10px; }
  .page-header h1 { font-size: 18px; }
  .nav-label { font-size: 8px; }
  .nav-icon { font-size: 18px; }
  .stat-num { font-size: 18px; }
  .theme-list { grid-template-columns: repeat(2, 1fr); }
}

/* 正常手机（360px-480px） */
@media (min-width: 360px) and (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

/* 大屏手机 / 小平板（480px-768px） */
@media (min-width: 480px) {
  .page { padding: 16px; }
  .card-grid { grid-template-columns: 1fr 1fr; }
  .video-card { gap: 14px; padding: 14px; }
  .video-cover { width: 100px; height: 100px; min-width: 100px; }
}

/* 平板 / 电脑端（>=768px） */
@media (min-width: 768px) {
  #app {
    max-width: 600px;
    margin: 0 auto;
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
  }

  .card-grid { grid-template-columns: 1fr 1fr 1fr; }
  .page { padding: 20px; }
  .page-header h1 { font-size: 22px; }
  .btn-primary { padding: 10px 18px; font-size: 14px; }
}

/* 横屏适配 */
@media (orientation: landscape) and (max-height: 500px) {
  #top-bar { padding-top: 8px; padding-bottom: 6px; }
  #bottom-nav { height: calc(50px + var(--safe-bottom)); }
  #main-content { padding-bottom: calc(60px + var(--safe-bottom)); }
  .nav-icon { font-size: 18px; }
  .nav-label { font-size: 8px; }
}

/* 深色模式下的优化 */
@media (prefers-color-scheme: dark) {
  [data-theme="light"] {
    --bg: #1a1a1a;
    --card: #2d2d2d;
    --text: #f0f0f0;
    --text-secondary: #a0a0a0;
    --border: #404040;
  }
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* iOS 圆角适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  #bottom-nav {
    padding-bottom: var(--safe-bottom);
  }
  #main-content {
    padding-bottom: calc(var(--nav-height) + var(--safe-bottom) + 8px);
  }
}

/* 全屏模式下的处理 */
@media (display-mode: standalone) {
  #top-bar {
    padding-top: calc(8px + var(--safe-top));
  }
}