/* ========================================
   style.css — Route 66 Word Cruiser
   美式復古公路旅行風格
   ======================================== */

:root {
    --wood-dark: #1a0f07;
    --wood-mid: #2c1810;
    --wood-light: #3d2214;
    --paper-cream: #f4e4c1;
    --paper-warm: #efe0c8;
    --paper-dark: #d4b896;
    --ink-brown: #2c1810;
    --ink-light: #5c3d2e;
    --neon-red: #e63946;
    --neon-red-glow: #ff4757;
    --neon-blue: #4a90d9;
    --neon-blue-glow: #6bb3f0;
    --neon-amber: #f0a500;
    --neon-amber-glow: #ffc048;
    --neon-green: #2ecc71;
    --route-blue: #3d5a80;
    --route-sign-blue: #1a3a5c;
    --chrome: #c0c0c0;
    --chrome-light: #e8e8e8;
    --desert-sand: #c4a882;
    --sunset-orange: #e8913a;
    --shadow-soft: rgba(0, 0, 0, 0.3);
    --shadow-card: rgba(0, 0, 0, 0.5);
    --shadow-neon: rgba(230, 57, 70, 0.6);
    --font-display: 'Bebas Neue', 'Noto Sans TC', sans-serif;
    --font-typewriter: 'Courier Prime', 'Special Elite', 'Courier New', monospace;
    --font-body: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-neon: 'Bebas Neue', sans-serif;
    --card-width: 520px;
    --card-radius: 6px;
    --btn-radius: 4px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-body);
    background-color: #0d0805;
    background-image:
        radial-gradient(ellipse at 50% 30%, rgba(60, 30, 15, 0.6) 0%, transparent 70%),
        radial-gradient(ellipse at 80% 80%, rgba(40, 20, 10, 0.4) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 70%, rgba(25, 12, 5, 0.5) 0%, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><circle cx='12' cy='12' r='8' fill='none' stroke='%23f4e4c1' stroke-width='2' opacity='0.8'/><circle cx='12' cy='12' r='3' fill='%23e63946' opacity='0.9'/></svg>") 12 12, auto;
}

.wood-texture-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        repeating-linear-gradient(2deg, transparent, transparent 2px, rgba(139, 90, 43, 0.03) 2px, rgba(139, 90, 43, 0.03) 4px),
        repeating-linear-gradient(92deg, transparent, transparent 40px, rgba(100, 60, 25, 0.04) 40px, rgba(100, 60, 25, 0.04) 42px),
        repeating-linear-gradient(180deg, transparent, transparent 80px, rgba(80, 40, 15, 0.03) 80px, rgba(80, 40, 15, 0.03) 82px);
    opacity: 0.7;
}

.game-container {
    position: relative;
    z-index: 1;
    width: 95%;
    max-width: 900px;
    background: linear-gradient(180deg, rgba(44, 24, 16, 0.95) 0%, rgba(35, 18, 10, 0.97) 30%, rgba(40, 22, 13, 0.96) 100%);
    border: 3px solid #3d2214;
    border-radius: 16px;
    padding: 28px 32px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(180, 140, 100, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 0 80px rgba(180, 120, 60, 0.08);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.game-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(180, 140, 100, 0.25);
    flex-wrap: wrap;
    gap: 12px;
}

.neon-sign {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.neon-text {
    font-family: var(--font-neon);
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    color: #fff;
    display: flex;
    gap: 0.35em;
    align-items: baseline;
    text-shadow: 0 0 4px #fff, 0 0 8px #fff, 0 0 16px var(--neon-red-glow), 0 0 32px var(--neon-red-glow), 0 0 48px var(--shadow-neon), 0 0 64px rgba(230, 57, 70, 0.4);
    animation: neonFlicker 4s infinite alternate;
}

.neon-number {
    font-size: 1.4em;
    color: #ffe066;
    text-shadow: 0 0 4px #fff, 0 0 10px #ffe066, 0 0 20px var(--neon-amber-glow), 0 0 40px var(--neon-amber), 0 0 60px rgba(240, 165, 0, 0.5);
}

.neon-subtitle {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.25em;
    color: var(--chrome-light);
    text-shadow: 0 0 8px rgba(200, 200, 200, 0.5);
    margin-top: -4px;
    text-transform: uppercase;
    opacity: 0.85;
}

@keyframes neonFlicker {

    0%,
    100% {
        opacity: 1;
    }

    2% {
        opacity: 0.85;
    }

    4% {
        opacity: 1;
    }

    50% {
        opacity: 0.95;
    }

    52% {
        opacity: 0.8;
    }

    54% {
        opacity: 1;
    }

    96% {
        opacity: 0.9;
    }

    98% {
        opacity: 0.78;
    }
}

.header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(180, 140, 100, 0.12);
    border: 1px solid rgba(180, 140, 100, 0.35);
    border-radius: 20px;
    padding: 6px 16px;
    font-family: var(--font-display);
    color: var(--chrome);
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    white-space: nowrap;
}

.badge-star {
    color: var(--neon-amber);
    font-size: 0.9rem;
    animation: starGlow 1.5s ease-in-out infinite;
}

@keyframes starGlow {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

.highway-progress {
    position: relative;
}

.highway-track {
    position: relative;
    height: 60px;
    background: linear-gradient(180deg, #3a3a3a 0%, #4a4a4a 30%, #3a3a3a 60%, #2a2a2a 100%);
    border-radius: 8px;
    overflow: visible;
    border: 2px solid #555;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5);
}

.highway-surface {
    position: absolute;
    top: 50%;
    left: 15px;
    right: 15px;
    height: 6px;
    background: #666;
    transform: translateY(-50%);
    border-radius: 3px;
    overflow: hidden;
}

.highway-dashes {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, var(--neon-amber) 0px, var(--neon-amber) 18px, transparent 18px, transparent 34px);
    animation: dashMove 0.8s linear infinite;
    opacity: 0.7;
}

@keyframes dashMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(34px);
    }
}

.car-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translate(-50%, -50%) scale(0.9);
    width: 70px;
    height: 36px;
    z-index: 5;
    transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.car-svg {
    width: 100%;
    height: 100%;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    font-family: var(--font-display);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: var(--chrome);
    padding: 0 4px;
}

.mileage {
    color: var(--neon-amber);
    font-weight: 700;
    font-size: 0.9rem;
}

.destination {
    color: var(--chrome-light);
    opacity: 0.8;
}

.total-miles {
    color: var(--desert-sand);
    opacity: 0.7;
}

.game-main {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.typewriter-card {
    flex: 1;
    min-width: 0;
    background: linear-gradient(175deg, #5c4a3a 0%, #4a3828 20%, #3d2b1a 50%, #4a3828 80%, #5c4a3a 100%);
    border-radius: 10px;
    padding: 0;
    border: 2px solid #6b5a48;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 4px rgba(30, 15, 5, 0.6);
    position: relative;
    overflow: visible;
}

.typewriter-top {
    position: relative;
    height: 28px;
    background: linear-gradient(180deg, #6b5a48 0%, #4a3828 100%);
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #3d2b1a;
    display: flex;
    align-items: center;
    justify-content: center;
}

.typewriter-roller {
    width: 75%;
    height: 8px;
    background: linear-gradient(180deg, #888 0%, #555 40%, #666 60%, #444 100%);
    border-radius: 4px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}

.typewriter-knob {
    position: absolute;
    top: 50%;
    width: 16px;
    height: 16px;
    background: radial-gradient(circle at 40% 40%, #ddd, #777);
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    border: 2px solid #555;
}

.left-knob {
    left: 12px;
}

.right-knob {
    right: 12px;
}

.paper-slot {
    padding: 16px 20px 12px;
    background: rgba(0, 0, 0, 0.2);
    position: relative;
}

.paper {
    background: linear-gradient(180deg, #faf3e6 0%, #f4e4c1 3%, #efe0c8 50%, #f4e4c1 97%, #e8d5b0 100%);
    border-radius: 3px;
    padding: 20px 18px 14px;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    min-height: 180px;
}

.paper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(0deg, transparent, transparent 27px, rgba(180, 160, 130, 0.15) 27px, rgba(180, 160, 130, 0.15) 28px);
    border-radius: 3px;
    pointer-events: none;
}

.paper-content {
    position: relative;
    z-index: 1;
}

.paper-header {
    text-align: center;
    margin-bottom: 12px;
}

.paper-route {
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    /* 放大 */
    letter-spacing: 0.2em;
    color: #8b7355;
    text-transform: uppercase;
}

.paper-divider {
    display: block;
    color: #c4a882;
    font-size: 0.5rem;
    letter-spacing: 0.3em;
    margin-top: 2px;
}

.word-display-area {
    text-align: center;
    margin-bottom: 10px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.chinese-hint {
    font-family: var(--font-body);
    font-size: 1.5rem;
    /* 放大 */
    font-weight: 500;
    color: #3d2214;
    letter-spacing: 0.06em;
}

.word-example {
    font-family: var(--font-typewriter);
    font-size: 1rem;
    /* 放大 */
    color: #6b5a48;
    font-style: italic;
    opacity: 0.8;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.definition-badge {
    display: inline-block;
    background: rgba(180, 140, 100, 0.2);
    border: 1px solid rgba(180, 140, 100, 0.4);
    border-radius: 12px;
    padding: 3px 10px;
}

.pos-tag {
    font-family: var(--font-typewriter);
    font-size: 0.85rem;
    /* 放大 */
    color: #6b5a48;
    letter-spacing: 0.1em;
}

.input-line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 2px solid #c4a882;
    position: relative;
}

.prompt-symbol {
    font-family: var(--font-typewriter);
    color: var(--neon-red);
    font-weight: bold;
    font-size: 1rem;
    flex-shrink: 0;
}

.typed-text-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-height: 28px;
}

.typed-text {
    font-family: var(--font-typewriter);
    font-size: 1.15rem;
    font-weight: 400;
    color: #1a0f07;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
}

.cursor-blink {
    font-family: var(--font-typewriter);
    font-size: 1.15rem;
    color: #1a0f07;
    animation: cursorBlink 0.8s step-end infinite;
    font-weight: 400;
    margin-left: 1px;
}

@keyframes cursorBlink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

.input-underline {
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--neon-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.input-line:focus-within .input-underline {
    transform: scaleX(1);
}

.feedback-area {
    margin-top: 8px;
    min-height: 22px;
    text-align: center;
    font-family: var(--font-typewriter);
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
}

.feedback-correct {
    color: #2e7d32;
    animation: feedbackPop 0.4s ease-out;
}

.feedback-wrong {
    color: #c62828;
    animation: shakeX 0.5s ease-out;
}

@keyframes feedbackPop {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    60% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shakeX {

    0%,
    100% {
        transform: translateX(0);
    }

    15% {
        transform: translateX(-8px);
    }

    30% {
        transform: translateX(8px);
    }

    45% {
        transform: translateX(-6px);
    }

    60% {
        transform: translateX(6px);
    }

    75% {
        transform: translateX(-3px);
    }

    90% {
        transform: translateX(3px);
    }
}

.paper-fold {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 0, 0, 0.15) 50%, rgba(0, 0, 0, 0.2) 100%);
    border-radius: 0 0 3px 0;
}

.typewriter-keys-row {
    display: flex;
    gap: 6px;
    padding: 8px 16px 12px;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 0 0 10px 10px;
}

.mini-key {
    width: 38px;
    height: 28px;
    background: linear-gradient(180deg, #e8e0d5 0%, #c4b8a8 40%, #b0a090 60%, #9a8a78 100%);
    border-radius: 4px;
    border: 1.5px solid #7a6a58;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-typewriter);
    font-size: 0.7rem;
    color: #4a3828;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.08s ease;
    user-select: none;
}

.mini-key:active {
    transform: translateY(2px);
    box-shadow: 0 0px 1px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.space-key {
    width: 80px;
    font-size: 0.55rem;
    letter-spacing: 0.15em;
}

.side-panel {
    width: 200px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.score-board {
    background: rgba(30, 15, 5, 0.5);
    border: 1.5px solid rgba(180, 140, 100, 0.3);
    border-radius: 8px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-display);
    letter-spacing: 0.1em;
}

.score-label {
    font-size: 0.7rem;
    color: var(--chrome);
    opacity: 0.7;
}

.score-value {
    font-size: 1.3rem;
    color: #fff;
    font-weight: 700;
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.4);
}

.streak-value {
    color: var(--neon-amber);
}

.streak-flame {
    font-size: 1rem;
    animation: flameBounce 0.6s ease-in-out infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.streak-flame.active {
    opacity: 1;
}

@keyframes flameBounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    30% {
        transform: translateY(-6px) scale(1.2);
    }

    60% {
        transform: translateY(-2px) scale(1.05);
    }
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-retro {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 1.5px solid rgba(180, 140, 100, 0.45);
    border-radius: var(--btn-radius);
    background: linear-gradient(180deg, rgba(60, 40, 25, 0.7) 0%, rgba(40, 25, 15, 0.8) 100%);
    color: var(--chrome-light);
    font-family: var(--font-display);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    user-select: none;
    white-space: nowrap;
}

.btn-retro:hover {
    background: linear-gradient(180deg, rgba(80, 50, 30, 0.8) 0%, rgba(50, 30, 18, 0.9) 100%);
    border-color: var(--neon-amber);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 16px rgba(240, 165, 0, 0.2);
}

.btn-retro:active {
    transform: translateY(2px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    font-size: 1rem;
}

.btn-label {
    flex: 1;
    text-align: left;
}

.btn-count {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--neon-amber);
}

.btn-new-game {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.btn-new-game:hover {
    border-color: var(--neon-green);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 16px rgba(46, 204, 113, 0.25);
    color: #fff;
}

.btn-help {
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

.btn-help:hover {
    border-color: var(--neon-blue);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 16px rgba(74, 144, 217, 0.3);
    color: #fff;
}

.collectibles {
    background: rgba(30, 15, 5, 0.4);
    border: 1px solid rgba(180, 140, 100, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
}

.collectibles-title {
    font-family: var(--font-display);
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    color: var(--chrome);
    margin-bottom: 8px;
    text-align: center;
}

.postcard-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.postcard-slot {
    width: 100%;
    aspect-ratio: 1.4 / 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(180, 140, 100, 0.3);
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    /* 恢復小字 */
    transition: all 0.4s ease;
    position: relative;
}

.postcard-slot.earned {
    border-style: solid;
    border-color: var(--neon-amber);
    background: rgba(240, 165, 0, 0.15);
    animation: postcardEarn 0.6s ease-out;
}

.postcard-slot.earned::after {
    content: '📮';
    font-size: 0.9rem;
    /* 恢復小圖 */
}

@keyframes postcardEarn {
    0% {
        transform: scale(0.3) rotate(-15deg);
        opacity: 0;
    }

    60% {
        transform: scale(1.2) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.question-type-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    font-family: var(--font-typewriter);
    font-size: 0.7rem;
    color: var(--chrome);
    opacity: 0.7;
    letter-spacing: 0.08em;
}

.qt-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {

    0%,
    100% {
        box-shadow: 0 0 4px var(--neon-green);
    }

    50% {
        box-shadow: 0 0 12px var(--neon-green), 0 0 20px rgba(46, 204, 113, 0.5);
    }
}

.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.milestone-modal,
.complete-modal {
    background: linear-gradient(180deg, #3d2214 0%, #2c1810 100%);
    border: 3px solid var(--neon-amber);
    border-radius: 16px;
    padding: 32px 28px;
    text-align: center;
    max-width: 460px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 40px rgba(240, 165, 0, 0.3);
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
    0% {
        transform: scale(0.7) translateY(30px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.milestone-stamp,
.complete-stamp {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: var(--neon-red);
    border: 2px solid var(--neon-red);
    display: inline-block;
    padding: 4px 16px;
    border-radius: 4px;
    transform: rotate(-3deg);
    margin-bottom: 12px;
    text-shadow: 0 0 8px var(--shadow-neon);
}

.milestone-title,
.complete-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 8px 0;
}

.milestone-message {
    font-family: var(--font-body);
    color: var(--chrome-light);
    margin: 8px 0;
    font-size: 0.9rem;
}

.milestone-postcard {
    margin: 16px auto;
    width: 140px;
    height: 90px;
    background: var(--paper-cream);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    border: 2px solid var(--paper-dark);
}

.btn-continue,
.btn-restart {
    margin-top: 16px;
    padding: 10px 28px;
    font-size: 0.9rem;
    border-color: var(--neon-amber);
    color: var(--neon-amber);
    display: inline-block;
}

.complete-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 12px 0;
    font-family: var(--font-typewriter);
    color: var(--chrome-light);
    font-size: 0.85rem;
}

.complete-stats strong {
    color: #fff;
    margin-left: 4px;
}

.hidden-input {
    position: fixed;
    top: -100px;
    left: -100px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    z-index: -999;
}

@media (max-width: 768px) {
    .game-container {
        padding: 16px 12px 12px;
        border-radius: 10px;
        gap: 12px;
        width: 98%;
    }

    .neon-text {
        font-size: 2rem;
    }

    .neon-subtitle {
        font-size: 0.8rem;
    }

    .header-badge {
        font-size: 0.7rem;
        padding: 4px 10px;
    }

    .game-main {
        flex-direction: column;
    }

    .side-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }

    .score-board {
        flex: 1;
        flex-direction: row;
        gap: 12px;
        justify-content: space-around;
        padding: 8px;
    }

    .score-item {
        flex-direction: column;
        gap: 2px;
    }

    .action-buttons {
        flex-direction: row;
        flex: 2;
        gap: 4px;
    }

    .btn-retro {
        padding: 6px 8px;
        font-size: 0.65rem;
    }

    .collectibles {
        display: none;
    }

    .typewriter-card {
        border-radius: 8px;
    }

    .paper {
        padding: 14px 10px 10px;
        min-height: 140px;
    }

    .chinese-hint {
        font-size: 1rem;
    }

    .typed-text {
        font-size: 1rem;
    }

    .cursor-blink {
        font-size: 1rem;
    }

    .car-icon {
        width: 50px;
        height: 26px;
    }
}

.paper-flip {
    animation: paperFlipOut 0.35s ease-in forwards;
}

@keyframes paperFlipOut {
    0% {
        transform: rotateY(0);
        opacity: 1;
    }

    100% {
        transform: rotateY(-90deg);
        opacity: 0;
    }
}

.paper-flip-in {
    animation: paperFlipIn 0.35s ease-out forwards;
}

@keyframes paperFlipIn {
    0% {
        transform: rotateY(90deg);
        opacity: 0;
    }

    100% {
        transform: rotateY(0);
        opacity: 1;
    }
}

.key-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(240, 165, 0, 0.5);
    transform: scale(0);
    animation: rippleOut 0.5s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleOut {
    0% {
        transform: scale(0);
        opacity: 1;
    }

    100% {
        transform: scale(3);
        opacity: 0;
    }
}

.help-modal {
    background: linear-gradient(180deg, #3d2214 0%, #2c1810 100%);
    border: 3px solid var(--route-blue);
    border-radius: 16px;
    padding: 28px 24px;
    max-width: 520px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(74, 144, 217, 0.3);
    animation: modalIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.help-stamp {
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.2em;
    color: var(--neon-blue);
    border: 2px solid var(--neon-blue);
    display: inline-block;
    padding: 4px 16px;
    border-radius: 4px;
    transform: rotate(-2deg);
    margin-bottom: 12px;
}

.help-title {
    font-family: var(--font-display);
    font-size: 2rem;
    color: #fff;
    letter-spacing: 0.1em;
    margin: 8px 0 16px;
}

.help-content {
    text-align: left;
    font-family: var(--font-body);
    color: var(--chrome-light);
    margin-bottom: 20px;
}

.help-section {
    margin-bottom: 14px;
}

.help-section h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--neon-amber);
    margin-bottom: 4px;
    letter-spacing: 0.06em;
}

.help-section p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.9;
}

.btn-close-help {
    margin: 0 auto;
    display: block;
    font-size: 0.9rem;
    padding: 10px 24px;
}