/* 泳跃全站深色模式 — 依赖 html.dark（由 dark-mode.js + localStorage yy-theme 控制） */
html.dark {
  color-scheme: dark;
  /* community.html 等使用 --yy-* 变量 */
  --yy-bg: #0f172a;
  --yy-gray-50: #1e293b;
  --yy-gray-100: #334155;
  --yy-gray-200: #475569;
  --yy-gray-300: #64748b;
  --yy-gray-500: #94a3b8;
  --yy-gray-700: #cbd5e1;
  --yy-gray-900: #f1f5f9;
}

/* 须用 background 简写覆盖各页 body 上的 linear-gradient，否则仍会叠在浅色底上 */
html.dark body {
  background: #0f172a none !important;
  color: #e2e8f0 !important;
}

/* 登录 / 注册页 Tailwind 扩展色 */
html.dark .bg-graybg {
  background-color: #0f172a !important;
}
html.dark .text-ink {
  color: #e2e8f0 !important;
}
html.dark .border-grayborder {
  border-color: #334155 !important;
}
html.dark .text-graytext {
  color: #94a3b8 !important;
}
html.dark .text-graydeep {
  color: #cbd5e1 !important;
}

/* Tailwind 常用背景/文字 */
html.dark .bg-white,
html.dark .bg-gray-50 {
  background-color: #1e293b !important;
}
html.dark .bg-gray-100 {
  background-color: #334155 !important;
}
html.dark .bg-gray-200 {
  background-color: #475569 !important;
}
html.dark .bg-light {
  background-color: #0f172a !important;
}
html.dark .text-dark {
  color: #e2e8f0 !important;
}
html.dark .text-gray-900 {
  color: #f1f5f9 !important;
}
html.dark .text-gray-800 {
  color: #e2e8f0 !important;
}
html.dark .text-gray-700 {
  color: #cbd5e1 !important;
}
html.dark .text-gray-600 {
  color: #94a3b8 !important;
}
html.dark .text-gray-500 {
  color: #64748b !important;
}
html.dark .text-gray-400 {
  color: #94a3b8 !important;
}
html.dark .border-gray-100,
html.dark .border-gray-200,
html.dark .border-gray-300 {
  border-color: #334155 !important;
}

/* 顶栏玻璃 */
html.dark .glass-effect {
  background-color: rgba(15, 23, 42, 0.88) !important;
  border-bottom-color: rgba(51, 65, 85, 0.6) !important;
  box-shadow: 0 1px 0 rgba(30, 41, 59, 0.5);
}
html.dark .glass-header {
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom-color: rgba(51, 65, 85, 0.5) !important;
  box-shadow: none;
}
html.dark .navbar-scrolled {
  background-color: rgba(15, 23, 42, 0.95) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}
html.dark .yy-glass-header {
  background: rgba(15, 23, 42, 0.9) !important;
  border-bottom-color: rgba(51, 65, 85, 0.55) !important;
}

/* 首页服务卡等 */
html.dark .nav-card {
  background-color: #1e293b !important;
  border-color: rgba(51, 65, 85, 0.9) !important;
}
html.dark .shadow-card {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.35), 0 4px 6px -2px rgba(0, 0, 0, 0.2) !important;
}

/* 赛事 / 表单页（events.html 等） */
html.dark .field-base {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
html.dark .field-base:focus {
  border-color: #165dff !important;
  box-shadow: 0 0 0 2px rgba(22, 93, 255, 0.25) !important;
}
html.dark .btn-secondary {
  background-color: #334155 !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark .btn-secondary:hover:not(:disabled) {
  background-color: #475569 !important;
}
html.dark .section-pill {
  background-color: rgba(22, 93, 255, 0.2) !important;
  color: #93c5fd !important;
}
html.dark .section-title-gradient {
  background-image: linear-gradient(to right, #f8fafc, #60a5fa, #f8fafc) !important;
}
html.dark .event-card {
  background: linear-gradient(to bottom, #1e293b 0%, #172033 100%) !important;
  border-color: rgba(51, 65, 85, 0.95) !important;
}
html.dark .event-card__title {
  color: #f1f5f9 !important;
}
html.dark .event-card__desc,
html.dark .event-card__meta-row {
  color: #94a3b8 !important;
}
html.dark .event-card__category,
html.dark .event-card__status {
  background: #334155 !important;
  color: #cbd5e1 !important;
}
html.dark .event-card__footer {
  border-top-color: #334155 !important;
  background: rgba(15, 23, 42, 0.5) !important;
}
html.dark .pagination-btn {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}
html.dark .pagination-btn:hover:not(:disabled) {
  background: rgba(22, 93, 255, 0.2) !important;
  color: #93c5fd !important;
}
html.dark .skeleton-card {
  background-color: #1e293b !important;
}
html.dark .skeleton-block {
  background-color: #334155 !important;
}

/* 商城 shop.html */
html.dark .category-btn {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #cbd5e1 !important;
}
html.dark .category-btn:hover {
  background: rgba(22, 93, 255, 0.15) !important;
}
html.dark .search-input {
  background: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark .product-img-wrap {
  background: #334155 !important;
}

/* 场馆详情表 */
html.dark .collapse-head {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .collapse-head:hover {
  background: #334155 !important;
}
html.dark .collapse-body {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
html.dark .js365-table th,
html.dark .js365-table td {
  border-color: #334155 !important;
}
html.dark .js365-table th {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .js365-table .sub-header th {
  background: #334155 !important;
}

/* 群聊 chat.html */
html.dark .yy-nav {
  background: rgba(15, 23, 42, 0.92) !important;
  border-bottom-color: #334155 !important;
}
html.dark .yy-nav-logo {
  color: #f1f5f9 !important;
}
html.dark .yy-nav-links a {
  color: #94a3b8 !important;
}
html.dark .yy-nav-links a:hover,
html.dark .yy-nav-links a.active {
  background: rgba(22, 93, 255, 0.2) !important;
  color: #93c5fd !important;
}
html.dark .mobile-nav {
  background: #1e293b !important;
  border-top-color: #334155 !important;
}
html.dark .chat-list-item:hover {
  background: #334155 !important;
}
html.dark .chat-message.other {
  background: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .yy-modal-panel {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .yy-input,
html.dark .yy-textarea {
  background: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark .yy-btn-secondary {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

/* 个人中心 profile.html */
html.dark body:has(.profile-hero-card) {
  background: linear-gradient(180deg, #0f172a 0%, #020617 40%, #020617 100%) !important;
}
html.dark .profile-hero-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html.dark .link-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* 发帖页 post-create — CSS 变量 */
html.dark {
  --yy-bg: #0f172a;
  --yy-gray-200: #334155;
  --yy-gray-500: #94a3b8;
  --yy-gray-700: #cbd5e1;
  --yy-gray-900: #f1f5f9;
}
html.dark .yy-card {
  background: linear-gradient(180deg, #1e293b 0%, #172033 100%) !important;
  border-color: rgba(51, 65, 85, 0.9) !important;
}
html.dark .yy-file-zone {
  background: #0f172a !important;
  border-color: #475569 !important;
}
html.dark .yy-upload-panel {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}
html.dark .yy-upload-panel h3 {
  color: #f1f5f9 !important;
}
html.dark .yy-btn-ghost:hover {
  background: #334155 !important;
}

/* 主题切换按钮 */
.yy-theme-toggle {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(22, 93, 255, 0.25);
  background: rgba(255, 255, 255, 0.95);
  color: #475569;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.yy-theme-toggle:hover {
  background: rgba(22, 93, 255, 0.1);
  border-color: rgba(22, 93, 255, 0.45);
  color: #165dff;
}
.yy-theme-toggle:active {
  transform: scale(0.96);
}
html.dark .yy-theme-toggle {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(148, 163, 184, 0.35);
  color: #fbbf24;
}
html.dark .yy-theme-toggle:hover {
  background: rgba(51, 65, 85, 0.95);
  border-color: rgba(251, 191, 36, 0.45);
  color: #fcd34d;
}

/* 登录/注册页角标按钮 */
.yy-theme-toggle--floating {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}
html.dark .yy-theme-toggle--floating {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ========== 更多 Tailwind 工具类 ========== */
html.dark .bg-gray-300 { background-color: #475569 !important; }
html.dark .bg-gray-400 { background-color: #64748b !important; }
html.dark .bg-slate-50  { background-color: #0f172a !important; }
html.dark .bg-blue-50,
html.dark .bg-primary\/10 { background-color: rgba(22,93,255,0.15) !important; }
html.dark .bg-cyan-50 { background-color: rgba(6,182,212,0.12) !important; }

html.dark .text-white { color: #f1f5f9 !important; }
html.dark .text-slate-800 { color: #cbd5e1 !important; }
html.dark .text-slate-600 { color: #94a3b8 !important; }
html.dark .text-blue-600 { color: #93c5fd !important; }
html.dark .text-cyan-600 { color: #67e8f9 !important; }
html.dark .text-green-600 { color: #4ade80 !important; }
html.dark .text-red-500 { color: #f87171 !important; }
html.dark .text-yellow-500 { color: #facc15 !important; }
html.dark .text-orange-500 { color: #fb923c !important; }

html.dark .border-white { border-color: #334155 !important; }
html.dark .border-gray-400 { border-color: #64748b !important; }
html.dark .border-gray-500 { border-color: #475569 !important; }
html.dark .border-slate-200 { border-color: #334155 !important; }

html.dark .ring-gray-200 { --tw-ring-color: #334155 !important; }
html.dark .ring-2 { --tw-ring-color: rgba(22,93,255,0.4) !important; }
html.dark .shadow-md,
html.dark .shadow-lg,
html.dark .shadow-xl { --tw-shadow-color: rgba(0,0,0,0.35) !important; }
html.dark .shadow-blue-500\/25 { --tw-shadow-color: rgba(22,93,255,0.2) !important; }

html.dark .placeholder-gray-400::placeholder { color: #64748b !important; }
html.dark .placeholder-gray-500::placeholder { color: #475569 !important; }

/* ========== 登录/注册页 ========== */
html.dark .login-left-bg,
html.dark .bg-gradient-to-br\/from-primary\/,
html.dark [class*="bg-gradient-to-br from-primary"] {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
}
html.dark .bg-graybg { background-color: #0f172a !important; }
html.dark .bg-white\/10 { background-color: rgba(51,65,85,0.5) !important; }
html.dark .border-white\/30 { border-color: rgba(51,65,85,0.6) !important; }
html.dark .text-white\/70 { color: rgba(226,232,240,0.7) !important; }
html.dark .text-white\/60 { color: rgba(226,232,240,0.6) !important; }

html.dark .input-base {
  background-color: rgba(15,23,42,0.8) !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .input-base:focus {
  border-color: #165dff !important;
  background-color: rgba(15,23,42,0.95) !important;
}
html.dark .yy-form-field {
  background-color: rgba(15,23,42,0.8) !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .yy-form-field:focus {
  border-color: #165dff !important;
}
html.dark .captcha-canvas {
  border-color: #334155 !important;
  background: #1e293b !important;
}
html.dark .captcha-input { border-color: #334155 !important; }

html.dark .login-brand-dot { background-color: rgba(22,93,255,0.6) !important; }
html.dark .login-testimonial-card {
  background: rgba(30,41,59,0.7) !important;
  border-color: #334155 !important;
}
html.dark .login-feature-icon { background: rgba(22,93,255,0.2) !important; }

/* ========== 社区 community.html ========== */
html.dark .yy-section-header { color: #e2e8f0 !important; }
html.dark .yy-hero-title { color: #f1f5f9 !important; }
html.dark .yy-hero-sub { color: #94a3b8 !important; }
html.dark .yy-official-grid { background: transparent !important; }
html.dark .yy-official-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .yy-post-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html.dark .yy-post-card:hover { background: #263148 !important; }
html.dark .yy-post-title { color: #f1f5f9 !important; }
html.dark .yy-post-meta { color: #64748b !important; }
html.dark .yy-post-excerpt { color: #94a3b8 !important; }
html.dark .yy-tab-btn {
  color: #94a3b8 !important;
  border-bottom-color: transparent !important;
}
html.dark .yy-tab-btn.active {
  color: #165dff !important;
  border-bottom-color: #165dff !important;
}
html.dark .yy-comment-area { border-color: #334155 !important; color: #cbd5e1 !important; }
html.dark .yy-like-btn { color: #64748b !important; }
html.dark .yy-like-btn.liked { color: #f87171 !important; }
html.dark .yy-share-panel { background: #1e293b !important; border-color: #334155 !important; }
html.dark .yy-modal-overlay { background: rgba(0,0,0,0.75) !important; }
html.dark .yy-modal-content { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }

/* ========== 训练计划 training-plan.html ========== */
html.dark .glass-effect { background-color: rgba(15,23,42,0.88) !important; }
html.dark .water-wave-bg path { fill-opacity: 0.08 !important; }
html.dark .plan-card,
html.dark .training-card {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .plan-stat-box { background: rgba(22,93,255,0.12) !important; color: #93c5fd !important; }
html.dark .progress-track { background: #334155 !important; }
html.dark .progress-fill { background: #165dff !important; }
html.dark .plan-editor { border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark .week-day { color: #94a3b8 !important; border-color: #334155 !important; }
html.dark .week-day.active { background: rgba(22,93,255,0.15) !important; color: #93c5fd !important; border-color: rgba(22,93,255,0.4) !important; }
html.dark .session-item { border-color: #334155 !important; color: #cbd5e1 !important; }
html.dark .session-item:hover { background: rgba(51,65,85,0.4) !important; }
html.dark .calendar-grid { border-color: #334155 !important; }
html.dark .calendar-day { color: #94a3b8 !important; }
html.dark .calendar-day.today { color: #165dff !important; background: rgba(22,93,255,0.12) !important; }
html.dark .calendar-day.has-plan { color: #e2e8f0 !important; background: rgba(22,93,255,0.1) !important; }

/* ========== 场馆页 venues.html ========== */
html.dark .venue-card,
html.dark .pool-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html.dark .venue-card:hover { background: #263148 !important; }
html.dark .map-container { background: #1e293b !important; border-color: #334155 !important; }
html.dark .venue-filter-panel { background: #1e293b !important; border-color: #334155 !important; }

/* ========== 赛事页 events.html 筛选下拉 ========== */
html.dark select.field-base,
html.dark select.event-status-select,
html.dark select.event-category-select {
  background-color: #1e293b !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark .bg-\[\#F9FAFB\] { background-color: #0f172a !important; }
html.dark .event-card-wrapper:hover { background: #263148 !important; }

/* ========== 页脚 ========== */
html.dark footer.bg-dark { background-color: #020617 !important; }
html.dark footer .text-gray-400 { color: #64748b !important; }
html.dark footer .text-gray-500 { color: #475569 !important; }
html.dark footer .border-gray-800 { border-color: #1e293b !important; }

/* ========== 弹窗/模态 ========== */
html.dark .modal-content { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark #login-modal > div,
html.dark #register-modal > div,
html.dark .modal-backdrop { background: rgba(0,0,0,0.7) !important; }
html.dark input[type=text],
html.dark input[type=email],
html.dark input[type=password],
html.dark input[type=number],
html.dark input[type=tel],
html.dark textarea {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark input:focus,
html.dark textarea:focus {
  border-color: #165dff !important;
  box-shadow: 0 0 0 3px rgba(22,93,255,0.2) !important;
}

/* ========== 按钮 ========== */
html.dark .btn-primary {
  background-color: #165dff !important;
  color: #fff !important;
}
html.dark .btn-primary:hover:not(:disabled) { background-color: #0e4acc !important; }
html.dark a.bg-primary { background-color: #165dff !important; }

/* ========== Misc ========== */
html.dark .divide-y > * + * { border-color: #334155 !important; }
html.dark .divide-x > * + * { border-color: #334155 !important; }
html.dark hr { border-color: #334155 !important; }
html.dark .border-t { border-color: #334155 !important; }
html.dark .border-b { border-color: #334155 !important; }
html.dark .border { border-color: #334155 !important; }
html.dark .ring-1 { --tw-ring-color: #334155 !important; }
html.dark .ring-primary\/20 { --tw-ring-color: rgba(22,93,255,0.3) !important; }
html.dark .opacity-70 { opacity: 0.4 !important; }
html.dark .opacity-50 { opacity: 0.3 !important; }
html.dark .bg-gray-200 { background-color: #334155 !important; }
html.dark .bg-gray-800 { background-color: #1e293b !important; }
html.dark .bg-slate-100 { background-color: #1e293b !important; }
html.dark .bg-slate-200 { background-color: #334155 !important; }
html.dark .text-slate-900 { color: #f1f5f9 !important; }
html.dark .bg-zinc-100 { background-color: #1e293b !important; }

/* ========== 个人中心 profile 补充 ========== */
html.dark .profile-hero-strip { background: linear-gradient(120deg, #1e3a8a 0%, #1e293b 45%, #312e81 100%) !important; }
html.dark .avatar-ring { background: linear-gradient(135deg, #1e293b 0%, #1e3a8a 100%) !important; }
html.dark .avatar-overlay { background: rgba(0,0,0,0.6) !important; }
html.dark .profile-stat-card { background: #1e293b !important; border-color: #334155 !important; color: #e2e8f0 !important; }
html.dark .edit-field-btn { color: #94a3b8 !important; }

/* ========== 技术分析页 technical-analysis.html（页面内联 @layer 中 .analysis-card 等为白底，须 !important 覆盖） ========== */
html.dark body.antialiased {
  background: #0f172a none !important;
}
html.dark .water-pattern {
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 50 Q25 30 50 50 T100 50' stroke='%2393c5fd' fill='none' stroke-width='2'/%3E%3C/svg%3E");
}
html.dark .analysis-card {
  background: #1e293b !important;
  background-color: #1e293b !important;
  border-color: #334155 !important;
}
html.dark .analysis-card:hover {
  border-color: #475569 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 4px 12px rgba(22, 93, 255, 0.12) !important;
}
html.dark .analysis-card .tier-price-block {
  border-top-color: #475569 !important;
}
html.dark .analysis-card .file-label-btn {
  background: #334155 !important;
  color: #e2e8f0 !important;
  border-color: #475569 !important;
}
html.dark .analysis-card .file-label-btn:hover {
  background: #475569 !important;
  border-color: #165dff !important;
}
html.dark .analysis-card .file-label-btn.has-file,
html.dark .analysis-card label.file-label-btn:has(+ input:checked) {
  background: rgba(22, 93, 255, 0.2) !important;
  border-color: #165dff !important;
  color: #bfdbfe !important;
}
html.dark .chart-container {
  background: #1e293b !important;
  border: 1px solid #334155 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3) !important;
}
html.dark .data-table thead th {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
  color: #e2e8f0 !important;
}
html.dark .data-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.6) !important;
}
html.dark .data-table tbody tr:hover {
  background: rgba(22, 93, 255, 0.12) !important;
}
html.dark .progress-bar {
  background: #334155 !important;
}
html.dark .bg-emerald-50 { background-color: rgba(16, 185, 129, 0.18) !important; }
html.dark .text-emerald-700 { color: #6ee7b7 !important; }
html.dark .bg-amber-100 { background-color: rgba(245, 158, 11, 0.22) !important; }
html.dark .text-amber-800 { color: #fcd34d !important; }
html.dark .video-upload-zone { border-color: #334155 !important; background: rgba(15,23,42,0.85) !important; color: #94a3b8 !important; }
html.dark .video-upload-zone:hover { border-color: #165dff !important; background: rgba(22,93,255,0.12) !important; }
html.dark .analysis-result-panel { background: #1e293b !important; border-color: #334155 !important; }
html.dark .metric-card { background: #1e293b !important; border-color: #334155 !important; }

/* ========== 问卷页 quiz.html ========== */
html.dark #training-plan-quiz { background-color: #0f172a !important; }
html.dark #training-plan-quiz .bg-white { background-color: #1e293b !important; }
html.dark .quiz-option-item { border-color: #334155 !important; color: #cbd5e1 !important; background: #1e293b !important; }
html.dark .quiz-option-item:hover { border-color: #165dff !important; background: rgba(22,93,255,0.08) !important; }
html.dark .quiz-option-item.selected { border-color: #165dff !important; background: rgba(22,93,255,0.12) !important; color: #93c5fd !important; }
html.dark .quiz-progress-bar { background: #334155 !important; }
html.dark .quiz-progress-fill { background: #165dff !important; }

/* ========== 训练计划 training-plan.html（Tailwind 半透明白底 bg-white/80 等） ========== */
html.dark body.min-h-screen.bg-gradient-to-br {
  background: #0f172a none !important;
}
html.dark .water-wave-bg path {
  fill-opacity: 0.07 !important;
}
html.dark .bg-white\/80 {
  background-color: rgba(30, 41, 59, 0.92) !important;
}
html.dark .bg-white\/95 {
  background-color: rgba(30, 41, 59, 0.96) !important;
}
html.dark .border-slate-100,
html.dark .border-slate-200,
html.dark .border-slate-200\/80 {
  border-color: #334155 !important;
}
html.dark .text-slate-800 {
  color: #f1f5f9 !important;
}
html.dark .text-slate-600 {
  color: #94a3b8 !important;
}
html.dark .text-slate-500 {
  color: #94a3b8 !important;
}
html.dark .text-slate-300 {
  color: #64748b !important;
}
html.dark .ring-blue-100 {
  --tw-ring-color: rgba(51, 65, 85, 0.8) !important;
}
html.dark .group:hover .group-hover\:ring-blue-300 {
  --tw-ring-color: rgba(22, 93, 255, 0.45) !important;
}
/* 顶部徽章与渐变标题 */
html.dark .bg-gradient-to-r.from-blue-50.to-cyan-50 {
  background-image: linear-gradient(to right, rgba(30, 58, 138, 0.45), rgba(6, 182, 212, 0.25)) !important;
  color: #93c5fd !important;
  box-shadow: none !important;
}
html.dark main .bg-gradient-to-br.from-blue-50.to-cyan-50 {
  background-image: linear-gradient(to bottom right, rgba(30, 58, 138, 0.35), rgba(6, 182, 212, 0.2)) !important;
}
html.dark main h2.bg-clip-text.text-transparent,
html.dark main h1.bg-clip-text.text-transparent {
  background-image: linear-gradient(to right, #e2e8f0, #93c5fd, #e2e8f0) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
/* 技术分析区二级标题为纯色 text-gray-800，非渐变字 */
html.dark #technical-analysis h2.text-gray-800 {
  color: #e2e8f0 !important;
}
html.dark #plan-card-container.bg-white {
  background-color: #1e293b !important;
}
html.dark #plan-prev-card,
html.dark #plan-next-card {
  background-color: rgba(30, 41, 59, 0.96) !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark #plan-prev-card:hover:not(:disabled),
html.dark #plan-next-card:hover:not(:disabled) {
  background-color: #165dff !important;
  border-color: #165dff !important;
  color: #fff !important;
}
html.dark .bg-yellow-50 {
  background-color: rgba(234, 179, 8, 0.15) !important;
}
html.dark .border-yellow-200 {
  border-color: rgba(234, 179, 8, 0.35) !important;
}
html.dark .text-yellow-800,
html.dark .text-yellow-700 {
  color: #fcd34d !important;
}

/* ========== 技术分析 technical-analysis.html ========== */
/* IMU 卡片与文件选择框（避免白底刺眼） */
html.dark .imu-card.bg-white {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}
html.dark .imu-file-input {
  background-color: #0f172a !important;
  border-color: #475569 !important;
  color: #e2e8f0 !important;
}
html.dark .imu-file-input::file-selector-button,
html.dark .imu-file-input::-webkit-file-upload-button {
  background-color: rgba(22, 93, 255, 0.28) !important;
  color: #93c5fd !important;
  border: 1px solid rgba(96, 165, 250, 0.4) !important;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-right: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
html.dark .bg-gray-50\/80 {
  background-color: rgba(30, 41, 59, 0.92) !important;
  border-left-color: rgba(96, 165, 250, 0.55) !important;
}
html.dark .imu-card .bg-gray-50\/80 .text-gray-600,
html.dark .imu-card .bg-gray-50\/80 .text-gray-700 {
  color: #cbd5e1 !important;
}
html.dark .imu-card code.bg-gray-200\/80,
html.dark .imu-card .bg-gray-200\/80 {
  background-color: rgba(51, 65, 85, 0.95) !important;
  color: #e2e8f0 !important;
}
/* IMU 大标题在 main 外 */
html.dark .text-center.max-w-3xl.mx-auto h2.bg-clip-text.text-transparent {
  background-image: linear-gradient(to right, #e2e8f0, #93c5fd, #e2e8f0) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
}
/* 分段分析结果子卡片 */
html.dark #segmented-analysis-section > .bg-white.rounded-2xl {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.35) !important;
}
html.dark #segmented-analysis-section .bg-gradient-to-br.from-white.to-gray-50 {
  background-image: none !important;
  background-color: #1e293b !important;
  border-color: #475569 !important;
}
html.dark #segmented-analysis-section .border-2.border-gray-200.rounded-xl.p-6:hover {
  border-color: rgba(22, 93, 255, 0.45) !important;
}
/* 您已上传的视频：覆盖页面内 .video-card { background: white } */
html.dark .video-card {
  background: #1e293b !important;
  border-color: #475569 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.35) !important;
}
html.dark .video-card:hover {
  border-color: rgba(22, 93, 255, 0.55) !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4) !important;
}
html.dark .video-card h4.text-gray-900 {
  color: #f1f5f9 !important;
}
html.dark .video-card .text-gray-600 {
  color: #94a3b8 !important;
}
html.dark .video-card .border-gray-200 {
  border-color: #334155 !important;
}

/* ========== 训练计划展示区 plan-card-beautified ========== */
html.dark .plan-section-warmup {
  background: linear-gradient(135deg, rgba(154, 52, 18, 0.35) 0%, rgba(30, 41, 59, 0.98) 55%, #1e293b 100%) !important;
  border-color: rgba(251, 146, 60, 0.45) !important;
}
html.dark .plan-section-tech {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.38) 0%, rgba(30, 41, 59, 0.98) 55%, #1e293b 100%) !important;
  border-color: rgba(52, 211, 153, 0.4) !important;
}
html.dark .plan-section-main {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.45) 0%, rgba(30, 41, 59, 0.98) 55%, #1e293b 100%) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
}
html.dark .plan-section-cooldown {
  background: linear-gradient(135deg, rgba(12, 74, 110, 0.42) 0%, rgba(30, 41, 59, 0.98) 55%, #1e293b 100%) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}
html.dark .plan-main-set-item {
  background: rgba(15, 23, 42, 0.75) !important;
  border-left-color: #60a5fa !important;
  color: #e2e8f0 !important;
}
html.dark .plan-card-beautified .text-slate-800,
html.dark .plan-card-beautified .text-slate-700,
html.dark .plan-card-beautified .text-slate-600 {
  color: #e2e8f0 !important;
}
html.dark .plan-card-beautified .text-slate-600.text-sm {
  color: #cbd5e1 !important;
}
html.dark .plan-card-beautified .bg-slate-50\/80 {
  background-color: rgba(30, 41, 59, 0.9) !important;
  border-color: #475569 !important;
}
/* 顶部标签徽章（中等强度等） */
html.dark .bg-amber-50 {
  background-color: rgba(245, 158, 11, 0.2) !important;
}
html.dark .bg-sky-50 {
  background-color: rgba(14, 165, 233, 0.18) !important;
}
html.dark .text-sky-800 {
  color: #7dd3fc !important;
}
html.dark .bg-violet-50 {
  background-color: rgba(139, 92, 246, 0.2) !important;
}
html.dark .text-violet-800 {
  color: #c4b5fd !important;
}
html.dark .text-emerald-800 {
  color: #6ee7b7 !important;
}
html.dark .plan-card-beautified [class*="border-amber-200"],
html.dark .plan-card-beautified [class*="border-sky-200"],
html.dark .plan-card-beautified [class*="border-emerald-200"],
html.dark .plan-card-beautified [class*="border-violet-200"] {
  border-color: rgba(148, 163, 184, 0.35) !important;
}
/* 卡片轮播指示点 */
html.dark .plan-indicator-dots .dot {
  background: #475569 !important;
}
html.dark .plan-indicator-dots .dot.active {
  background: #60a5fa !important;
}
