:root {
    --crimson: #d62828;
    --sunset: #f77f00;
    --gold: #fcbf49;
    --cream: #fff3e6;
    --jade: #2a9d8f;
    --ink: #1f1f1f;
    --paper: #ffffff;
    --shadow: 0 18px 40px rgba(27, 27, 27, 0.12);
    --radius-lg: 26px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    font-family: "Manrope", "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #fff5e6 0%, #ffe8cc 50%, #ffd6a3 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Trang trí Tết cổ truyền */
.tet-decorations {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* Câu đối Tết */
.cau-doi {
    position: fixed;
    top: 80px;
    width: 60px;
    height: 200px;
    background: linear-gradient(135deg, #c41e3a, #8b0000);
    border: 3px solid #ffd700;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.4);
    z-index: 10;
    animation: swingCauDoi 3s ease-in-out infinite;
}

.cau-doi.left {
    left: 10px;
}

.cau-doi.right {
    right: 10px;
}

.cau-doi-text {
    writing-mode: vertical-rl;
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    font-weight: 700;
    color: #ffd700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 16px;
}

/* Đèn lồng */
.lantern {
    position: absolute;
    width: 50px;
    height: 70px;
    background: linear-gradient(180deg, #ff0000, #cc0000);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    box-shadow: 
        0 5px 15px rgba(255, 0, 0, 0.5),
        inset 0 -5px 10px rgba(0, 0, 0, 0.3);
    animation: 
        swingLantern 4s ease-in-out infinite,
        lanternGlow 3s ease-in-out infinite;
    z-index: 5;
}

.lantern::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 8px;
    background: #8b4513;
    border-radius: 4px 4px 0 0;
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 15px solid #ffd700;
}

.lantern-left {
    top: 20px;
    left: 80px;
    animation-delay: 0s;
}

.lantern-right {
    top: 20px;
    right: 80px;
    animation-delay: 2s;
}

/* Hoa đào và mai */
.flower-branch {
    position: fixed;
    width: 120px;
    height: 250px;
    z-index: 1;
}

.flower-branch.left-branch {
    top: 120px;
    left: 0;
}

.flower-branch.right-branch {
    top: 180px;
    right: 0;
    transform: scaleX(-1);
}

.flower {
    position: absolute;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #ffb3d9 0%, #ff69b4 50%, #ff1493 100%);
    border-radius: 50%;
    animation: bloomFlower 3s ease-in-out infinite;
}

.flower::before,
.flower::after {
    content: '';
    position: absolute;
    width: 35px;
    height: 35px;
    background: radial-gradient(circle, #ffb3d9 0%, #ff69b4 50%, #ff1493 100%);
    border-radius: 50%;
}

.flower::before {
    top: -15px;
    left: 10px;
}

.flower::after {
    top: 10px;
    left: -15px;
}

.flower.yellow {
    background: radial-gradient(circle, #fff9c4 0%, #ffeb3b 50%, #ffd600 100%);
}

.flower.yellow::before,
.flower.yellow::after {
    background: radial-gradient(circle, #fff9c4 0%, #ffeb3b 50%, #ffd600 100%);
}

.flower:nth-child(1) {
    top: 20px;
    left: 40px;
    animation-delay: 0s;
}

.flower:nth-child(2) {
    top: 80px;
    left: 60px;
    animation-delay: 1s;
}

.flower:nth-child(3) {
    top: 140px;
    left: 45px;
    animation-delay: 2s;
}

/* Pháo hoa */
.firework {
    position: fixed;
    width: 4px;
    height: 4px;
    background: #ffd700;
    border-radius: 50%;
    box-shadow: 
        0 0 20px 5px #ffd700,
        0 0 40px 10px #ff6b6b,
        0 0 60px 15px #4ecdc4;
    animation: sparkle 2s ease-in-out infinite;
    z-index: 1;
}

/* Animations */
@keyframes swingCauDoi {
    0%, 100% {
        transform: rotate(-2deg);
    }
    50% {
        transform: rotate(2deg);
    }
}

@keyframes swingLantern {
    0%, 100% {
        transform: rotate(-5deg);
    }
    50% {
        transform: rotate(5deg);
    }
}

@keyframes lanternGlow {
    0%, 100% {
        box-shadow: 
            0 5px 15px rgba(255, 0, 0, 0.5),
            inset 0 -5px 10px rgba(0, 0, 0, 0.3),
            0 0 20px rgba(255, 215, 0, 0.6);
    }
    50% {
        box-shadow: 
            0 5px 15px rgba(255, 0, 0, 0.5),
            inset 0 -5px 10px rgba(0, 0, 0, 0.3),
            0 0 40px rgba(255, 215, 0, 0.9),
            0 0 60px rgba(255, 215, 0, 0.5);
    }
}

@keyframes bloomFlower {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.page {
    padding: 32px 24px 60px;
    position: relative;
    overflow: hidden;
}

.page::before,
.page::after {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(252, 191, 73, 0.25), transparent 70%);
    z-index: 0;
}

.page::before {
    top: -180px;
    left: -140px;
}

.page::after {
    bottom: -200px;
    right: -120px;
}

.hero {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto 36px;
    padding: 48px 48px 56px;
    background: 
        linear-gradient(120deg, rgba(214, 40, 40, 0.08), rgba(252, 191, 73, 0.12)),
        repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(255, 215, 0, 0.03) 10px, rgba(255, 215, 0, 0.03) 20px);
    border-radius: var(--radius-lg);
    border: 3px solid;
    border-image: linear-gradient(135deg, #ffd700, #ff6b6b, #ffd700) 1;
    box-shadow: 
        var(--shadow),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 0 30px rgba(255, 215, 0, 0.2);
    text-align: center;
    overflow: visible;
}

.hero::before {
    content: '🎊';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.hero::after {
    content: '🎉';
    position: absolute;
    top: -20px;
    right: 20px;
    font-size: 2rem;
    animation: float 3s ease-in-out infinite 1.5s;
}

.hero h1 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin: 16px 0 12px;
    color: #7a1f1f;
}

.hero-sub {
    margin: 0 auto 24px;
    max-width: 680px;
    font-size: 1.05rem;
    color: rgba(31, 31, 31, 0.72);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--paper);
    color: #8d2c2c;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    font-size: 0.8rem;
    box-shadow: 0 8px 20px rgba(214, 40, 40, 0.12);
}

.hero-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.wish-chip {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--paper);
    border: 1px solid rgba(247, 127, 0, 0.2);
    font-weight: 600;
    color: #9a4212;
    box-shadow: 0 10px 20px rgba(247, 127, 0, 0.12);
}

.hero-orbit {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    border: 2px dashed rgba(214, 40, 40, 0.25);
    top: -50px;
    right: 60px;
    animation: spin 16s linear infinite;
}

.hero-orbit::after {
    content: "";
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--gold);
    top: -10px;
    left: 70px;
    box-shadow: 0 0 0 6px rgba(252, 191, 73, 0.3);
}

.greeting-card {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto 36px;
    padding: 32px 40px;
    border-radius: var(--radius-md);
    background: 
        var(--paper),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(255, 215, 0, 0.05) 2px, rgba(255, 215, 0, 0.05) 4px);
    box-shadow: var(--shadow);
    border: 2px solid rgba(255, 215, 0, 0.3);
}

.greeting-card::before {
    content: '🌸';
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
}

.greeting-card::after {
    content: '🌸';
    position: absolute;
    bottom: 10px;
    right: 10px;
    font-size: 1.5rem;
}

.greeting-card h2 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 2rem;
    margin-bottom: 12px;
    color: #7a1f1f;
}

.greeting-card p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(31, 31, 31, 0.76);
}

.greeting-footer {
    margin-top: 20px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--jade);
}

.music-card {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto 40px;
    padding: 28px;
    border-radius: var(--radius-md);
    background: linear-gradient(120deg, rgba(247, 127, 0, 0.08), rgba(42, 157, 143, 0.08));
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 20px;
    align-items: center;
    box-shadow: var(--shadow);
}

.music-card h3 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #8d2c2c;
}

.music-card p {
    margin: 0 0 16px;
    color: rgba(31, 31, 31, 0.7);
}

.music-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    text-decoration: none;
    background: var(--crimson);
    color: white;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(214, 40, 40, 0.25);
}

.music-embed {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(31, 31, 31, 0.16);
}

.music-embed iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.game-section {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto;
    padding: 36px 28px 40px;
    border-radius: var(--radius-lg);
    background: 
        var(--paper),
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    box-shadow: var(--shadow);
    border: 3px dashed rgba(255, 215, 0, 0.3);
}

.game-section::before {
    content: '🎮';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    background: white;
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.1);
}

.section-title h2 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 2.1rem;
    margin-bottom: 8px;
    color: #7a1f1f;
}

.section-title p {
    margin-bottom: 4px;
    color: rgba(31, 31, 31, 0.65);
}

.section-note {
    display: inline-block;
    margin-top: 6px;
    color: var(--jade);
    font-weight: 600;
}

.game-container {
    position: relative;
    max-width: 1200px; /* Tăng từ 800px */
    width: 100%;
    margin: 24px auto;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(31, 31, 31, 0.15);
    background: linear-gradient(180deg, #87ceeb 0%, #e0f6ff 100%);
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    cursor: pointer;
    touch-action: manipulation; /* Cải thiện touch trên mobile */
}

.game-over-screen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 32px 48px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(31, 31, 31, 0.3);
    display: none;
}

.game-over-screen.show {
    display: block;
    animation: popIn 0.3s ease-out;
}

.game-over-screen h3 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 2rem;
    color: #7a1f1f;
    margin-bottom: 16px;
}

.game-over-screen p {
    font-size: 1.1rem;
    margin: 8px 0;
    color: rgba(31, 31, 31, 0.8);
}

.game-over-screen span {
    font-weight: 700;
    color: var(--jade);
    font-size: 1.3rem;
}

.btn-restart {
    margin-top: 20px;
    padding: 12px 30px;
    border-radius: 999px;
    border: none;
    background: linear-gradient(120deg, var(--crimson), var(--sunset));
    color: white;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 20px rgba(214, 40, 40, 0.3);
    transition: transform 0.2s ease;
    cursor: pointer;
}

.btn-restart:hover {
    transform: translateY(-2px) scale(1.05);
}

.game-info {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    padding: 16px;
    background: var(--cream);
    border-radius: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.score-display,
.high-score-display {
    font-weight: 700;
    color: rgba(31, 31, 31, 0.7);
    font-size: 1.1rem;
}

.score-display span,
.high-score-display span {
    color: var(--crimson);
    font-size: 1.3rem;
    margin-left: 8px;
}

.game-instructions {
    margin: 24px auto;
    padding: 20px;
    background: rgba(247, 127, 0, 0.08);
    border-radius: 16px;
    max-width: 600px;
    border-left: 4px solid var(--sunset);
}

.game-instructions p {
    margin: 8px 0;
    color: rgba(31, 31, 31, 0.75);
}

.game-instructions strong {
    color: #7a1f1f;
}

.game-instructions kbd {
    background: white;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid rgba(31, 31, 31, 0.2);
    font-weight: 600;
    color: var(--crimson);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.note-text {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(247, 127, 0, 0.2);
    font-size: 0.9rem;
    color: rgba(31, 31, 31, 0.6);
}

@keyframes popIn {
    from {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
    to {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.backHome {
    margin-top: 18px;
    padding: 10px 20px;
    border-radius: 999px;
    border: none;
    background: var(--ink);
    color: white;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.backHome:hover {
    transform: translateY(-2px);
}

.page-footer {
    position: relative;
    z-index: 1;
    margin: 50px auto 0;
    max-width: 700px;
    text-align: center;
    color: rgba(31, 31, 31, 0.6);
}

.footer-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid rgba(214, 40, 40, 0.2);
    margin: 0 auto 12px;
    position: relative;
}

.footer-ring::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--gold);
    border-radius: 50%;
    top: -8px;
    left: 24px;
    box-shadow: 0 0 0 6px rgba(252, 191, 73, 0.35);
    animation: pulse 2.8s ease-in-out infinite;
}

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

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.15);
        opacity: 1;
    }
}

/* Countdown Section */
.countdown-section {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto 36px;
    padding: 32px 40px;
    border-radius: var(--radius-md);
    background: 
        linear-gradient(135deg, rgba(42, 157, 143, 0.1), rgba(252, 191, 73, 0.1)),
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(255, 215, 0, 0.05) 10px, rgba(255, 215, 0, 0.05) 20px);
    box-shadow: var(--shadow);
    text-align: center;
    border: 2px solid rgba(42, 157, 143, 0.2);
}

.countdown-section::before {
    content: '⏰';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    background: white;
    padding: 5px 15px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.1);
}

.countdown-section h2 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 1.8rem;
    margin-bottom: 24px;
    color: #7a1f1f;
}

.countdown-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.countdown-item {
    background: 
        linear-gradient(135deg, #ffffff, #fff9f0),
        repeating-linear-gradient(45deg, transparent, transparent 5px, rgba(255, 215, 0, 0.05) 5px, rgba(255, 215, 0, 0.05) 10px);
    padding: 20px 16px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.08);
    border: 2px solid rgba(255, 215, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--crimson), var(--gold), var(--crimson));
}

.countdown-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--crimson);
    font-family: "Playfair Display", serif;
    line-height: 1;
}

.countdown-label {
    font-size: 0.9rem;
    color: rgba(31, 31, 31, 0.6);
    margin-top: 8px;
    font-weight: 600;
}

.countdown-message {
    color: var(--jade);
    font-style: italic;
    margin: 0;
}

/* Lì Xì Section */
.lixi-section {
    position: relative;
    z-index: 1;
    max-width: 860px;
    margin: 0 auto 36px;
    padding: 40px 40px 48px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(214, 40, 40, 0.08), rgba(247, 127, 0, 0.08));
    box-shadow: var(--shadow);
    text-align: center;
}

.lixi-section h2 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 2rem;
    margin-bottom: 12px;
    color: #7a1f1f;
}

.lixi-subtitle {
    color: rgba(31, 31, 31, 0.7);
    margin-bottom: 32px;
}

.lixi-container {
    display: flex;
    justify-content: center;
    margin: 32px 0;
}

.lixi-envelope {
    position: relative;
    width: 180px;
    height: 240px;
    background: linear-gradient(135deg, #d62828, #f77f00);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 12px 35px rgba(214, 40, 40, 0.3);
    overflow: hidden;
    text-decoration: none;
}

.lixi-envelope:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 20px 50px rgba(214, 40, 40, 0.4);
}

.envelope-flap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #a01515, #c45500);
    clip-path: polygon(0 0, 100% 0, 50% 70%);
    z-index: 2;
}

.envelope-body {
    position: relative;
    z-index: 1;
    color: white;
    text-align: center;
}

.envelope-body i {
    font-size: 4rem;
    margin-bottom: 12px;
    animation: bounce 2s ease-in-out infinite;
}

.envelope-body p {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    letter-spacing: 0.5px;
}

.envelope-shine {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shine 3s ease-in-out infinite;
}

.lixi-note {
    color: rgba(31, 31, 31, 0.65);
    font-size: 0.95rem;
    margin-top: 20px;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* Quotes Section */
.quotes-section {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0 auto 36px;
    padding: 36px 28px;
    border-radius: var(--radius-md);
    background: 
        var(--paper),
        repeating-radial-gradient(circle at 0 0, transparent 0, transparent 10px, rgba(255, 215, 0, 0.03) 10px, rgba(255, 215, 0, 0.03) 20px);
    box-shadow: var(--shadow);
    text-align: center;
    border-top: 3px solid var(--gold);
}

.quotes-section::before {
    content: '💌';
    position: absolute;
    top: -20px;
    left: 30px;
    font-size: 2rem;
    background: white;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.1);
}

.quotes-section::after {
    content: '💝';
    position: absolute;
    top: -20px;
    right: 30px;
    font-size: 2rem;
    background: white;
    padding: 5px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(31, 31, 31, 0.1);
}

.quotes-section h2 {
    font-family: "Playfair Display", "Times New Roman", serif;
    font-size: 2rem;
    margin-bottom: 28px;
    color: #7a1f1f;
}

.quotes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.quote-card {
    background: 
        linear-gradient(135deg, rgba(252, 191, 73, 0.08), rgba(42, 157, 143, 0.08)),
        repeating-linear-gradient(-45deg, transparent, transparent 5px, rgba(255, 255, 255, 0.5) 5px, rgba(255, 255, 255, 0.5) 6px);
    padding: 28px 24px;
    border-radius: 16px;
    border-left: 4px solid var(--gold);
    border-right: 4px solid var(--crimson);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.quote-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(31, 31, 31, 0.1);
}

.quote-icon {
    color: var(--sunset);
    font-size: 1.8rem;
    margin-bottom: 12px;
    opacity: 0.7;
}

.quote-card p {
    font-style: italic;
    color: rgba(31, 31, 31, 0.75);
    line-height: 1.7;
    margin: 0;
}

/* Game Controls Bar */
.game-controls-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.game-control-btn {
    padding: 10px 20px;
    border: 2px solid rgba(214, 40, 40, 0.3);
    background: white;
    color: var(--crimson);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.game-control-btn:hover {
    background: var(--crimson);
    color: white;
    border-color: var(--crimson);
}

.game-control-btn.active {
    background: var(--jade);
    color: white;
    border-color: var(--jade);
}

/* Character Selector */
.character-selector {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.character-selector label {
    color: var(--ink);
    font-size: 16px;
}

.character-btn {
    padding: 12px 24px;
    border: 3px solid rgba(214, 40, 40, 0.3);
    background: white;
    color: var(--ink);
    border-radius: 999px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.character-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--sunset);
}

.character-btn.active {
    background: linear-gradient(135deg, var(--crimson), var(--sunset));
    color: white;
    border-color: var(--crimson);
    box-shadow: 0 6px 20px rgba(214, 40, 40, 0.3);
}


.game-control-btn.muted {
    background: rgba(214, 40, 40, 0.1);
    color: rgba(214, 40, 40, 0.5);
}

.difficulty-select {
    padding: 10px 18px;
    border: 2px solid rgba(42, 157, 143, 0.3);
    background: white;
    color: var(--jade);
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.difficulty-select:hover {
    border-color: var(--jade);
}

.difficulty-select:focus {
    outline: none;
    border-color: var(--jade);
    box-shadow: 0 0 0 3px rgba(42, 157, 143, 0.1);
}

.obstacles-passed {
    font-weight: 700;
    color: rgba(31, 31, 31, 0.7);
    font-size: 1.1rem;
}

.obstacles-passed span {
    color: var(--sunset);
    font-size: 1.3rem;
    margin-left: 8px;
}

/* Game Stats */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 24px 0;
    padding: 20px;
    background: var(--cream);
    border-radius: 16px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(31, 31, 31, 0.05);
}

.stat-item i {
    font-size: 1.5rem;
    color: var(--gold);
}

.stat-item span {
    color: rgba(31, 31, 31, 0.7);
    font-size: 0.95rem;
}

.stat-item strong {
    color: var(--crimson);
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .music-card {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 40px 28px 48px;
    }

    .hero-orbit {
        right: 20px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quotes-grid {
        grid-template-columns: 1fr;
    }
    
    /* Thu nhỏ decorations trên tablet */
    .lantern {
        width: 40px;
        height: 56px;
    }
    
    .lantern-left {
        left: 70px;
    }
    
    .lantern-right {
        right: 70px;
    }
    
    .cau-doi {
        width: 50px;
        height: 160px;
    }
    
    .cau-doi-text {
        font-size: 1.6rem;
        letter-spacing: 12px;
    }
}

@media (max-width: 720px) {
    .game-container {
        margin: 16px 8px;
        border-radius: 12px;
    }

    #gameCanvas {
        min-height: 250px; /* Đảm bảo canvas không quá nhỏ */
    }

    .game-info {
        flex-direction: column;
        gap: 12px;
    }

    .lixi-envelope {
        width: 150px;
        height: 200px;
    }

    .envelope-body i {
        font-size: 3rem;
    }
    
    /* Ẩn hoặc thu nhỏ decorations trên mobile */
    .flower-branch {
        display: none;
    }
    
    .firework {
        width: 3px;
        height: 3px;
    }
}

/* Mobile Landscape Mode - Phù hợp cho mobile quay ngang */
@media (max-width: 900px) and (orientation: landscape) {
    .page {
        padding: 20px 10px;
    }
    
    .game-container {
        max-width: 95vw;
        margin: 12px auto;
        border-radius: 8px;
    }
    
    #gameCanvas {
        max-height: 70vh; /* Giới hạn chiều cao */
        width: auto;
        margin: 0 auto;
    }
    
    .game-section {
        padding: 20px 10px;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .character-selector {
        padding: 10px;
        margin: 10px 0;
    }
    
    .game-controls-bar {
        margin: 10px 0;
        gap: 8px;
    }
    
    .game-control-btn, .character-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    
    .game-info {
        flex-direction: row;
        gap: 15px;
        font-size: 14px;
    }
    
    .game-stats {
        gap: 15px;
    }
    
    /* Ẩn các decorations không cần thiết */
    .tet-decorations {
        display: none;
    }
    
    .hero {
        padding: 40px 20px;
    }
    
    .game-instructions {
        padding: 12px;
        font-size: 13px;
    }
}
    .lantern {
        width: 35px;
        height: 49px;
    }
    
    .lantern-left {
        left: 50px;
        top: 10px;
    }
    
    .lantern-right {
        right: 50px;
        top: 10px;
    }
    
    .cau-doi {
        width: 40px;
        height: 140px;
        top: 60px;
    }
    
    .cau-doi-text {
        font-size: 1.4rem;
        letter-spacing: 8px;
    }
}

@media (max-width: 540px) {
    .page {
        padding: 20px 12px 40px;
    }

    .hero {
        padding: 32px 20px 40px;
        margin-bottom: 24px;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-sub {
        font-size: 0.95rem;
    }
    
    .hero-badge {
        font-size: 0.7rem;
        padding: 6px 14px;
    }

    .greeting-card,
    .game-section,
    .countdown-section,
    .lixi-section,
    .quotes-section {
        padding: 24px 16px;
        margin-bottom: 20px;
    }
    
    .greeting-card h2,
    .countdown-section h2,
    .lixi-section h2,
    .quotes-section h2,
    .game-section .section-title h2 {
        font-size: 1.6rem;
    }

    .music-embed iframe {
        height: 190px;
    }

    .game-over-screen {
        padding: 20px 24px;
    }

    .game-over-screen h3 {
        font-size: 1.5rem;
    }

    .countdown-value {
        font-size: 1.8rem;
    }
    
    .countdown-label {
        font-size: 0.8rem;
    }
    
    .countdown-grid {
        gap: 10px;
    }

    .game-stats {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .game-controls-bar {
        flex-direction: column;
        gap: 8px;
    }

    .game-control-btn,
    .difficulty-select {
        width: 100%;
        justify-content: center;
    }
    
    .wish-chip {
        font-size: 0.9rem;
        padding: 8px 14px;
    }
    
    .lixi-envelope {
        width: 140px;
        height: 180px;
    }
    
    .envelope-body i {
        font-size: 2.5rem;
    }
    
    .envelope-body p {
        font-size: 1rem;
    }
    
    .quote-card {
        padding: 20px 16px;
    }
    
    .quote-card p {
        font-size: 0.95rem;
    }
    
    .game-info {
        gap: 8px;
        padding: 12px;
    }
    
    .score-display,
    .high-score-display,
    .obstacles-passed {
        font-size: 0.95rem;
    }
    
    .score-display span,
    .high-score-display span,
    .obstacles-passed span {
        font-size: 1.1rem;
    }
    
    /* Ẩn decorations không cần thiết trên màn hình rất nhỏ */
    .cau-doi {
        width: 35px;
        height: 120px;
        top: 50px;
    }
    
    .cau-doi.left {
        left: 5px;
    }
    
    .cau-doi.right {
        right: 5px;
    }
    
    .cau-doi-text {
        font-size: 1.2rem;
        letter-spacing: 6px;
    }
    
    .lantern-left,
    .lantern-right {
        display: none;
    }
}

@media (max-width: 380px) {
    .page {
        padding: 16px 8px 32px;
    }
    
    .hero {
        padding: 24px 16px 32px;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-sub {
        font-size: 0.85rem;
    }
    
    .countdown-item {
        padding: 16px 12px;
    }
    
    .countdown-value {
        font-size: 1.5rem;
    }
    
    .lixi-envelope {
        width: 120px;
        height: 160px;
    }
    
    .envelope-body i {
        font-size: 2rem;
    }
    
    .envelope-body p {
        font-size: 0.9rem;
    }
    
    /* Ẩn hầu hết decorations trên màn hình cực nhỏ */
    .cau-doi {
        display: none;
    }
    
    .firework {
        display: none;
    }
}

/* Cải thiện touch targets cho mobile */
@media (hover: none) and (pointer: coarse) {
    .lixi-envelope,
    .game-control-btn,
    .difficulty-select,
    .btn-restart,
    .btn-roll,
    .backHome {
        min-height: 44px;
        min-width: 44px;
    }
    
    .wish-chip {
        min-height: 36px;
    }
    
    /* Tối ưu scroll cho mobile */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Tăng kích thước text nhẹ cho dễ đọc */
    .hero-sub,
    .greeting-card p,
    .quote-card p {
        font-size: 1rem;
        line-height: 1.7;
    }
}

