/* ========================================================================
   style.css —多主题色系基底样式
   所有颜色通过 CSS 变量控制，由 theme-switcher.js 动态切换
   ======================================================================== */

/*============================================================
   默认主题：秩序蓝（蓝白色系）
   ============================================================ */
:root,
[data-theme="blue"] {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --primary-light: #4da3ff;
    --primary-soft: rgba(0, 123, 255, 0.12);
    --primary-glow: rgba(0, 123, 255, 0.30);
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --bg-color: #f0f4f8;
    --bg-deep: #e8eef5;
    --bg-surface: #f0f4f8;
    --card-bg: #ffffff;
    --text-primary: #1a2332;
    --text-secondary: #5a6a7e;
    --text-heading: #1a2332;
    --text-muted: #8899aa;
    --border-color: #d0dae5;
    --border-hover: rgba(0, 123, 255, 0.4);
    --hover-bg: #e2eaf3;
    --selected-bg: #cce5ff;
    --shadow: 0 2px 8px rgba(0, 40, 100, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 40, 100, 0.12);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #4facfe 100%);
    --gradient-progress: linear-gradient(90deg, #007bff, #28a745);
    --body-bg: linear-gradient(135deg, #dfe9f5 0%, #c3d5e8 100%);
    --accent: #007bff;
    --accent-light: #4da3ff;
    --accent-soft: rgba(0, 123, 255, 0.12);
    --accent-glow: rgba(0, 123, 255, 0.30);

    /* 特色装饰 */
    --decor-border-style: solid;
    --decor-border-radius: 8px;
    --decor-card-border-width: 1px;
    --decor-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,'Helvetica Neue', Arial, sans-serif;
    --decor-glow-filter: none;
    --decor-bg-pattern: none;
    --nav-bg: rgba(240, 244, 248, 0.92);
}

/* ============================================================
   神秘紫（紫色、黑色与少量暗金色）
   ============================================================ */
[data-theme="purple"] {
    --primary-color: #7c5cfc;
    --primary-dark: #5a3dd6;
    --primary-light: #9b7ffd;
    --primary-soft: rgba(124, 92, 252, 0.12);
    --primary-glow: rgba(124, 92, 252, 0.30);
    --secondary-color: #706d82;
    --success-color: #c9a84c;
    --bg-color: #13112a;
    --bg-deep: #0a0a1a;
    --bg-surface: #0f0f23;
    --card-bg: #1a1835;
    --text-primary: #eae8f4;
    --text-secondary: #b0adc0;
    --text-heading: #eae8f4;
    --text-muted: #706d82;
    --border-color: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(124, 92, 252, 0.40);
    --hover-bg: #252345;
    --selected-bg: rgba(124, 92, 252, 0.25);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.40);
    --gradient-primary: linear-gradient(135deg, #7c5cfc 0%, #a855f7 100%);
    --gradient-progress: linear-gradient(90deg, #7c5cfc, #c9a84c);
    --body-bg: linear-gradient(135deg, #0a0a1a 0%, #1a1040 100%);
    --accent: #7c5cfc;
    --accent-light: #9b7ffd;
    --accent-soft: rgba(124, 92, 252, 0.12);
    --accent-glow: rgba(124, 92, 252, 0.30);

    --decor-border-style: solid;
    --decor-border-radius: 12px;
    --decor-card-border-width: 1px;
    --decor-font-family: 'Georgia', 'Times New Roman', serif;
    --decor-glow-filter: drop-shadow(0 0 6px rgba(124, 92, 252, 0.3));
    --decor-bg-pattern: radial-gradient(ellipse at 20% 50%, rgba(124, 92, 252, 0.04) 0%, transparent 60%);
    --nav-bg: rgba(10, 10, 26, 0.88);
}

/* ============================================================
   感性绿（绿色、白色、少量明黄色）
   ============================================================ */
[data-theme="green"] {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --primary-soft: rgba(16, 185, 129, 0.12);
    --primary-glow: rgba(16, 185, 129, 0.30);
    --secondary-color: #6b7c6e;
    --success-color: #f59e0b;
    --bg-color: #f0faf4;
    --bg-deep: #e6f7ed;
    --bg-surface: #f0faf4;
    --card-bg: #ffffff;
    --text-primary: #1a3328;
    --text-secondary: #4a7060;
    --text-heading: #1a3328;
    --text-muted: #7fa892;
    --border-color: #c3e6d2;
    --border-hover: rgba(16, 185, 129, 0.40);
    --hover-bg: #d6f0e2;
    --selected-bg: #bbf0d4;
    --shadow: 0 2px 8px rgba(0, 80, 50, 0.08);
    --shadow-lg: 0 4px 20px rgba(0, 80, 50, 0.12);
    --gradient-primary: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --gradient-progress: linear-gradient(90deg, #10b981, #f59e0b);
    --body-bg: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-soft: rgba(16, 185, 129, 0.12);
    --accent-glow: rgba(16, 185, 129, 0.30);

    --decor-border-style: solid;
    --decor-border-radius: 10px;
    --decor-card-border-width: 1px;
    --decor-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --decor-glow-filter: none;
    --decor-bg-pattern: radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
    --nav-bg: rgba(240, 250, 244, 0.92);
}

/* ============================================================
   活力橙（明黄色、橙色、少量红色，体现活力张力与动感）
   ============================================================ */
[data-theme="orange"] {
    --primary-color: #f97316;
    --primary-dark: #ea580c;
    --primary-light: #fb923c;
    --primary-soft: rgba(249, 115, 22, 0.12);
    --primary-glow: rgba(249, 115, 22, 0.35);
    --secondary-color: #92400e;
    --success-color: #ef4444;
    --bg-color: #fff8f0;
    --bg-deep: #fef3e2;
    --bg-surface: #fff8f0;
    --card-bg: #ffffff;
    --text-primary: #431407;
    --text-secondary: #9a3412;
    --text-heading: #431407;
    --text-muted: #c2734b;
    --border-color: #fcd9b6;
    --border-hover: rgba(249, 115, 22, 0.45);
    --hover-bg: #fde6cc;
    --selected-bg: #fed7aa;
    --shadow: 0 2px 8px rgba(150, 60, 0, 0.08);
    --shadow-lg: 0 4px 20px rgba(150, 60, 0, 0.15);
    --gradient-primary: linear-gradient(135deg, #f97316 0%, #eab308 100%);
    --gradient-progress: linear-gradient(90deg, #f97316, #ef4444);
    --body-bg: linear-gradient(135deg, #fef3c7 0%, #fdba74 100%);
    --accent: #f97316;
    --accent-light: #fb923c;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --accent-glow: rgba(249, 115, 22, 0.35);

    --decor-border-style: solid;
    --decor-border-radius: 10px;
    --decor-card-border-width: 2px;
    --decor-font-family: 'Trebuchet MS', 'Arial Black', sans-serif;
    --decor-glow-filter: none;
    --decor-bg-pattern: none;
    --nav-bg: rgba(255, 248, 240, 0.92);
}

/* ============================================================
   商业灰（简洁、清晰、立体感，边界清晰）
   ============================================================ */
[data-theme="gray"] {
    --primary-color: #4b5563;
    --primary-dark: #374151;
    --primary-light: #6b7280;
    --primary-soft: rgba(75, 85, 99, 0.10);
    --primary-glow: rgba(75, 85, 99, 0.20);
    --secondary-color: #9ca3af;
    --success-color: #059669;
    --bg-color: #f9fafb;
    --bg-deep: #f3f4f6;
    --bg-surface: #f9fafb;
    --card-bg: #ffffff;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-heading: #111827;
    --text-muted: #9ca3af;
    --border-color: #d1d5db;
    --border-hover: rgba(75, 85, 99, 0.40);
    --hover-bg: #f3f4f6;
    --selected-bg: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
    --gradient-primary: linear-gradient(135deg, #374151 0%, #6b7280 100%);
    --gradient-progress: linear-gradient(90deg, #4b5563, #059669);
    --body-bg: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    --accent: #4b5563;
    --accent-light: #6b7280;
    --accent-soft: rgba(75, 85, 99, 0.10);
    --accent-glow: rgba(75, 85, 99, 0.20);

    --decor-border-style: solid;
    --decor-border-radius: 6px;
    --decor-card-border-width: 1px;
    --decor-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --decor-glow-filter: none;
    --decor-bg-pattern: none;
    --nav-bg: rgba(249, 250, 251, 0.95);
}

/* ============================================================爱恋粉（粉色为主，凸显少女心和暧昧感）
   ============================================================ */
[data-theme="pink"] {
    --primary-color: #ec4899;
    --primary-dark: #db2777;
    --primary-light: #f472b6;
    --primary-soft: rgba(236, 72, 153, 0.12);
    --primary-glow: rgba(236, 72, 153, 0.30);
    --secondary-color: #a8556e;
    --success-color: #f9a8d4;
    --bg-color: #fdf2f8;
    --bg-deep: #fce7f3;
    --bg-surface: #fdf2f8;
    --card-bg: #ffffff;
    --text-primary: #500724;
    --text-secondary: #9d174d;
    --text-heading: #500724;
    --text-muted: #d4708e;
    --border-color: #fbcfe8;
    --border-hover: rgba(236, 72, 153, 0.40);
    --hover-bg: #fce7f3;
    --selected-bg: #fbcfe8;
    --shadow: 0 2px 8px rgba(200, 50, 100, 0.08);
    --shadow-lg: 0 4px 20px rgba(200, 50, 100, 0.12);
    --gradient-primary: linear-gradient(135deg, #ec4899 0%, #f9a8d4 100%);
    --gradient-progress: linear-gradient(90deg, #ec4899, #f9a8d4);
    --body-bg: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
    --accent: #ec4899;
    --accent-light: #f472b6;
    --accent-soft: rgba(236, 72, 153, 0.12);
    --accent-glow: rgba(236, 72, 153, 0.30);

    --decor-border-style: solid;
    --decor-border-radius: 16px;
    --decor-card-border-width: 1px;
    --decor-font-family: 'Georgia', 'Palatino','Book Antiqua', serif;
    --decor-glow-filter: drop-shadow(0 0 8px rgba(236, 72, 153, 0.2));
    --decor-bg-pattern: radial-gradient(ellipse at 50% 0%, rgba(236, 72, 153, 0.06) 0%, transparent 60%);
    --nav-bg: rgba(253, 242, 248, 0.92);
}

/* ========================================================================
   通用基础样式
   ======================================================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--decor-font-family);
    background: var(--body-bg);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
    transition: background 0.4s ease, color 0.3s ease;
}

body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--decor-bg-pattern);
    pointer-events: none;
    z-index: 0;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

.logo {
    display: block;
    max-width: 200px;
    margin: 0 auto 20px;
    filter: var(--decor-glow-filter);
}

h1 {
    text-align: center;
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

h2 {
    color: var(--text-heading);
    font-size: 1.5em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
    transition: color 0.3s ease, border-color 0.3s ease;
}

h3 {
    color: var(--text-secondary);
    font-size: 1.2em;
    margin: 20px 0 15px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 30px;
}

.intro-text {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--decor-border-radius);
    margin-bottom: 30px;
    line-height: 1.6;
    border: var(--decor-card-border-width) var(--decor-border-style) var(--border-color);
    transition: background 0.3s ease;
}

.intro-text ul {
    margin: 15px 0 15px 25px;
}

.intro-text li {
    margin: 8px 0;
}

/* ============================================================
   按钮样式
   ============================================================ */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: var(--decor-border-radius);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    font-family: var(--decor-font-family);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn:disabled {
    background: var(--border-color);
    color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* ============================================================
   进度条
   ============================================================ */
.progress-container {
    margin-bottom: 30px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.9em;
    color: var(--text-secondary);
}

#progress-bar-container {
    width: 100%;
    height: 8px;
    background: var(--bg-color);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

#progress-bar {
    height: 100%;
    background: var(--gradient-progress);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ============================================================
   问题容器
   ============================================================ */
.question-item {
    margin-bottom: 25px;
}

.question-text {
    font-size: 1.3em;
    font-weight: 500;
    margin-bottom: 20px;
    line-height: 1.5;
    color: var(--text-primary);
}

.question-number {
    color: var(--primary-color);
    font-weight: bold;
    margin-right: 10px;
}

.options-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.option-label {
    display: block;
    padding: 15px 20px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: var(--decor-border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.option-label:hover {
    background: var(--hover-bg);
    border-color: var(--primary-color);
}

.option-input {
    display: none;
}

.option-input:checked + .option-label {
    background: var(--selected-bg);
    border-color: var(--primary-color);font-weight: 600;
    box-shadow: 0 2px 8px var(--primary-glow);
}

/* ============================================================
   导航按钮
   ============================================================ */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 15px;
}

/* ============================================================
   隐藏类
   ============================================================ */
.hidden {
    display: none !important;
}

/* ============================================================
   结果页面样式
   ============================================================ */
.result-page {
    max-width: 900px;
}

.result-section {
    margin: 40px 0;
}

/*主要类型卡片 */
.type-card.primary {
    background: var(--gradient-primary);
    color: white;
    padding: 30px;
    border-radius: var(--decor-border-radius);
    text-align: center;
}

.type-name {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 15px;
    letter-spacing: 4px;
}

.type-description {
    font-size: 1.1em;
    line-height: 1.6;
    opacity: 0.95;
}

/* 备选类型 */
.type-alternatives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.type-card.alternative {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--decor-border-radius);
    text-align: center;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.type-card.alternative:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.type-card.alternative .type-name {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.type-card.alternative .type-score {
    font-size: 0.9em;
    color: var(--text-secondary);
}

/*============================================================
   功能轴网格
   ============================================================ */
.axis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.axis-card {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--decor-border-radius);
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.axis-card:hover {
    box-shadow: var(--shadow);
}

.axis-card h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.2em;
}

.axis-card .axis-score {
    font-size: 2em;
    font-weight: bold;
    color: var(--text-primary);
    margin: 10px 0;
}

.axis-card .axis-bar {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}

.axis-card .axis-bar-fill {
    height: 100%;
    background: var(--gradient-progress);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.axis-card p {
    font-size: 0.9em;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ============================================================
   功能得分网格
   ============================================================ */
.function-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
}

.function-item {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--decor-border-radius);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: var(--decor-card-border-width) var(--decor-border-style) var(--border-color);
}

.function-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.function-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-color);
}

.function-name {
    font-size: 1.5em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.function-score {
    font-size: 2em;
    font-weight: bold;
    color: var(--text-primary);
}

.function-rank {
    font-size: 0.9em;
    color: var(--text-secondary);
    margin-top: 5px;
}

/* ============================================================
   功能分析
   ============================================================ */
.function-analysis-item {
    background: var(--bg-color);
    padding: 20px;
    border-radius: var(--decor-border-radius);
    margin-bottom: 15px;
    border: var(--decor-card-border-width) var(--decor-border-style) var(--border-color);
    transition: all 0.3s ease;
}

.function-analysis-item:hover {
    box-shadow: var(--shadow);
}

.function-analysis-item h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.function-analysis-item p {
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ============================================================
   操作按钮
   ============================================================ */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 40px;
}

/* ============================================================
   加入频道按钮
   ============================================================ */
.join-channel-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 12px var(--primary-glow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.join-channel-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--primary-glow);
}

/* ============================================================
   主题切换器 — 导航栏嵌入模式
   ============================================================ */
.theme-switcher {
    position: relative;
    display: flex;
    align-items: center;
    z-index: 10001;
}

/* 嵌入导航栏时的样式 */
.theme-switcher-nav {
    margin-left: 8px;
    flex-shrink: 0;
}

/* 没有导航栏时的浮动模式 */
.theme-switcher-fixed {
    position: fixed;
    top: 16px;
    right: 16px;
}

.theme-toggle-btn {
    background: var(--accent-soft);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    color: var(--text-primary);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px var(--primary-glow);
    transform: scale(1.08);
    background: var(--primary-soft);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--decor-border-radius, 10px);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    min-width: 190px;
    display: none;
    z-index: 10002;
}

.theme-dropdown.open {
    display: block;
    animation: fadeDropdown 0.2s ease;
}

@keyframes fadeDropdown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    border-radius: 6px;
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    text-align: left;
    font-family: inherit;
}

.theme-option:hover {
    background: var(--hover-bg);
}

.theme-option.active {
    background: var(--primary-soft);
    color: var(--primary-color);
    font-weight: 600;
}

/* ============================================================
   主题色点 — 使用固定高对比色，不跟随主题变量
   这样在深色/浅色背景下都能清晰辨认
   ============================================================ */
.theme-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.theme-dot-blue { background: linear-gradient(135deg, #2563eb, #60a5fa); }
.theme-dot-purple { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.theme-dot-green { background: linear-gradient(135deg, #059669, #34d399); }
.theme-dot-orange { background: linear-gradient(135deg, #ea580c, #fbbf24); }
.theme-dot-gray { background: linear-gradient(135deg, #374151, #9ca3af); }
.theme-dot-pink { background: linear-gradient(135deg, #db2777, #f9a8d4); }

/* ============================================================
   各主题特色装饰细节
   ============================================================ */

/* 神秘紫 —暗金色高亮装饰 */
[data-theme="purple"] .type-card.primary {
    box-shadow: 0 0 30px rgba(124, 92, 252, 0.2), inset 0 1px 0 rgba(201, 168, 76, 0.3);
}
[data-theme="purple"] h2 {
    border-image: linear-gradient(90deg, #7c5cfc, #c9a84c) 1;
}
[data-theme="purple"] .btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 16px rgba(124, 92, 252, 0.4),0 0 20px rgba(201, 168, 76, 0.15);
}

/* 感性绿 — 明黄色点缀 */
[data-theme="green"] .type-card.primary {
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.2);
}
[data-theme="green"] h2 {
    border-image: linear-gradient(90deg, #10b981, #f59e0b) 1;
}
[data-theme="green"] .question-number {
    background: linear-gradient(135deg, #10b981, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 活力橙 — 动感阴影和强调红色 */
[data-theme="orange"] .type-card.primary {
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.3);
}
[data-theme="orange"] h2 {
    border-image: linear-gradient(90deg, #f97316, #ef4444) 1;
}
[data-theme="orange"] .btn-primary {
    background: linear-gradient(90deg, #f97316, #eab308);
}
[data-theme="orange"] .btn-primary:hover:not(:disabled) {
    background: linear-gradient(90deg, #ea580c, #f97316);
    box-shadow: 0 4px 16px rgba(249, 115, 22, 0.4);
}
[data-theme="orange"] .option-input:checked + .option-label {
    border-left: 4px solid #ef4444;
}

/* 商业灰 — 强调边框与立体感 */
[data-theme="gray"] .container {
    box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.06), 0 -1px 0 rgba(255,255,255,0.8) inset;
}
[data-theme="gray"] .type-card.primary {
    background: linear-gradient(135deg, #1f2937, #4b5563);
}
[data-theme="gray"] .function-item {
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
[data-theme="gray"] h2 {
    border-bottom: 2px solid #374151;
}

/* 爱恋粉 — 柔和光晕和心形暗纹 */
[data-theme="pink"] .type-card.primary {
    box-shadow: 0 4px 24px rgba(236, 72, 153, 0.25);
}
[data-theme="pink"] h2 {
    border-image: linear-gradient(90deg, #ec4899, #f9a8d4) 1;
}
[data-theme="pink"] .option-label:hover {
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.1);
}
[data-theme="pink"] .container::after {
    content: '♡';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.4rem;
    color: rgba(236, 72, 153, 0.15);
    pointer-events: none;
}

/* ============================================================
   响应式设计
   ============================================================ */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.5em;
    }

    .type-name {
        font-size: 2em !important;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;}

    .join-channel-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 20px;font-size: 0.9em;
    }

    /* 主题切换器在导航栏内时，确保和折叠按钮并排 */
    .theme-switcher-nav {
        order: 0;
        margin-left: auto;
        margin-right: 8px;
    }

    /* 浮动模式不遮挡导航栏 */
    .theme-switcher-fixed {
        top: 12px;
        right: 12px;
    }

    .theme-toggle-btn {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .theme-dropdown {
        right: -8px;
        min-width: 170px;
    }
}

@media print {
    body {
        background: white;}

    .join-channel-btn,
    .action-buttons,
    .theme-switcher {
        display: none;
    }
}

/* ============================================================
   历史记录页面样式
   ============================================================ */
.history-page {
    max-width: 900px;
}

.history-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0 30px;
    gap: 15px;
}

.start-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.history-card {
    background: var(--card-bg);
    border: var(--decor-card-border-width) var(--decor-border-style) var(--border-color);
    border-radius: var(--decor-border-radius);
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.history-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.history-type-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    color: white;
    font-weight: bold;
    font-size: 1.2em;
    letter-spacing: 2px;
}

.history-time {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.history-card-body {
    margin-bottom: 15px;
}

.history-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
}

.history-top-functions {
    color: var(--text-primary);
    font-size: 0.95em;
    margin-bottom: 8px;
}

.history-score {
    color: var(--text-secondary);
    font-size: 0.9em;
}

.history-score strong {
    color: var(--primary-color);
    font-size: 1.1em;
}

.history-card-actions {
    display: flex;
    gap: 10px;justify-content: flex-end;
}

/*小按钮样式 */
.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.btn-outline-danger {
    background: transparent;
    border: 2px solid #dc3545;
    color: #dc3545;
    border-radius: var(--decor-border-radius);
}

.btn-outline-danger:hover {
    background: #dc3545;
    color: white;
}

/*空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 20px;opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
}

/*响应式 - 历史记录 */
@media (max-width: 768px) {
    .history-controls {
        flex-direction: column;
    }

    .history-controls .btn {
        width: 100%;
    }

    .history-card-header {
        flex-direction: column;
        align-items: flex-start;gap: 10px;
    }

    .history-card-actions {
        flex-direction: column;
    }

    .history-card-actions .btn {
        width: 100%;
    }

    .start-buttons {
        flex-direction: column;
        width: 100%;
    }

    .start-buttons .btn {
        width: 100%;
    }
}

@media print {
    .history-controls,
    .history-card-actions {
        display: none;
    }
}

/* --- Styles for Start Screen Buttons --- */
#start-screen #start-btn {
    display: block;
    width: 100%;
    margin-bottom: 15px;
}

.home-button-group {
    display: flex;
    gap: 15px;
    width: 100%;
}

.home-button-group .btn {
    flex: 1;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

@media (max-width: 768px) {
    .home-button-group {
        flex-direction: column;}
}
