:root {
    --primary: #00a2ff;
    --secondary: #00d9a6;
    --accent: #ff6b6b;
    --success: #4caf50;
    --warning: #ff9800;
    --info: #2196f3;
    --english: #4285f4;
    --chinese: #ea4335;
    --math: #fbbc05;
    --pe: #34a853;
    --science: #9b59b6;
    --music: #ff6b9d;
    --dark: #0a1929;
    --darker: #051321;
    --card-bg: rgba(15, 35, 55, 0.7);
    --text: #ffffff;
    --text-secondary: #a0aec0;
    --transition: all 0.3s ease;
    --bg-color: #0a1929;
    --text-color: #ffffff;
    --card-bg-color: rgba(15, 35, 55, 0.7);
    /* 统一边框色系 — 柔和蓝灰调 */
    --border-subtle: rgba(148, 180, 210, 0.08);
    --border-card:  rgba(148, 180, 210, 0.15);
    --border-accent: rgba(130, 185, 225, 0.22);
    --border-nav:   rgba(130, 185, 225, 0.18);
}

/* 浅色主题变量 */
.light-theme {
    --primary: #0078d4;
    --secondary: #00bfae;
    --accent: #ff6b6b;
    --success: #43a047;
    --warning: #ff9800;
    --info: #1976d2;
    --english: #4285f4;
    --chinese: #ea4335;
    --math: #fbbc05;
    --pe: #34a853;
    --science: #8e44ad;
    --music: #ff85b3;
    --dark: #f5f7fa;
    --darker: #e3e8ef;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #222222;
    --text-secondary: #6b7280;
    --bg-color: #f5f7fa;
    --text-color: #222222;
    --card-bg-color: rgba(255, 255, 255, 0.95);
    /* 统一边框色系 — 浅色主题 */
    --border-subtle: rgba(80, 100, 135, 0.07);
    --border-card:  rgba(80, 100, 135, 0.12);
    --border-accent: rgba(60, 110, 175, 0.16);
    --border-nav:   rgba(60, 110, 175, 0.13);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, var(--darker), var(--dark));
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 16px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: calc(100vh - 160px);
    display: flex;
    flex-direction: column;
}

/* 导航样式 */
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-nav);
    margin-bottom: 25px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 10px rgba(0, 162, 255, 0.4);
    cursor: pointer;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-link {
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    font-size: 14px;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: var(--transition);
}

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

.nav-link.active {
    background: rgba(0, 162, 255, 0.12);
}

.nav-link.active::before {
    width: 100%;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

/* 主页标题 */
.main-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 15px rgba(0, 162, 255, 0.25);
}

.subtitle {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

/* 设置页面样式 */
.settings-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: none;
}

.settings-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
}

.settings-card {
    background: var(--card-bg-color);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease;
}

.settings-card:hover {
    transform: translateY(-5px);
}

.settings-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
}

.settings-icon {
    font-size: 22px;
    width: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-color);
    padding: 10px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

/* Theme buttons container */
.theme-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

/* Theme button styles */
.theme-button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-subtle);
    color: var(--text-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.theme-button:hover {
    background: rgba(0, 0, 0, 0.2);
}

.theme-button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.25);
}

/* 下拉选项样式 - 提高可读性 */
.form-control option {
    background: var(--card-bg-color);
    color: var(--text-color);
    padding: 8px 12px;
}

/* 下拉选项悬停效果 */
.form-control option:hover,
.form-control option:focus,
.form-control option:checked {
    background: var(--primary);
    color: white;
}

.range-slider {
    width: 100%;
    appearance: none;
    height: 6px;
    border-radius: 3px;
    background: var(--border-subtle);
    outline: none;
    margin: 10px 0;
}

.light-theme .range-slider {
    background: rgba(0, 0, 0, 0.2);
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px rgba(0, 162, 255, 0.25);
}

.slider-value {
    text-align: center;
    font-size: 16px;
    color: var(--primary);
    margin-top: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    margin-left: 10px;
}

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

.slider-round {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider-round:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider-round {
    background-color: var(--primary);
}

input:checked+.slider-round:before {
    transform: translateX(26px);
}

.control-label {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

/* 页脚样式 */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 12px;
    border-top: 1px solid var(--border-subtle);
}

/* 响应式设计 - 优化多设备适配 */
@media (max-width: 1200px) {
    .container {
        padding: 15px;
    }
}

@media (max-width: 1000px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
        padding: 10px 0;
        margin-bottom: 20px;
    }

    .nav-links {
        gap: 10px;
    }

    .nav-link {
        padding: 6px 12px;
        font-size: 13px;
    }

    .logo {
        font-size: 22px;
    }
}

@media (max-width: 800px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .card-controls {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 162, 255, 0.5);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 162, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 162, 255, 0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

.pulse {
    animation: pulse 2s infinite;
}

/* 页面切换 */
.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

/* 链接样式 */
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    width: 100%;
}


.card-controls {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 1;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(90deg, var(--primary), var(--info));
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.35);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(90deg, var(--success), var(--secondary));
    color: white;
}

.btn-success:hover {
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.5);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(90deg, var(--warning), var(--accent));
    color: white;
}

.btn-warning:hover {
    box-shadow: 0 0 15px rgba(255, 152, 0, 0.5);
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-accent);
}

.btn-secondary:hover {
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 162, 255, 0.2);
}

/* 进度容器 */
.progress-container {
    background: var(--card-bg-color);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid var(--border-card);
}

.progress-title {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    border: 1px solid var(--border-subtle);
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 5px;
}

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

.progress-bar-container {
    margin: 20px 0;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
}

.progress-bar {
    height: 12px;
    background: var(--border-subtle);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 10px;
    width: 0%;
    box-shadow: 0 0 10px rgba(0, 162, 255, 0.2);
    transition: width 0.5s ease;
}