/**
 * 课程平台通用样式文件
 */

/* === 设计令牌：中性色 + 主题色派生 + 语义色（统一变量体系） === */
:root {
    /* --- 中性色（Slate 系，不随主题变化） --- */
    --color-bg-page: #f8fafc;
    --color-bg-surface: #ffffff;
    --color-bg-hover: #f1f5f9;
    --color-bg-muted: #f8fafc;
    --color-bg-inverse: #0f172a;
    --color-bg-inverse-soft: #1e293b;
    --color-text-primary: #1e293b;
    --color-text-secondary: #64748b;
    --color-text-muted: #94a3b8;
    --color-text-disabled: #cbd5e1;
    --color-text-on-inverse: #f1f5f9;
    --color-border: #e2e8f0;
    --color-border-hover: #cbd5e1;
    --color-border-muted: #f1f5f9;

    /* --- 主题色派生层次（自动跟随主题色，rgba 派生） --- */
    --theme-primary-bg: rgba(var(--theme-primary-rgb), 0.05);
    --theme-primary-bg-hover: rgba(var(--theme-primary-rgb), 0.1);
    --theme-primary-bg-strong: rgba(var(--theme-primary-rgb), 0.15);
    --theme-primary-border: rgba(var(--theme-primary-rgb), 0.2);
    --theme-primary-border-strong: rgba(var(--theme-primary-rgb), 0.35);
    --theme-accent-bg: rgba(var(--theme-accent-rgb), 0.05);
    --theme-accent-bg-hover: rgba(var(--theme-accent-rgb), 0.1);
    --theme-accent-border: rgba(var(--theme-accent-rgb), 0.2);

    /* --- 语义色（全局统一，用于真正的语义场景：风险等级、成功/失败/警告） --- */
    --color-danger: #dc2626;
    --color-danger-rgb: 220, 38, 38;
    --color-danger-bg: rgba(220, 38, 38, 0.05);
    --color-danger-bg-hover: rgba(220, 38, 38, 0.1);
    --color-danger-border: rgba(220, 38, 38, 0.2);
    --color-danger-text: #991b1b;

    --color-success: #16a34a;
    --color-success-rgb: 22, 163, 74;
    --color-success-bg: rgba(22, 163, 74, 0.05);
    --color-success-bg-hover: rgba(22, 163, 74, 0.1);
    --color-success-border: rgba(22, 163, 74, 0.2);
    --color-success-text: #15803d;

    --color-warning: #d97706;
    --color-warning-rgb: 217, 119, 6;
    --color-warning-bg: rgba(217, 119, 6, 0.05);
    --color-warning-bg-hover: rgba(217, 119, 6, 0.1);
    --color-warning-border: rgba(217, 119, 6, 0.2);
    --color-warning-text: #92400e;

    /* --- 阴影 & 圆角（多层阴影：环境光 + 关键光 + 接触阴影，中间层注入主题色 tint） --- */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.04), 0 0 0 0.5px rgba(var(--theme-primary-rgb), 0.02);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.03), 0 4px 8px rgba(0, 0, 0, 0.04), 0 8px 16px rgba(var(--theme-primary-rgb), 0.06);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, 0.03), 0 8px 16px rgba(0, 0, 0, 0.05), 0 16px 32px rgba(var(--theme-primary-rgb), 0.07);
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* === 个性化设置：主题色变量 === */
/* 默认：薄荷苏打 Mint Soda */
:root {
    --theme-primary: #2db48a;
    --theme-primary-rgb: 45, 180, 138;
    --theme-primary-dark: #1f9070;
    --theme-primary-darker: #156b52;
    --theme-accent: #6ee7b7;
    --theme-accent-rgb: 110, 231, 183;
    --theme-accent-light: #a7f3d0;
    --theme-accent-mid: #6ee7b7;
}

[data-theme="song"] {
    --theme-primary: #4a7c8a;
    --theme-primary-rgb: 74, 124, 138;
    --theme-primary-dark: #3a6470;
    --theme-primary-darker: #2a4c56;
    --theme-accent: #6b9aa8;
    --theme-accent-rgb: 107, 154, 168;
    --theme-accent-light: #a8c8d0;
    --theme-accent-mid: #8ab0bc;
}

[data-theme="morandi"] {
    --theme-primary: #6b7c93;
    --theme-primary-rgb: 107, 124, 147;
    --theme-primary-dark: #566883;
    --theme-primary-darker: #3d4d66;
    --theme-accent: #8b9db5;
    --theme-accent-rgb: 139, 157, 181;
    --theme-accent-light: #c4ccd6;
    --theme-accent-mid: #a3b3c8;
}

/* === 可爱配色 === */

[data-theme="sakura"] {
    --theme-primary: #db7193;
    --theme-primary-rgb: 219, 113, 147;
    --theme-primary-dark: #bc5478;
    --theme-primary-darker: #8a3a54;
    --theme-accent: #f0b5c8;
    --theme-accent-rgb: 240, 181, 200;
    --theme-accent-light: #f8d5e0;
    --theme-accent-mid: #f0b5c8;
}

[data-theme="blueberry"] {
    --theme-primary: #9080c8;
    --theme-primary-rgb: 144, 128, 200;
    --theme-primary-dark: #7563ab;
    --theme-primary-darker: #524078;
    --theme-accent: #c4b5e8;
    --theme-accent-rgb: 196, 181, 232;
    --theme-accent-light: #ddd5f4;
    --theme-accent-mid: #c4b5e8;
}

/* === 科技配色 === */

[data-theme="quantum"] {
    --theme-primary: #0ea5e9;
    --theme-primary-rgb: 14, 165, 233;
    --theme-primary-dark: #0284c7;
    --theme-primary-darker: #0c4a6e;
    --theme-accent: #6366f1;
    --theme-accent-rgb: 99, 102, 241;
    --theme-accent-light: #a5b4fc;
    --theme-accent-mid: #818cf8;
}

[data-theme="galaxy"] {
    --theme-primary: #ca8a04;
    --theme-primary-rgb: 202, 138, 4;
    --theme-primary-dark: #a16207;
    --theme-primary-darker: #713f12;
    --theme-accent: #fde047;
    --theme-accent-rgb: 253, 224, 71;
    --theme-accent-light: #fef08a;
    --theme-accent-mid: #fde047;
}

/* === 清新配色 === */

[data-theme="mint"] {
    --theme-primary: #2db48a;
    --theme-primary-rgb: 45, 180, 138;
    --theme-primary-dark: #1f9070;
    --theme-primary-darker: #156b52;
    --theme-accent: #6ee7b7;
    --theme-accent-rgb: 110, 231, 183;
    --theme-accent-light: #a7f3d0;
    --theme-accent-mid: #6ee7b7;
}

[data-theme="sage"] {
    --theme-primary: #7ba83d;
    --theme-primary-rgb: 123, 168, 61;
    --theme-primary-dark: #638a2f;
    --theme-primary-darker: #476822;
    --theme-accent: #bef264;
    --theme-accent-rgb: 190, 242, 100;
    --theme-accent-light: #d9f99d;
    --theme-accent-mid: #bef264;
}

/* Bootstrap 主题色覆盖 */
[data-theme] .bg-primary { background-color: var(--theme-primary) !important; }
[data-theme] .btn-primary { background-color: var(--theme-primary); border-color: var(--theme-primary); }
[data-theme] .btn-primary:hover { background-color: var(--theme-primary-dark); border-color: var(--theme-primary-dark); }
[data-theme] .text-primary { color: var(--theme-primary) !important; }

/* 页脚跟随主题色 —— 用主题深色变体替换 Bootstrap 固定黑色 */
[data-theme] footer.bg-dark {
    background-color: var(--theme-primary-darker) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14'%3E%3Cpath d='M0 14L14 0' fill='none' stroke='%23ffffff' stroke-width='1' stroke-opacity='0.035'/%3E%3C/svg%3E");
}
[data-theme] footer.bg-dark .text-secondary {
    color: rgba(255, 255, 255, 0.65) !important;
}
[data-theme] footer.bg-dark .border-secondary {
    border-color: rgba(255, 255, 255, 0.15) !important;
}

/* 手写体字体 */
[data-font="handwriting"] body {
    font-family: 'LXGW WenKai', 'KaiTi', 'STKaiti', '楷体', serif;
}

/* 站酷快乐体 */
[data-font="kuaiLe"] body {
    font-family: 'ZCOOL KuaiLe', 'Microsoft YaHei', 'PingFang SC', sans-serif;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', Arial, sans-serif;
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background-color: var(--color-bg-page);
    background-image:
        radial-gradient(circle at 20% 10%, rgba(var(--theme-primary-rgb), 0.03), transparent 50%),
        radial-gradient(circle at 80% 90%, rgba(var(--theme-primary-rgb), 0.025), transparent 50%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M60 0H0V60' fill='none' stroke='%23000' stroke-width='1' stroke-opacity='0.035'/%3E%3Cpath d='M30 0V60M0 30H60' fill='none' stroke='%23000' stroke-width='0.5' stroke-opacity='0.025'/%3E%3C/svg%3E");
    background-attachment: fixed;
}

/**
 * 自定义三行头部样式
 */
.custom-header {
    padding: 8px 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: visible;
    z-index: 9999;
}

.rain-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.header-row {
    display: flex;
    align-items: center;
}

.header-row-1 {
    padding: 4px 12px;
}

.logo-section {
    display: flex;
    align-items: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.logo-section:hover {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.header-title {
    letter-spacing: 1px;
}

.header-row-2 {
    padding: 8px 0;
    margin: 8px 0;
    position: relative;
}

.header-row-2::before,
.header-row-2::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18) 35%, rgba(255, 255, 255, 0.18) 65%, transparent);
}

.header-row-2::before {
    top: 0;
}

.header-row-2::after {
    bottom: 0;
}

.quote-section {
    font-size: 0.9rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 2px;
}

.quote-section .quote-mark {
    font-size: 1.1rem;
    font-family: Georgia, "Times New Roman", serif;
    font-style: normal;
    color: rgba(255, 255, 255, 0.85);
    vertical-align: middle;
    line-height: 1;
}

.quote-section .quote-open {
    margin-right: 0.4rem;
}

.quote-section .quote-close {
    margin-left: 0.4rem;
}

.quote-section .quote-divider {
    display: inline-block;
    width: 40px;
    height: 1px;
    background: rgba(255, 255, 255, 0.6);
    vertical-align: middle;
    margin: 0 10px;
}

/* 名言关闭状态：隐藏内容与上下分隔线，但保留占位 */
.header-row-2.quote-hidden .quote-section {
    visibility: hidden;
}

.header-row-2.quote-hidden::before,
.header-row-2.quote-hidden::after {
    display: none;
}

.header-row-3 {
    padding: 4px 12px;
    justify-content: space-between;
    align-items: center;
}

.time-section {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.menu-list>li {
    margin-left: 24px;
    position: relative;
}

.menu-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-link:hover {
    color: white;
    text-decoration: none;
}

/**
 * 导航下拉菜单样式
 */
.menu-dropdown>a {
    cursor: pointer;
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background-color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px 0;
    margin: 0;
    list-style: none;
    z-index: 99999;
    border: 1px solid var(--color-border);
}

.menu-dropdown:hover .dropdown-menu-custom {
    display: block;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-menu-custom li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--color-text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
}

.dropdown-menu-custom li a:hover {
    background-color: var(--color-bg-hover);
    color: var(--theme-primary);
    border-left-color: var(--theme-primary);
    padding-left: 17px;
}

.dropdown-menu-custom li a > i:first-child {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--theme-primary);
}

/**
 * Bootstrap navbar 适配 —— 保持原导航高度/布局/配色
 */
.header-row-3 .navbar {
    padding: 0;
}

.header-row-3 .navbar-nav {
    align-items: center;
    gap: 24px;
}

.header-row-3 .navbar-nav > .nav-item {
    position: relative;
}

.header-row-3 .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    padding: 4px 0;
    transition: color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-row-3 .navbar-nav .nav-link:hover,
.header-row-3 .navbar-nav .nav-link:focus {
    color: white;
}

@media (max-width: 768px) {
    .header-row-3 .navbar-nav {
        gap: 16px;
    }

    .header-row-3 .navbar-nav .nav-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .header-row-3 .navbar-nav {
        gap: 12px;
    }

    .header-row-3 .navbar-nav .nav-link {
        font-size: 0.8rem;
    }
}

main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

#courses {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    padding: 0 15px;
}

/**
 * 课程卡片样式
 */
.course-card {
    position: relative;
    overflow: visible;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-position 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    min-height: 240px;
    background-image:
        linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.08) 50%, transparent 70%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='1.2' fill='%23000' fill-opacity='0.035'/%3E%3C/svg%3E");
    background-size: 200% 100%, 20px 20px;
    background-position: 200% 0, 0 0;
    animation: fadeInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.course-card:nth-child(1) { animation-delay: 0.05s; }
.course-card:nth-child(2) { animation-delay: 0.1s; }
.course-card:nth-child(3) { animation-delay: 0.15s; }
.course-card:nth-child(4) { animation-delay: 0.2s; }
.course-card:nth-child(5) { animation-delay: 0.25s; }
.course-card:nth-child(6) { animation-delay: 0.3s; }

.course-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: var(--theme-primary);
    background-position: -100% 0, 0 0;
}

/* 卡片顶部高光线（hover 时显现） */
.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover::before {
    opacity: 1;
}

/**
 * 课程图标样式
 */
.course-icon {
    font-size: 32px;
    color: var(--theme-primary-dark);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-icon {
    transform: scale(1.1);
}

.course-card.coming-soon:hover .course-icon {
    transform: none;
}

/**
 * 课程描述样式
 */
.card-desc {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    margin-bottom: 0;
}

.course-fold {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    z-index: 10;
    border-top-right-radius: 12px;
    background: linear-gradient(225deg, var(--theme-primary) 0%, var(--theme-primary-dark) 40%, var(--theme-primary-darker) 100%);
    clip-path: polygon(100% 0, 0 0, 100% 100%);
    box-shadow: var(--shadow-sm);
}

/* 折痕线 - 已移除，避免干扰文字 */
.course-fold::after {
    display: none;
}

.course-fold span {
    position: absolute;
    top: 22px;
    left: 42px;
    transform: translate(-50%, -50%) rotate(45deg);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.card-highlight {
    color: var(--theme-primary-dark);
    font-weight: 600;
}

/**
 * 已上线课程卡片样式
 */
.course-icon-completed {
    animation: icon-glow 2s ease-in-out infinite;
}

@keyframes icon-glow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(var(--theme-primary-rgb), 0.3)); }
    50% { filter: drop-shadow(0 0 8px rgba(var(--theme-primary-rgb), 0.6)); }
}

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

.course-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.course-badge-completed {
    background: linear-gradient(135deg, var(--theme-primary-dark), var(--theme-primary-darker));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

.course-chapters {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    letter-spacing: 0.5px;
}

.course-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.course-tag {
    font-size: 0.7rem;
    color: #fff;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
    padding: 2px 8px;
    border-radius: var(--radius-md);
    transition: background 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover .course-tag {
    background: linear-gradient(135deg, var(--theme-primary-dark), var(--theme-primary-darker));
}

.course-card.coming-soon .course-tag {
    color: var(--color-text-muted);
    background: rgba(148, 163, 184, 0.1);
}

.course-card.coming-soon:hover .course-tag {
    background: rgba(148, 163, 184, 0.2);
}

.course-badge-soon {
    background: linear-gradient(135deg, var(--color-text-muted), var(--color-text-secondary));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: var(--radius-md);
}

/**
 * 自定义滚动条样式
 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-hover);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-disabled);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-muted);
}

/**
 * 未上线课程卡片样式 —— 结构与已上线一致，仅通过透明度区分状态
 */
.course-card.coming-soon {
    opacity: 0.55;
    cursor: default;
}

.course-card.coming-soon:hover {
    transform: none;
    border-color: var(--color-border);
    box-shadow: none;
}

.course-card.coming-soon .course-icon {
    color: var(--theme-primary-dark);
}

.course-card.coming-soon .course-tag {
    color: #fff;
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-primary-dark));
}

.course-card.coming-soon .course-badge-soon {
    background: linear-gradient(135deg, var(--theme-primary-dark), var(--theme-primary-darker));
    color: #fff;
}

/**
 * 即将上线提示 toast
 */
.coming-soon-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-text-primary);
    color: #fff;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 99999;
    font-size: 0.95rem;
    align-items: center;
}

.coming-soon-toast .toast-body {
    display: flex;
    align-items: center;
}

.coming-soon-toast.toast-fade-in {
    animation: toastFadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.coming-soon-toast.toast-fade-out {
    animation: toastFadeOut 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes toastFadeIn {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
    to   { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes toastFadeOut {
    from { opacity: 1; transform: translate(-50%, -50%); }
    to   { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
}

/**
 * 未上线课程角标（右上角时钟图标）
 */
.coming-soon-corner {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    color: var(--color-text-disabled);
    width: auto !important;
    text-align: center;
    line-height: 1;
}

/**
 * 导航下拉菜单中未上线课程样式
 */
.dropdown-menu-custom li a.coming-soon-link {
    color: var(--color-text-secondary);
    cursor: default;
}

.dropdown-menu-custom li a.coming-soon-link:hover {
    background-color: var(--color-bg-hover);
    color: var(--color-text-secondary);
    border-left-color: transparent;
    padding-left: 20px;
}

.dropdown-menu-custom li a.coming-soon-link > i:first-child {
    color: var(--color-text-disabled);
}

.course-card.coming-soon {
    position: relative;
}

.course-card.coming-soon .coming-soon-corner {
    top: 12px;
    right: 12px;
    font-size: 1.05rem;
}

.dropdown-menu-custom {
    min-width: 200px;
}

/**
 * 关于我们 弹窗
 */
.about-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
}

.about-modal-backdrop.about-modal-show {
    opacity: 1;
    visibility: visible;
}

.about-modal {
    position: relative;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-modal-backdrop.about-modal-show .about-modal {
    transform: scale(1);
}

.about-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.about-modal-close:hover {
    background: var(--color-border);
    color: var(--color-text-primary);
}

.about-modal-header {
    text-align: center;
    padding: 32px 24px 20px;
    border-bottom: 1px solid var(--color-border-muted);
}

.about-modal-icon {
    font-size: 2.5rem;
    color: var(--theme-primary);
    margin-bottom: 8px;
    display: block;
}

.about-modal-logo {
    height: 48px;
    margin-bottom: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.about-modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 4px;
}

.about-modal-header p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin: 0;
}

.about-modal-body {
    padding: 20px 28px;
}

.about-section {
    margin-bottom: 20px;
}

.about-section:last-child {
    margin-bottom: 0;
}

.about-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.about-section h4 i {
    color: var(--theme-primary);
    font-size: 0.9rem;
}

.about-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-section ul li {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    padding-left: 16px;
    position: relative;
}

.about-section ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.65em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #000;
}

.about-section ul li strong {
    color: var(--color-text-primary);
}

.about-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.about-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.about-qr-img {
    width: 140px;
    height: 140px;
    border-radius: 8px;
    object-fit: cover;
}

.about-contact > span {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.about-contact > span i {
    color: var(--theme-primary);
}

.about-contact span {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.about-contact span i {
    color: var(--theme-primary);
}

.about-section ul li strong {
    color: var(--color-text-secondary);
    font-weight: 400;
}

.about-modal-footer {
    text-align: center;
    padding: 14px 24px;
    border-top: 1px solid var(--color-border-muted);
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

@media (max-width: 576px) {
    .about-modal {
        max-width: 95%;
        max-height: 80vh;
    }

    .about-modal-header {
        padding: 24px 16px 16px;
    }

    .about-modal-body {
        padding: 16px 20px;
    }
}

@media print {
    .about-modal-backdrop {
        display: none !important;
    }
}

@media print {
    .coming-soon-toast {
        display: none !important;
    }
}
@media (max-width: 768px) {
    .course-icon {
        font-size: 28px;
    }

    .header-title {
        font-size: 1rem;
    }

    .quote-section {
        font-size: 0.75rem;
        letter-spacing: 1px;
    }

    .quote-section .quote-divider {
        width: 24px;
        margin: 0 6px;
    }

    .menu-list li {
        margin-left: 16px;
    }

    .menu-link {
        font-size: 0.85rem;
    }
}

@media (max-width: 576px) {
    .header-row-2 {
        display: none;
    }

    .header-title {
        font-size: 0.9rem;
    }

    .menu-list li {
        margin-left: 12px;
    }

    .menu-link {
        font-size: 0.8rem;
    }
}

/**
 * 个性化设置 —— 齿轮按钮 + 右侧抽屉
 */

/* 齿轮按钮 */
.settings-trigger {
    font-size: 1.15rem;
    padding: 0.25rem 0.5rem !important;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-trigger:hover {
    transform: rotate(60deg);
}

/* 遮罩层 */
.settings-offcanvas-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-offcanvas-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* 抽屉面板 */
.settings-offcanvas {
    position: fixed;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 85vw;
    height: 100%;
    background: #fff;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
}

.settings-offcanvas.show {
    transform: translateX(0);
}

/* 抽屉头部 */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-bg-page);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20'%3E%3Ccircle cx='10' cy='10' r='1.2' fill='%23000' fill-opacity='0.035'/%3E%3C/svg%3E");
}

.settings-header h5 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-header h5 i {
    color: var(--theme-primary);
}

.settings-close {
    background: none;
    border: none;
    font-size: 1rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
}

/* 抽屉内容区 */
.settings-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.settings-section {
    margin-bottom: 24px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 10px;
}

.settings-label i {
    color: var(--theme-primary);
    font-size: 0.9rem;
}

/* 单选选项 */
.settings-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.settings-options-inline {
    flex-direction: row;
    gap: 8px;
}

.settings-options-inline .settings-option {
    flex: 1;
    justify-content: center;
}

.settings-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.settings-option:hover {
    background: var(--color-bg-page);
}

.settings-option.selected {
    background: rgba(var(--theme-primary-rgb), 0.06);
    border-color: rgba(var(--theme-primary-rgb), 0.2);
}

.settings-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--theme-primary);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    margin: 0;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-option input[type="radio"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--theme-primary);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-option input[type="radio"]:checked::after {
    transform: translate(-50%, -50%) scale(1);
}

.settings-option input[type="radio"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--theme-primary-rgb), 0.15);
}

.settings-option label {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-primary);
    cursor: pointer;
    flex: 1;
}

/* 主题色选择 */
.settings-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.theme-group-label {
    grid-column: 1 / -1;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 8px 0 3px;
    border-bottom: 1px solid var(--color-border-muted);
    margin-bottom: 2px;
    letter-spacing: 0.08em;
    text-align: center;
}

.theme-swatch {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid var(--color-border);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-swatch:hover {
    border-color: var(--color-border-hover);
}

.theme-swatch.selected {
    border-color: var(--swatch-color, var(--theme-primary));
    background: var(--color-bg-page);
}

.theme-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.theme-name {
    font-size: 0.82rem;
    color: var(--color-text-primary);
    font-weight: 500;
}

/* 抽屉底部 */
.settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--color-border);
    background: var(--color-bg-page);
}

.settings-apply-btn {
    min-width: 80px;
}

/* 手写体预览 */
[data-font="handwriting"] .settings-option label[for="font-handwriting"] {
    font-family: 'LXGW WenKai', 'KaiTi', 'STKaiti', serif;
}

/* 站酷快乐体预览 */
[data-font="kuaiLe"] .settings-option label[for="font-kuaiLe"] {
    font-family: 'ZCOOL KuaiLe', sans-serif;
}