/* ============================================
   🎂 THIỆP CHIA BUỒN - ĐỨC ĐỨC BIRTHDAY
   ============================================ */

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

:root {
    --pink: #ff6b9d;
    --pink-light: #ffd4e5;
    --pink-dark: #d63384;
    --yellow: #ffd93d;
    --orange: #ff8c42;
    --purple: #6c5ce7;
    --blue: #74b9ff;
    --green: #55efc4;
    --bg-dark: #1a1a2e;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: 'Quicksand', sans-serif;
    overflow-x: hidden;
    background: var(--bg-dark);
    color: #fff;
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32'><text y='28' font-size='28'>🎈</text></svg>"), auto;
}

/* ============ SCREEN SYSTEM ============ */
.screen {
    min-height: 100vh;
    display: none;
    position: relative;
    overflow: hidden;
}

.screen.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ INTRO SCREEN ============ */
#intro-screen {
    background: radial-gradient(circle at center, #1a1a2e 0%, #0a0a0a 100%);
    cursor: pointer;
    user-select: none;
}

.intro-content {
    text-align: center;
    animation: fadeIn 1s ease-out;
}

.intro-emoji {
    font-size: 5rem;
    animation: float 2s ease-in-out infinite;
    margin-bottom: 1.5rem;
}

.intro-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.intro-tap {
    font-size: 1.1rem;
    color: var(--pink);
    animation: pulse-tap 1.5s ease-in-out infinite;
}

@keyframes pulse-tap {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

/* ============ SCREEN 0: FAKE WARNING ============ */
#fake-warning {
    background: #0a0a0a;
    animation: glitch-bg 0.1s infinite;
}

@keyframes glitch-bg {
    0% { background-color: #0a0a0a; }
    49% { background-color: #0a0a0a; }
    50% { background-color: #0d0d0d; }
    100% { background-color: #0a0a0a; }
}

.warning-box {
    text-align: center;
    padding: 3rem;
    max-width: 600px;
    border: 3px solid #ff0000;
    border-radius: 20px;
    background: rgba(255, 0, 0, 0.05);
    animation: pulse-border 1.5s ease-in-out infinite;
}

@keyframes pulse-border {
    0%, 100% { border-color: #ff0000; box-shadow: 0 0 20px rgba(255, 0, 0, 0.3); }
    50% { border-color: #ff4444; box-shadow: 0 0 40px rgba(255, 0, 0, 0.6); }
}

.warning-icon {
    font-size: 5rem;
    animation: shake 0.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: translateX(0) rotate(0); }
    25% { transform: translateX(-10px) rotate(-5deg); }
    75% { transform: translateX(10px) rotate(5deg); }
}

.warning-box h1 {
    font-family: 'Bangers', cursive;
    font-size: 2.5rem;
    color: #ff0000;
    margin: 1rem 0;
    letter-spacing: 3px;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.warning-text {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.suspect-name {
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

.highlight {
    color: var(--yellow);
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.loading-bar-container {
    width: 100%;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.loading-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff0000, var(--yellow), #ff0000);
    border-radius: 10px;
    transition: width 0.3s;
    animation: loading-glow 1s infinite;
}

@keyframes loading-glow {
    0%, 100% { box-shadow: 0 0 5px #ff0000; }
    50% { box-shadow: 0 0 20px var(--yellow); }
}

.loading-text {
    color: #888;
    font-size: 0.9rem;
}

.btn-warning {
    background: linear-gradient(45deg, #ff0000, #ff4444);
    color: #fff;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-family: 'Bangers', cursive;
    letter-spacing: 2px;
    border-radius: 50px;
    cursor: pointer;
    animation: pulse-btn 1s infinite;
    transition: transform 0.2s;
}

.btn-warning:hover {
    transform: scale(1.1);
}

@keyframes pulse-btn {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(255, 0, 0, 0); }
}

/* ============ SCREEN 1: HERO ============ */
#screen-hero {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 50%, #ff9a9e 100%);
    flex-direction: column;
    padding: 2rem;
}

.hero-content {
    text-align: center;
    z-index: 2;
    max-width: 700px;
}

.badge-old {
    display: inline-block;
    background: rgba(0,0,0,0.7);
    color: var(--yellow);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 1rem;
    animation: float 3s ease-in-out infinite;
}

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

.hero-title {
    font-family: 'Bangers', cursive;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 2rem;
}

.line1 {
    font-size: 2rem;
    color: #333;
    letter-spacing: 5px;
    animation: slideInLeft 0.8s ease-out;
}

.line2 {
    font-size: 4.5rem;
    background: linear-gradient(45deg, var(--pink-dark), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInRight 0.8s ease-out 0.3s both;
    text-shadow: none;
}

.line3 {
    font-size: 2.5rem;
    color: #333;
    letter-spacing: 3px;
    animation: slideInLeft 0.8s ease-out 0.6s both;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

.avatar-container {
    position: relative;
    display: inline-block;
    margin: 1.5rem 0;
    animation: bounceIn 1s ease-out 1s both;
}

@keyframes bounceIn {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    50% { transform: scale(1.2) rotate(5deg); }
    70% { transform: scale(0.9) rotate(-3deg); }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.avatar-img {
    width: 250px;
    height: 250px;
    object-fit: cover;
    border-radius: 20px;
    border: 5px solid #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transform: rotate(-3deg);
    transition: transform 0.3s;
}

.avatar-img:hover {
    transform: rotate(5deg) scale(1.05);
    animation: wobble 0.5s;
}

@keyframes wobble {
    0% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(10deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg) scale(1.05); }
}

.avatar-label {
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.party-hat {
    position: absolute;
    top: -25px;
    right: -10px;
    font-size: 3rem;
    animation: float 2s ease-in-out infinite;
    transform-origin: bottom center;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: #555;
    margin: 1.5rem 0 2rem;
    animation: fadeIn 1s ease-out 1.5s both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-main {
    background: linear-gradient(45deg, var(--pink-dark), var(--purple));
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.2rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(214, 51, 132, 0.4);
    animation: fadeIn 1s ease-out 2s both;
}

.btn-main:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 30px rgba(214, 51, 132, 0.6);
}

/* ============ CONFETTI ============ */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 30px;
    top: -30px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    to {
        top: 110vh;
        transform: rotateZ(720deg) rotateY(360deg);
    }
}

/* ============ SCREEN 2: QUIZ ============ */
#screen-quiz {
    background: linear-gradient(135deg, #0c0c1d 0%, #1a1a3e 50%, #2d1b69 100%);
    padding: 2rem;
}

.quiz-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.quiz-title {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--yellow);
    margin-bottom: 2rem;
    text-shadow: 0 0 20px rgba(255, 217, 61, 0.3);
    animation: float 3s ease-in-out infinite;
}

.question-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.q-number {
    color: var(--pink);
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.q-text {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #fff;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.ans-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 1rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.ans-btn:hover {
    background: rgba(255, 107, 157, 0.2);
    border-color: var(--pink);
    transform: translateX(10px);
}

.ans-btn.correct {
    background: rgba(85, 239, 196, 0.3) !important;
    border-color: var(--green) !important;
    animation: correctAnswer 0.5s;
}

.ans-btn.wrong {
    background: rgba(255, 0, 0, 0.3) !important;
    border-color: #ff0000 !important;
    animation: wrongAnswer 0.5s;
}

@keyframes correctAnswer {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes wrongAnswer {
    0%, 50%, 100% { transform: translateX(0); }
    25% { transform: translateX(-15px); }
    75% { transform: translateX(15px); }
}

.result-card {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--yellow);
    border-radius: 20px;
    padding: 2rem;
    animation: bounceIn 0.8s ease-out;
}

.result-card h3 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--yellow);
    margin-bottom: 1rem;
}

.result-card p {
    font-size: 1.1rem;
    color: #ccc;
    margin-bottom: 1rem;
}

.score-display {
    font-size: 3rem;
    margin: 1rem 0;
}

.hidden {
    display: none !important;
}

/* ============ SCREEN 3: GAME ============ */
#screen-game {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #1a1a2e 100%);
    padding: 2rem;
}

.game-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.game-title {
    font-family: 'Bangers', cursive;
    font-size: 1.8rem;
    color: var(--orange);
    margin-bottom: 0.5rem;
    text-shadow: 0 0 20px rgba(255, 140, 66, 0.3);
}

.game-desc {
    color: #aaa;
    margin-bottom: 1rem;
}

.game-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
}

#gameScore { color: var(--yellow); }
#gameTimer { color: var(--pink); }

.game-area {
    width: 100%;
    height: 400px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.game-start-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10;
    border-radius: 20px;
}

.btn-game-start {
    background: linear-gradient(45deg, var(--orange), var(--yellow));
    color: #333;
    border: none;
    padding: 1.2rem 3rem;
    font-size: 1.5rem;
    font-family: 'Bangers', cursive;
    letter-spacing: 3px;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
    animation: pulse-btn 1.5s infinite;
}

.btn-game-start:hover {
    transform: scale(1.1);
}

.falling-item {
    position: absolute;
    font-size: 2.5rem;
    cursor: pointer;
    animation: fall linear forwards;
    transition: transform 0.1s;
    user-select: none;
    z-index: 5;
}

.falling-item:hover {
    transform: scale(1.3);
}

.falling-item.caught {
    animation: caught 0.3s ease-out forwards !important;
}

@keyframes fall {
    from { top: -50px; }
    to { top: 450px; }
}

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

.game-result {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--orange);
    border-radius: 20px;
    padding: 2rem;
    margin-top: 1rem;
    animation: bounceIn 0.8s ease-out;
}

.game-result h3 {
    font-family: 'Bangers', cursive;
    font-size: 2rem;
    color: var(--orange);
    margin-bottom: 0.5rem;
}

.game-result p {
    color: #ccc;
    margin-bottom: 1rem;
}

/* ============ SCREEN 4: FINAL ============ */
#screen-final {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    padding: 2rem;
}

.final-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.envelope {
    width: 250px;
    height: 180px;
    margin: 3rem auto;
    position: relative;
    cursor: pointer;
    animation: float 3s ease-in-out infinite;
    transition: transform 0.3s;
}

.envelope:hover {
    transform: scale(1.1);
}

.envelope-body {
    width: 250px;
    height: 180px;
    background: linear-gradient(145deg, #f5e6d3, #e8d5b7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border: 2px solid #d4c5a9;
}

.envelope-body p {
    color: #8b7355;
    font-weight: 700;
    font-size: 1.1rem;
}

.envelope-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-left: 125px solid transparent;
    border-right: 125px solid transparent;
    border-top: 90px solid #d4c5a9;
    z-index: 2;
    transition: transform 0.5s;
    transform-origin: top center;
}

.envelope.opened .envelope-top {
    transform: rotateX(180deg);
}

.letter {
    animation: slideUp 0.8s ease-out;
}

.letter-content {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.letter-content h2 {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--yellow);
    margin-bottom: 1.5rem;
}

.letter-avatar {
    margin: 1rem 0;
}

.letter-img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid var(--pink);
    box-shadow: 0 0 30px rgba(255, 107, 157, 0.3);
    animation: float 3s ease-in-out infinite;
}

.letter-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #ddd;
    text-align: left;
    margin: 1.5rem 0;
}

.letter-text strong {
    color: var(--yellow);
}

/* Wish Cards */
.wishes-section {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin: 1.5rem 0;
}

.wish-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.2rem 1.5rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: slideUp 0.5s ease-out both;
}

.wish-card:nth-child(1) { animation-delay: 0.1s; }
.wish-card:nth-child(2) { animation-delay: 0.3s; }
.wish-card:nth-child(3) { animation-delay: 0.5s; }

.wish-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 157, 0.2);
    border-color: var(--pink);
}

.wish-author {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--yellow);
    margin-bottom: 0.5rem;
}

.wish-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #ddd;
}

/* Group Photo */
.group-photo {
    margin: 2rem 0;
    text-align: center;
}

.group-img {
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s;
}

.group-img:hover {
    transform: scale(1.03) rotate(1deg);
}

.group-label {
    color: #aaa;
    font-size: 0.9rem;
    margin-top: 0.8rem;
    font-weight: 600;
}

/* Letter Final */
.letter-final {
    font-size: 1.4rem;
    color: var(--yellow);
    text-align: center;
    margin: 1.5rem 0 0.5rem;
}

.signature {
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-style: italic;
    color: var(--pink);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.btn-party {
    background: linear-gradient(45deg, var(--yellow), var(--orange), var(--pink), var(--purple));
    background-size: 300% 300%;
    animation: gradient-shift 2s ease infinite;
    color: #fff;
    border: none;
    padding: 1.2rem 2.5rem;
    font-size: 1.3rem;
    font-family: 'Bangers', cursive;
    letter-spacing: 3px;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2rem;
    transition: transform 0.3s;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.btn-party:hover {
    transform: scale(1.1) rotate(-2deg);
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============ PARTY OVERLAY ============ */
.party-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 2rem 1rem;
    animation: partyFlash 0.2s infinite;
}

@keyframes partyFlash {
    0% { background-color: rgba(255, 0, 100, 0.15); }
    25% { background-color: rgba(0, 255, 100, 0.15); }
    50% { background-color: rgba(100, 0, 255, 0.15); }
    75% { background-color: rgba(255, 255, 0, 0.15); }
    100% { background-color: rgba(0, 100, 255, 0.15); }
}

.party-content {
    text-align: center;
    z-index: 10;
    margin: auto;
    max-width: 500px;
    width: 100%;
}

.giant-emoji {
    font-size: 8rem;
    animation: spin-bounce 1s ease-in-out infinite;
}

@keyframes spin-bounce {
    0%, 100% { transform: scale(1) rotate(0); }
    25% { transform: scale(1.3) rotate(-15deg); }
    50% { transform: scale(0.8) rotate(15deg); }
    75% { transform: scale(1.2) rotate(-10deg); }
}

.rainbow-text {
    font-family: 'Bangers', cursive;
    font-size: 3.5rem;
    letter-spacing: 5px;
    background: linear-gradient(to right, #ff0000, #ff7700, #ffff00, #00ff00, #0000ff, #8b00ff, #ff0000);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: rainbow 2s linear infinite;
    margin: 1rem 0;
}

@keyframes rainbow {
    to { background-position: 200% center; }
}

.disco-ball {
    font-size: 5rem;
    animation: disco 1s ease-in-out infinite;
    margin: 1rem 0;
}

@keyframes disco {
    0%, 100% { transform: rotate(0) scale(1); filter: hue-rotate(0); }
    25% { transform: rotate(30deg) scale(1.2); filter: hue-rotate(90deg); }
    50% { transform: rotate(-20deg) scale(0.9); filter: hue-rotate(180deg); }
    75% { transform: rotate(15deg) scale(1.1); filter: hue-rotate(270deg); }
}

.party-emojis {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

.party-emoji {
    position: absolute;
    font-size: 2rem;
    animation: party-float 3s ease-out forwards;
}

@keyframes party-float {
    0% { opacity: 1; transform: translateY(0) rotate(0) scale(1); }
    100% { opacity: 0; transform: translateY(-300px) rotate(720deg) scale(0); }
}

/* Gift Box */
.gift-box-container {
    cursor: pointer;
    margin: 1.5rem 0;
    animation: float 2s ease-in-out infinite;
}

.gift-box {
    text-align: center;
}

.gift-lid {
    font-size: 5rem;
    animation: gift-bounce 1s ease-in-out infinite;
    transition: transform 0.5s;
}

.gift-box-container:hover .gift-lid {
    animation: gift-shake 0.3s infinite;
}

.gift-label {
    color: var(--yellow);
    font-weight: 700;
    font-size: 1rem;
    margin-top: 0.3rem;
}

.gift-box-container.opened .gift-lid {
    transform: translateY(-80px) rotate(45deg) scale(0);
    opacity: 0;
}

.gift-box-container.opened .gift-label {
    display: none;
}

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

@keyframes gift-shake {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.gift-message-content {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid var(--yellow);
    border-radius: 20px;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(10px);
    animation: bounceIn 0.8s ease-out;
    text-align: center;
}

.gift-surprise-text {
    font-family: 'Bangers', cursive;
    font-size: 1.4rem;
    color: var(--yellow);
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.gift-detail {
    font-size: 1.1rem;
    color: #ddd;
    line-height: 1.6;
}

.gift-emoji-rain {
    font-size: 2rem;
    margin-top: 0.8rem;
    animation: gift-bounce 1.5s ease-in-out infinite;
    letter-spacing: 8px;
}

.btn-close-party {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    margin-top: 2rem;
    transition: all 0.3s;
}

.btn-close-party:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* ============ FLOATING EMOJIS ============ */
.floating-emojis {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 50;
}

.float-emoji {
    position: absolute;
    bottom: -50px;
    animation: rise linear forwards;
    font-size: 1.5rem;
}

@keyframes rise {
    to {
        bottom: 110vh;
        opacity: 0;
        transform: rotate(360deg) translateX(100px);
    }
}

/* ============ CURSOR TRAIL ============ */
#cursorTrail {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    width: 100%;
    height: 100%;
}

/* ============ FIREWORKS ============ */
.fireworks {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.firework {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: firework-burst 1.5s ease-out forwards;
}

@keyframes firework-burst {
    0% { transform: scale(0); opacity: 1; }
    50% { opacity: 1; }
    100% { transform: scale(1) translate(var(--tx), var(--ty)); opacity: 0; }
}

/* ============ FUNNY BUTTON DODGE ============ */
.dodge-btn {
    transition: all 0.2s;
}

/* ============ SCREEN TRANSITION ============ */
.screen-enter {
    animation: screenEnter 0.8s ease-out;
}

@keyframes screenEnter {
    from { opacity: 0; transform: scale(0.8) rotate(-5deg); }
    to { opacity: 1; transform: scale(1) rotate(0); }
}

/* ============ MUSIC TOGGLE ============ */
.music-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.music-toggle:hover {
    background: rgba(255, 107, 157, 0.4);
    transform: scale(1.1);
    border-color: var(--pink);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .warning-box h1 { font-size: 1.8rem; }
    .line1 { font-size: 1.5rem; }
    .line2 { font-size: 3rem; }
    .line3 { font-size: 1.8rem; }
    .avatar-img { width: 180px; height: 180px; }
    .quiz-title { font-size: 1.5rem; }
    .game-title { font-size: 1.4rem; }
    .game-area { height: 300px; }
    .rainbow-text { font-size: 2rem; }
    .giant-emoji { font-size: 5rem; }
    .letter-content { padding: 1.5rem; }
    .btn-party { font-size: 1rem; padding: 1rem 2rem; }
}

@media (max-width: 480px) {
    .warning-box { padding: 1.5rem; }
    .warning-box h1 { font-size: 1.4rem; }
    .line2 { font-size: 2.5rem; }
    .avatar-img { width: 150px; height: 150px; }
    .q-text { font-size: 1.1rem; }
    .game-area { height: 250px; }
    .falling-item { font-size: 2rem; }
}
