:root {
        /* MONOCHROME LIGHT MODE BASE (Ink Style) - Softened Contrast */
        --bg-main: #ffffff; /* Pure White */
        --bg-card: #ffffff; /* Pure White */
        --text-main: #2d2d2d; /* 导航/界面主字色 */
        /* 数字教材正文：明显柔化（由 typora-jinxiu / .typora-content 显式引用，肉眼可见） */
        --text-reading: #333333;
        --text-muted: #666666; /* Neutral Gray */
        --border-color: #e5e5e5; /* Light Gray */
        
        /* SEMANTIC VARIABLES - LIGHT MODE */
        --sidebar-active-bg: #264783;
        --sidebar-active-text: #ffffff;
        --logo-color: #264783;
        
        /* 课程卡片主标题 hover（与「上新价」等区分，深蓝灰） */
        --course-card-title-hover: #1E2D44;

        /*主题强调色（与课程卡片「上新价」一致；后续可统一替换原紫色强调，并视情况与 --brand-* 对齐） */
        --theme-emphasis: #264783;
        /* 铺在 --theme-emphasis 上的图标/文字（浅色模式：深蓝底用白字） */
        --theme-emphasis-foreground: #ffffff;

        /* 新用户欢迎券：绛红主色及票面层级 */
        --welcome-coupon-accent: #8F302C;
        --welcome-coupon-accent-foreground: #ffffff;
        --welcome-coupon-soft: #f6eeee;
        --welcome-coupon-border: #ddc1c0;
        --welcome-coupon-muted: #8F302C;

        /* Brand Colors */
        --brand-500: #264783;
        --brand-600: #1d3663;
        --brand-glow: rgba(38, 71, 131, 0.2);

        /* 成就模块勋章金：墨染成金（徽章金环、进度渐变、解锁高光） */
        --accent-gold: #c9a227;
        --accent-gold-soft: rgba(201, 162, 39, 0.14);
        
        /* Custom Colors */
        --color-blue: #264783;
        --color-purple: #333333;
        --color-green: #666666;
      }

      /* DARK MODE BASE (Future/Cyber Style) */
      .dark {
        /* Revert to Dark Palette */
        --bg-main: #0f172a; /* Slate 900 - 统一全站底色 */
        --bg-card: #0f172a; /* Slate 900 */
        --text-main: #cbd5e1; /* Slate 300 - 更柔和不刺眼 */
        --text-reading: #a1a1aa; /* Zinc 400 - 阅读正文大幅降低亮度，减缓视觉疲劳 */
        --text-muted: #64748b; /* Slate 500 */
        --border-color: #1e293b; /* Slate 800 */
        
        /* SEMANTIC VARIABLES - DARK MODE */
        --theme-emphasis: #8eb0e0;
        /* 铺在 --theme-emphasis 上的图标/文字（深色模式：浅青蓝底用深字） */
        --theme-emphasis-foreground: #0f172a;

        --welcome-coupon-accent: #8F302C;
        --welcome-coupon-accent-foreground: #ffffff;
        --welcome-coupon-soft: rgba(143, 48, 44, 0.22);
        --welcome-coupon-border: rgba(194, 104, 99, 0.55);
        --welcome-coupon-muted: #e2aaa7;

        --sidebar-active-bg: var(--theme-emphasis);
        --sidebar-active-text: var(--theme-emphasis-foreground);
        --logo-color: var(--theme-emphasis);

        --course-card-title-hover: #1E2D44;

        --brand-500: #8eb0e0;
        --brand-600: #7a9ccb;
        --brand-glow: rgba(142, 176, 224, 0.35);

        /* 成就模块勋章金：深色下更亮的金 */
        --accent-gold: #e5c76b;
        --accent-gold-soft: rgba(201, 162, 39, 0.18);
        
        /* Custom Colors */
        --color-blue: #50b7f2;
        --color-purple: #7dd3fc; /* 历史命名保留；实为青蓝辅色，避免紫调 */
        --color-green: #67ce8e;
      }

      /* Specific Theme Overrides (Optional nuance) */
      .theme-neon.dark {
        --brand-500: #93c5fd;
        --logo-color: #93c5fd;
      }
      .theme-zen.dark {
        --brand-500: #fca5a5;
        --sidebar-active-bg: #ef4444;
        --sidebar-active-text: #0f172a;
        --logo-color: #fca5a5;
      }
      .theme-crimson.dark {
        --brand-500: #ff1a1a;
        --sidebar-active-bg: #dc2626;
        --sidebar-active-text: #0f172a;
        --logo-color: #ff1a1a;
      }

      /* Recharts Tooltip Customization */
      .recharts-tooltip-cursor {
        fill: var(--brand-glow) !important;
        opacity: 0.2;
      }

      /* Scrollbar */
      ::-webkit-scrollbar { width: 6px; height: 6px; }
      ::-webkit-scrollbar-track { background: transparent; }
      ::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
      ::-webkit-scrollbar-thumb:hover { background: var(--brand-500); }

      .legacy-browser-warning {
        display: none;
        min-height: 100vh;
        width: 100%;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: #f6f7f9;
        color: #2d2d2d;
        color: var(--text-main, #2d2d2d);
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
        text-align: center;
      }

      .legacy-browser-warning__panel {
        position: relative;
        display: flex;
        width: 440px;
        max-width: calc(100vw - 48px);
        height: 560px;
        max-height: calc(100vh - 48px);
        min-height: 440px;
        box-sizing: border-box;
        align-items: center;
        justify-content: center;
      }

      .legacy-browser-warning__panel::before,
      .legacy-browser-warning__panel::after {
        position: absolute;
        width: 72px;
        height: 72px;
        box-sizing: border-box;
        content: "";
      }

      .legacy-browser-warning__panel::before {
        top: 0;
        right: 0;
        border-top: 1px solid #cbd3dd;
        border-right: 1px solid #cbd3dd;
      }

      .legacy-browser-warning__panel::after {
        bottom: 0;
        left: 0;
        border-bottom: 1px solid #cbd3dd;
        border-left: 1px solid #cbd3dd;
      }

      .legacy-browser-warning__brand {
        position: absolute;
        bottom: 40px;
        left: 40px;
        display: flex;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        border: 0;
        background: transparent;
      }

      .legacy-browser-warning__brand img {
        display: block;
        width: 42px;
        height: 42px;
      }

      .legacy-browser-warning__rule {
        position: absolute;
        top: 40px;
        right: 40px;
        display: block;
        width: 24px;
        height: 3px;
        background: #b65e47;
      }

      .legacy-browser-warning__title {
        display: block;
        width: 188px;
        height: 244px;
        margin: 0;
        color: #3f4854;
        font-family: "Songti SC", STSong, SimSun, serif;
        font-size: 25px;
        font-weight: 400;
        line-height: 2.15;
        letter-spacing: 0;
        text-align: start;
        -ms-writing-mode: tb-rl;
        -webkit-writing-mode: vertical-rl;
        writing-mode: vertical-rl;
        -webkit-text-orientation: mixed;
        text-orientation: mixed;
      }

      .legacy-browser-warning__action {
        color: #1d3663;
        color: var(--brand-600, #1d3663);
        font-weight: 600;
      }

      .dark .legacy-browser-warning {
        background: #0b1220;
      }

      .dark .legacy-browser-warning__brand {
        background: transparent;
      }

      .dark .legacy-browser-warning__brand img {
        filter: brightness(0) invert(1);
        opacity: 0.78;
      }

      .dark .legacy-browser-warning__panel::before,
      .dark .legacy-browser-warning__panel::after {
        border-color: #334155;
      }

      .dark .legacy-browser-warning__rule {
        background: #d58a74;
      }

      .dark .legacy-browser-warning__title {
        color: #b9c3d0;
      }

      .legacy-browser-warning-active #root {
        display: none !important;
      }

      body.legacy-browser-warning-active {
        margin: 0;
      }

      @media (max-width: 480px) {
        .legacy-browser-warning {
          padding: 20px;
        }

        .legacy-browser-warning__panel {
          width: 320px;
          max-width: calc(100vw - 40px);
          height: 540px;
          max-height: calc(100vh - 40px);
          min-height: 440px;
        }

        .legacy-browser-warning__panel::before,
        .legacy-browser-warning__panel::after {
          width: 56px;
          height: 56px;
        }

        .legacy-browser-warning__brand {
          bottom: 28px;
          left: 28px;
          width: 44px;
          height: 44px;
        }

        .legacy-browser-warning__brand img {
          width: 38px;
          height: 38px;
        }

        .legacy-browser-warning__rule {
          top: 28px;
          right: 28px;
          width: 22px;
        }

        .legacy-browser-warning__title {
          width: 172px;
          height: 228px;
          font-size: 23px;
          line-height: 2.1;
        }
      }

      @media (max-height: 640px) {
        .legacy-browser-warning {
          padding: 16px;
        }

        .legacy-browser-warning__panel {
          width: 320px;
          max-width: calc(100vw - 32px);
          height: calc(100vh - 32px);
          max-height: none;
          min-height: 0;
        }

        .legacy-browser-warning__brand {
          bottom: 24px;
          left: 24px;
          width: 38px;
          height: 38px;
        }

        .legacy-browser-warning__brand img {
          width: 34px;
          height: 34px;
        }

        .legacy-browser-warning__rule {
          top: 24px;
          right: 24px;
          width: 20px;
        }

        .legacy-browser-warning__title {
          width: 156px;
          height: 196px;
          font-size: 20px;
          line-height: 2;
        }
      }

      /* Bottom Notification Bar - Optimize for Dark Mode */
      /* 通用白色边框覆盖 - 解决所有白色边框问题 */
      .dark * {
        --dark-border-color: rgba(255, 255, 255, 0.15) !important;
      }
      
      /* 覆盖各种白色边框情况 */
      .dark [style*="border-color: white"],
      .dark [style*="border: white"],
      .dark [style*="border: #ffffff"],
      .dark [style*="border: #fff"],
      .dark [style*="border-left-color: white"],
      .dark [style*="border-right-color: white"],
      .dark [style*="border-top-color: white"],
      .dark [style*="border-bottom-color: white"] {
        border-color: var(--dark-border-color) !important;
        border-left-color: var(--dark-border-color) !important;
        border-right-color: var(--dark-border-color) !important;
        border-top-color: var(--dark-border-color) !important;
        border-bottom-color: var(--dark-border-color) !important;
      }
      
      /* 覆盖各种白色边框宽度情况 */
      .dark [style*="border: 1px solid white"],
      .dark [style*="border: 2px solid white"],
      .dark [style*="border: 1px solid #ffffff"],
      .dark [style*="border: 2px solid #ffffff"] {
        border-color: var(--dark-border-color) !important;
      }
      
      /* 针对底部固定通知栏的特殊处理 */
      /* 根据截图特征：固定在底部，包含Sparkles图标和"灵犀洞察"文本 */
      .dark div[style*="position: fixed"],
      .dark div[style*="position: absolute"],
      .dark div[style*="bottom: 0"],
      .dark [style*="border: 2px solid white"],
      .dark [style*="border: 1px solid white"] {
        border-color: var(--dark-border-color) !important;
      }
      
      /* 针对灵犀洞察文本的特殊处理 */
      .dark :contains("灵犀洞察") {
        border-color: var(--dark-border-color) !important;
      }
