/* ========================================
   AI 探险家 - 明亮温暖风格主样式 (v5.0)
   ======================================== */

/* CSS Variables - 温暖启蒙配色 */
:root {
    --warm-white: #FFF9F5;
    --warm-bg: #FFF5EE;
    --warm-card: #FFFFFF;
    --warm-border: #FFE8D6;

    --primary: #FF6B6B;
    --primary-light: #FF8E8E;
    --primary-dark: #E55555;
    --secondary: #4ECDC4;
    --secondary-light: #7EDDD6;
    --accent: #FFE66D;
    --accent-dark: #FFD93D;

    --text-primary: #2D3436;
    --text-secondary: #636E72;
    --text-muted: #B2BEC3;
    --text-dim: #DFE6E9;

    --success: #00B894;
    --warning: #FDCB6E;
    --error: #FF7675;
    --info: #74B9FF;

    --font-title: 'ZCOOL KuaiLe', 'Noto Sans SC', cursive;
    --font-cn: 'Noto Sans SC', 'PingFang SC', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(255, 107, 107, 0.08);
    --shadow-md: 0 4px 16px rgba(255, 107, 107, 0.12);
    --shadow-lg: 0 8px 32px rgba(255, 107, 107, 0.16);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-cn);
    background: var(--warm-bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
}

::selection {
    background: var(--primary-light);
    color: white;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--warm-white);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ========================================
   温暖渐变背景
   ======================================== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(255, 107, 107, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(78, 205, 196, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 40% 80%, rgba(255, 230, 109, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, #FFF9F5 0%, #FFF5EE 50%, #F0F4FF 100%);
    pointer-events: none;
}

/* ========================================
   主容器布局
   ======================================== */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航 - 温暖风
   ======================================== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 2px solid var(--warm-border);
    position: relative;
    z-index: 100;
    background: var(--warm-bg);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    font-size: 28px;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-title);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.nav-status {
    display: flex;
    align-items: center;
    gap: 20px;
}

.progress-indicator {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.level-label {
    color: var(--text-secondary);
    font-size: 12px;
}

.level-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.level-total {
    color: var(--text-muted);
    font-size: 14px;
}

.explorer-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: var(--warm-card);
    border-radius: var(--radius-lg);
    border: 2px solid var(--warm-border);
}

.explorer-name {
    color: var(--text-secondary);
    font-size: 13px;
}

.explorer-progress {
    font-weight: 700;
    color: var(--success);
}

/* 全屏按钮 */
.btn-fullscreen {
    width: 40px;
    height: 40px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.btn-fullscreen:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.btn-fullscreen:active {
    transform: scale(0.95);
}

.fullscreen-icon {
    font-size: 18px;
}

.btn-fullscreen.exit {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
}

/* ========================================
   主内容区
   ======================================== */
.main-content {
    flex: 1;
    display: flex;
    padding: 20px 0;
}

.screen {
    display: none;
    width: 100%;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

.screen-quiz.active {
    display: flex !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   启动界面
   ======================================== */
.screen-start {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 70px; left: 0; right: 0; bottom: 0;
    padding: 40px 24px 60px;
    overflow-y: auto;
    box-sizing: border-box;
    z-index: 10;
    background: var(--warm-bg);
}

.screen-start.active {
    display: flex !important;
}

.start-content {
    text-align: center;
    max-width: 1400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.title-container {}

.main-title {
    font-family: var(--font-title);
    font-size: clamp(36px, 7vw, 56px);
    font-weight: 900;
    color: var(--primary);
    letter-spacing: 4px;
    margin: 0 0 4px 0;
}

.subtitle {
    font-family: var(--font-cn);
    font-size: clamp(14px, 2vw, 18px);
    color: var(--text-secondary);
    letter-spacing: 2px;
    margin: 0;
}

/* 课程介绍卡片 */
.course-intro-card {
    width: 100%;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 28px;
    border-radius: var(--radius-xl);
    background: var(--warm-card);
    border: 2px solid var(--warm-border);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.intro-card-glow {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.intro-icon-wrap {
    width: 90px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.12), rgba(78, 205, 196, 0.08));
    border: 2px solid rgba(255, 107, 107, 0.2);
    margin-bottom: 14px;
}

.intro-icon-lg {
    font-size: 42px;
}

.intro-name {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.intro-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.intro-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 16px;
}

.intro-tags .tag {
    padding: 5px 14px;
    font-size: 12px;
    border-radius: 20px;
    border: 1.5px solid var(--primary-light);
    color: var(--primary);
    background: rgba(255, 107, 107, 0.06);
}

.intro-tags .tag-warm {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(78, 205, 196, 0.06);
}

.intro-tags .tag-ai {
    border-color: var(--primary-light);
    color: var(--primary-dark);
    background: rgba(255, 107, 107, 0.06);
}

.intro-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.intro-characters {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.character-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.character-emoji {
    font-size: 32px;
}

.character-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.character-role {
    font-size: 11px;
    color: var(--text-muted);
}

/* 启动按钮 */
.btn-start {
    padding: 16px 48px !important;
    font-size: 18px !important;
    border-radius: var(--radius-xl) !important;
}

.start-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* ========================================
   课程选择界面
   ======================================== */
.screen-levels.active {
    display: block;
}

.levels-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--theme-primary, var(--primary));
    background: linear-gradient(135deg, var(--theme-glow, rgba(255, 107, 107, 0.08)) 0%, transparent 50%);
}

.levels-title {
    font-family: var(--font-title);
    font-size: 28px;
    color: var(--theme-primary-dark, var(--primary));
}

.levels-header .stat-value {
    color: var(--theme-primary, var(--primary));
}

.levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* ========================================
   分步教学样式
   ======================================== */
.step-progress {
    margin-bottom: 16px;
}

.progress-bar {
    height: 8px;
    background: var(--warm-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.step-title {
    font-family: var(--font-title);
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 16px;
}

/* 学习内容区 */
.learn-content {
    background: var(--warm-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--warm-border);
    line-height: 1.8;
    box-shadow: var(--shadow-sm);
}

/* 图文并排布局 */
.content-with-comic {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.content-with-comic .comic-sidebar {
    flex-shrink: 0;
    width: 280px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.content-with-comic .comic-sidebar img {
    width: 100%;
    height: auto;
    display: block;
}

.content-with-comic .text-content {
    flex: 1;
    min-width: 0;
}

/* 漫画侧边栏导航 */
.comic-sidebar-nav {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--warm-bg);
    border-top: 1px solid var(--warm-border);
}

.comic-sidebar-nav button {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--warm-card);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-fast);
}

.comic-sidebar-nav button:hover {
    background: var(--primary);
    color: white;
}

.comic-page-info {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 8px 0;
    background: var(--warm-bg);
}

/* 响应式调整 */
@media (max-width: 900px) {
    .content-with-comic {
        flex-direction: column;
    }
    
    .content-with-comic .comic-sidebar {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
}

.learn-content h3 {
    color: var(--primary);
    font-size: 18px;
    margin: 20px 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--warm-border);
}

.learn-content h3:first-child { margin-top: 0; }

.learn-content h4 {
    color: var(--secondary);
    font-size: 16px;
    margin: 15px 0 10px 0;
}

.learn-content p {
    margin: 10px 0;
    line-height: 1.7;
}

.learn-content ul, .learn-content ol {
    margin: 10px 0 15px 25px;
}

.learn-content li {
    margin: 6px 0;
}

.learn-content code {
    background: rgba(255, 107, 107, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 13px;
}

.learn-content strong {
    color: var(--primary-dark);
}

.learn-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 14px;
}

.learn-content table th {
    background: rgba(255, 107, 107, 0.1);
    color: var(--primary);
    padding: 10px 12px;
    text-align: left;
    border: 1.5px solid var(--warm-border);
}

.learn-content table td {
    padding: 10px 12px;
    border: 1.5px solid var(--warm-border);
}

.learn-content table tr:hover {
    background: rgba(255, 107, 107, 0.04);
}

/* 提示框 */
.tip-box {
    background: rgba(78, 205, 196, 0.08);
    border-left: 4px solid var(--secondary);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.tip-box strong { color: var(--secondary); }

.warning-box {
    background: rgba(253, 203, 110, 0.1);
    border-left: 4px solid var(--warning);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.success-box {
    background: rgba(0, 184, 148, 0.08);
    border-left: 4px solid var(--success);
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.success-box strong { color: var(--success); }

/* 故事框 */
.story-box {
    background: linear-gradient(135deg, rgba(255, 107, 107, 0.06), rgba(255, 230, 109, 0.06));
    border: 2px solid var(--warm-border);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 12px 0;
}

.tech-box {
    background: rgba(78, 205, 196, 0.06);
    border-left: 4px solid var(--secondary);
    padding: 12px 15px;
    margin: 12px 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* 步骤导航 */
.step-dots {
    display: flex;
    gap: 8px;
}

.step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--warm-card);
    border: 2px solid var(--warm-border);
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.step-dot:hover {
    border-color: var(--primary-light);
}

.step-dot.current {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.15);
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.3);
}

.step-dot.completed {
    background: var(--success);
    border-color: var(--success);
}

/* 步骤导航区 */
.step-navigation {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: var(--warm-card);
    border-top: 2px solid var(--warm-border);
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.step-buttons {
    display: flex;
    gap: 12px;
}

/* ========================================
   漫画阅读器
   ======================================== */
.interact-area {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.comic-reader {
    background: var(--warm-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    border: 2px solid var(--warm-border);
    box-shadow: var(--shadow-md);
}

.comic-page {
    text-align: center;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.comic-img {
    max-width: 100%;
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.comic-caption {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
}

.comic-dialog {
    background: rgba(255, 230, 109, 0.2);
    border: 2px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-top: 12px;
    font-size: 15px;
    line-height: 1.7;
}

.comic-text-page {
    padding: 20px;
    text-align: left;
}

.comic-scene {
    font-family: var(--font-title);
    font-size: 16px;
    color: var(--primary);
    text-align: center;
    margin-bottom: 12px;
}

.comic-text {
    font-size: 15px;
    line-height: 1.8;
}

.comic-placeholder {
    padding: 60px 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
}

.comic-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--warm-border);
}

.comic-page-indicator {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ========================================
   亲子实践卡
   ======================================== */
.practice-card-area {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.practice-card {
    background: var(--warm-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--warm-border);
}

.practice-card.completed {
    border-color: var(--success);
}

.practice-card-header {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.practice-card-icon { font-size: 28px; }

.practice-card-header h3 {
    font-family: var(--font-title);
    font-size: 20px;
}

.practice-card-body {
    padding: 24px;
}

.practice-card-body h4.practice-title {
    font-family: var(--font-title);
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 16px;
}

.practice-card-body h5 {
    font-size: 15px;
    color: var(--secondary);
    margin: 16px 0 8px;
}

.practice-card-body ul,
.practice-card-body ol {
    margin-left: 20px;
    line-height: 1.8;
}

.practice-card-body li {
    margin: 6px 0;
}

.practice-tips {
    background: rgba(255, 230, 109, 0.15);
    border-radius: var(--radius-md);
    padding: 14px;
    margin-top: 16px;
}

.practice-tips h5 { color: var(--accent-dark); }
.practice-tips p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

.practice-card-footer {
    padding: 16px 24px;
    text-align: center;
    border-top: 1px solid var(--warm-border);
}

/* ========================================
   互动游戏区
   ======================================== */
.interactive-game {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
}

.game-content {
    background: var(--warm-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 2px solid var(--warm-border);
    box-shadow: var(--shadow-md);
}

/* ========================================
   测验界面 - 温暖风
   ======================================== */
.screen-quiz {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 50;
    background: var(--warm-bg);
    padding: 40px 20px;
    overflow-y: auto;
}

.screen-quiz.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.quiz-container {
    width: 100%;
    max-width: 700px;
    background: var(--warm-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--warm-border);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}

.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.quiz-title {
    font-family: var(--font-title);
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 30px;
    text-align: center;
}

.quiz-question {
    background: var(--warm-bg);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
    border: 1.5px solid var(--warm-border);
}

.question-text {
    font-size: 16px;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--warm-card);
    border: 2px solid var(--warm-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    text-align: left;
    font-size: 15px;
}

.quiz-option:hover {
    border-color: var(--primary-light);
    background: rgba(255, 107, 107, 0.04);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(255, 107, 107, 0.08);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
}

.quiz-option.wrong {
    border-color: var(--error);
    background: rgba(255, 118, 117, 0.1);
}

.option-letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--warm-bg);
    border-radius: 50%;
    font-weight: 600;
    color: var(--primary);
    font-size: 14px;
    flex-shrink: 0;
}

.quiz-option.correct .option-letter {
    background: var(--success);
    color: white;
}

.quiz-option.wrong .option-letter {
    background: var(--error);
    color: white;
}

.option-text {
    flex: 1;
    color: var(--text-primary);
}

/* ========================================
   完成界面
   ======================================== */
.complete-content {
    text-align: center;
    padding: 60px 20px;
}

.complete-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounceIn 0.6s ease;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.complete-title {
    font-family: var(--font-title);
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 12px;
}

.complete-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.complete-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 30px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    display: block;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.complete-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ========================================
   交互式选择题（学习步骤中的）
   ======================================== */
.interactive-quiz {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 16px 0;
}

.interactive-quiz .quiz-option {
    border: 2px solid var(--warm-border);
    background: var(--warm-bg);
}

.interactive-quiz .quiz-option:hover:not(.answered) {
    border-color: var(--primary-light);
    transform: translateX(4px);
}

.interactive-quiz .quiz-option.correct {
    border-color: var(--success);
    background: rgba(0, 184, 148, 0.1);
    animation: correctPulse 0.5s ease;
}

.interactive-quiz .quiz-option.wrong {
    border-color: var(--error);
    background: rgba(255, 118, 117, 0.1);
    animation: wrongShake 0.4s ease;
}

@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 20px rgba(0,184,148,0.2); }
    100% { transform: scale(1); }
}

@keyframes wrongShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

.quiz-explanation {
    display: none;
    padding: 14px 18px;
    margin-top: 4px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.6;
}

.quiz-explanation.show { display: block; }

/* ========================================
   Toast 通知
   ======================================== */
.toast-container {
    position: fixed;
    bottom: 100px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 15px 25px;
    background: var(--warm-card);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--primary);
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease;
    max-width: 350px;
}

.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--error); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ========================================
   工具函数
   ======================================== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* ========================================
   调试面板（保留开发用）
   ======================================== */
.debug-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.debug-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--warm-border);
    background: var(--warm-card);
    color: #666;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.debug-toggle:hover {
    border-color: var(--primary-light);
    transform: rotate(45deg);
}

.debug-body {
    position: absolute;
    bottom: 54px;
    right: 0;
    width: 260px;
    background: var(--warm-card);
    border: 2px solid var(--warm-border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
    display: none;
}

.debug-body.open { display: block; }

.debug-section {
    margin-bottom: 12px;
}

.debug-section h4 {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--text-dim);
    transition: 0.3s;
    border-radius: 11px;
}

.slider:before {
    content: "";
    position: absolute;
    height: 17px;
    width: 17px;
    left: 3px;
    bottom: 2.5px;
    background: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(20px); }

.switch-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.btn-debug {
    padding: 6px 16px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--warm-bg);
    border: 1px solid var(--warm-border);
    border-radius: 8px;
    cursor: pointer;
    margin-right: 6px;
    transition: all 0.2s ease;
}

.btn-debug:hover {
    border-color: var(--error);
    background: rgba(255, 118, 117, 0.08);
}

.debug-info {
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--warm-bg);
    border-radius: 8px;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    font-family: var(--font-mono);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 768px) {
    .main-title { font-size: 36px; letter-spacing: 2px; }
    .subtitle { font-size: 14px; }
    .levels-grid { grid-template-columns: 1fr; }
    .top-nav { flex-direction: column; gap: 10px; }
    .intro-characters { flex-direction: column; align-items: center; }
    .step-navigation { padding: 12px 16px; }
}
