/* ========================================
   普通话发音学习 3D - 现代优化版
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 医疗科技蓝绿色系 */
    --primary: #00B4D8;
    --primary-light: #48CAE4;
    --primary-dark: #0077B6;

    /* 辅助色 - 深海蓝系 */
    --secondary: #03045E;
    --secondary-light: #00B4D8;
    --secondary-dark: #023E8A;

    /* 强调色 - 警示/成功 */
    --accent: #20C997;
    --accent-light: #38D9A9;

    /* 中性色 - 深色专业感背景 */
    --bg-gradient-start: #1b263b;
    --bg-gradient-end: #0d1b2a;
    --surface: #e0e1dd;
    --surface-light: #ffffff;
    --surface-dark: #778da9;

    /* 文字色 */
    --text-primary: #1b263b;
    --text-secondary: #415a77;
    --text-muted: #778da9;

    /* 功能色 */
    --success: #20C997;
    --success-light: #38D9A9;
    --error: #E74C3C;
    --error-light: #EC7063;
    --warning: #F39C12;

    /* 阴影 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 30px rgba(0, 180, 216, 0.3);

    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* 过渡 */
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   基础样式
   ======================================== */
body {
    font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.game-container {
    width: 100%;
    max-width: 1100px;
    background: var(--surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    min-height: 850px;
    position: relative;
    animation: container-appear 0.6s ease-out;
}

@keyframes container-appear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }

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

/* ========================================
   屏幕切换动画
   ======================================== */
.screen {
    display: none;
    padding: 40px;
    min-height: 850px;
    animation: screen-enter 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.screen.active {
    display: block;
}

@keyframes screen-enter {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

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

/* ========================================
   开始界面 - 全新设计
   ======================================== */
.title-container {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.main-title {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
    letter-spacing: -1px;
    animation: title-glow 3s ease-in-out infinite;
}

@keyframes title-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 15px rgba(0, 180, 216, 0.3));
    }

    50% {
        filter: drop-shadow(0 0 25px rgba(0, 119, 182, 0.4));
    }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: 2px;
}

/* 模式选择区域 */
.mode-selection {
    margin-bottom: 40px;
}

.mode-selection h2 {
    text-align: center;
    margin-bottom: 25px;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.mode-btn {
    width: 100%;
    padding: 30px;
    margin-bottom: 20px;
    border: none;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.mode-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 0;
}

.mode-btn:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.mode-btn:hover::before {
    opacity: 0.05;
}

.mode-btn:active {
    transform: translateY(-2px) scale(0.98);
}

.mode-icon {
    font-size: 3.5rem;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.mode-text {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    z-index: 1;
}

.mode-desc {
    margin-left: auto;
    font-size: 1rem;
    color: var(--text-secondary);
    background: var(--surface-dark);
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 500;
    z-index: 1;
}

/* 游戏说明卡片 */
.instructions {
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--surface-dark);
}

.instructions h3 {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.instructions li {
    padding: 12px 15px;
    padding-left: 45px;
    position: relative;
    color: var(--text-secondary);
    background: var(--surface);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.instructions li:hover {
    background: var(--surface-dark);
    transform: translateX(5px);
}

.instructions li::before {
    content: "✓";
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-weight: bold;
    font-size: 1.2rem;
    width: 24px;
    height: 24px;
    background: var(--success-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ========================================
   游戏界面 - 优化布局
   ======================================== */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 20px;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.icon-btn {
    background: var(--surface);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: var(--shadow-md);
    background: var(--primary);
    color: white;
}

.level-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

#current-level {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#question-count {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    background: var(--surface);
    padding: 4px 12px;
    border-radius: 15px;
}

.timer {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.timer.urgent {
    background: linear-gradient(135deg, var(--error) 0%, var(--error-light) 100%);
    color: white;
    animation: timer-pulse 0.6s ease-in-out infinite;
}

@keyframes timer-pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 118, 117, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 118, 117, 0);
    }
}

/* 题目区域 */
.question-area {
    text-align: center;
    margin-bottom: 20px;
    padding: 25px;
    background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.question-text {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.phonetic-hint {
    font-size: 1.1rem;
    color: var(--text-secondary);
    background: var(--surface);
    display: inline-block;
    padding: 10px 25px;
    border-radius: 25px;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
    border: 2px solid var(--surface-dark);
}

/* 2D 画布居中包围盒 */
.canvas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 30px;
}

/* 3D 口腔视图包装器 */
.mouth-view-wrapper {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

/* 3D 口腔容器 - 优化视觉 模拟医疗设备边框 */
.mouth-3d-container {
    position: relative;
    flex: 1;
    height: 420px;
    background: #0a0505;
    /* 与 JS 场景背景统一 */
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        var(--shadow-md);
    border: 3px solid #1b263b;
    /* 深色金属质感边框 */
}

/* 2D 示意图 - 医疗显示屏风格 */
.mouth-2d-diagram {
    width: 200px;
    height: 420px;
    background: #0d1b2a;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 3px solid #1b263b;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mouth-2d-diagram canvas {
    width: 100%;
    height: calc(100% - 30px);
}

.diagram-label {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    width: 100%;
}

.mouth-3d-container::before {
    content: '🎯 拖动舌头（前部可单独移动）到绿色目标位置';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 5;
    pointer-events: none;
}

/* 距离指示器 */
.distance-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px 18px;
    border-radius: 20px;
    color: white;
    font-size: 0.9rem;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.distance-label {
    font-size: 0.75rem;
    opacity: 0.8;
}

.distance-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00ff88;
}

.distance-value.far {
    color: #ff7675;
}

.distance-value.close {
    color: #ffe66d;
}

#three-container {
    width: 100%;
    height: 100%;
}

#three-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.view-controls {
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.view-btn {
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.view-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.view-btn:active {
    transform: translateY(0);
}

/* 3D 控制区域 - 现代化设计 */
.controls-3d {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    border: 2px solid var(--surface-dark);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.control-group label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.control-group label::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
}

.control-group:nth-child(2) label::before {
    background: var(--secondary);
}

.control-group:nth-child(3) label::before {
    background: var(--accent);
}

.control-group input[type="range"] {
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: var(--surface-dark);
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
    border: 3px solid white;
}

.control-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-glow);
}

.control-group:nth-child(2) input[type="range"]::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
}

.control-group:nth-child(3) input[type="range"]::-webkit-slider-thumb {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
}

.confirm-btn {
    grid-column: span 3;
    padding: 18px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    margin-top: 10px;
    box-shadow: var(--shadow-md);
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

.confirm-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.confirm-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.confirm-btn:hover::before {
    left: 100%;
}

.confirm-btn:active {
    transform: translateY(-1px);
}

/* 进度条 - 渐变动画 */
.progress-bar {
    width: 100%;
    height: 10px;
    background: var(--surface-dark);
    border-radius: 5px;
    overflow: hidden;
    margin-top: 25px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    background-size: 200% 100%;
    border-radius: 5px;
    transition: width var(--transition-normal);
    width: 0%;
    animation: progress-shine 2s linear infinite;
}

@keyframes progress-shine {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   结果界面 - 全新设计
   ======================================== */
.result-container {
    text-align: center;
    padding: 50px 30px;
    animation: result-appear 0.6s ease-out;
}

@keyframes result-appear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-icon {
    font-size: 6rem;
    margin-bottom: 25px;
    animation: result-bounce 1.5s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
}

@keyframes result-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    25% {
        transform: translateY(-15px) scale(1.1);
    }

    50% {
        transform: translateY(0) scale(1);
    }

    75% {
        transform: translateY(-8px) scale(1.05);
    }
}

#result-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#result-message {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.2rem;
    font-weight: 500;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
}

.stat {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    padding: 25px 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 2px solid var(--surface-dark);
    transition: all var(--transition-fast);
    min-width: 140px;
}

.stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-label {
    display: block;
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 320px;
    margin: 0 auto;
}

.primary-btn,
.secondary-btn {
    padding: 18px 35px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-normal);
    letter-spacing: 1px;
}

.primary-btn {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow-md);
}

.secondary-btn {
    background: var(--surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--surface-dark);
}

.primary-btn:hover,
.secondary-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.primary-btn:hover {
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.secondary-btn:hover {
    background: var(--surface-light);
    border-color: var(--primary);
}

.primary-btn:active,
.secondary-btn:active {
    transform: translateY(-1px);
}

/* ========================================
   弹窗 - 毛玻璃效果
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
    animation: modal-fade-in 0.3s ease;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    padding: 45px;
    border-radius: var(--radius-xl);
    text-align: center;
    max-width: 380px;
    width: 90%;
    animation: modal-scale-in 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--surface-dark);
}

@keyframes modal-scale-in {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.feedback-icon {
    font-size: 4.5rem;
    margin-bottom: 20px;
    animation: feedback-pop 0.5s ease;
}

@keyframes feedback-pop {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.feedback-icon.correct {
    color: var(--success);
}

.feedback-icon.wrong {
    color: var(--error);
}

#feedback-title {
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: 700;
    color: var(--text-primary);
}

#feedback-message {
    color: var(--text-secondary);
    margin-bottom: 25px;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* 3D 标签 */
.labels-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.label-3d {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    pointer-events: none;
    transform: translate(-50%, -50%);
    font-weight: 600;
    border: 2px solid var(--surface-dark);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    body {
        padding: 0;
    }

    .game-container {
        border-radius: 0;
        min-height: 100vh;
        max-width: 100%;
    }

    .screen {
        padding: 20px;
        min-height: 100vh;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .mode-btn {
        padding: 20px;
    }

    .mode-icon {
        font-size: 2.5rem;
    }

    .mode-text {
        font-size: 1.2rem;
    }

    .mode-desc {
        font-size: 0.8rem;
        padding: 5px 10px;
    }

    .instructions ul {
        grid-template-columns: 1fr;
    }

    .game-header {
        padding: 12px 15px;
    }

    .question-text {
        font-size: 1.8rem;
    }

    .mouth-3d-container {
        height: 320px;
    }

    .mouth-3d-container::before {
        font-size: 0.8rem;
        padding: 6px 15px;
    }

    .controls-3d {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .confirm-btn {
        grid-column: span 1;
    }

    .result-stats {
        flex-direction: column;
        gap: 15px;
    }

    .stat {
        padding: 20px 30px;
    }

    #result-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.6rem;
    }

    .mode-btn {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .mode-desc {
        margin-left: 0;
    }

    .question-text {
        font-size: 1.5rem;
    }

    .mouth-3d-container {
        height: 280px;
    }
}

/* ========================================
   庆祝动画
   ======================================== */
.celebration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
}

.confetti {
    position: absolute;
    width: 12px;
    height: 12px;
    animation: confetti-fall 3s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ========================================
   加载动画
   ======================================== */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   额外动画效果
   ======================================== */
.pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid var(--primary);
    animation: pulse-ring 1.5s ease-out infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}