* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Plus Jakarta Sans', sans-serif; }

body {
    background: linear-gradient(135deg, #fbcfe8 0%, #f472b6 50%, #db2777 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    color: #4a3b32;
}

/* PRELOADER */
#preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #fff0f3; display: flex; flex-direction: column;
    justify-content: center; align-items: center; z-index: 9999;
    transition: opacity 0.5s ease;
}
.preloader-hidden { opacity: 0; pointer-events: none; }
.loader-heart { font-size: 45px; animation: bounce 1s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-12px); } }

/* CONTAINER & CARD LAYOUT */
.birthday-container {
    width: 100%;
    max-width: 480px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px);
    border-radius: 28px;
    padding: 35px 25px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    border: 2px solid rgba(255,255,255,0.6);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.card-section { display: none; animation: fadeIn 0.4s ease forwards; }
.card-section.active { display: block; }

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

/* ELEMENTS */
.badge {
    display: inline-block; background: #ffe4e6; padding: 6px 14px;
    border-radius: 20px; font-size: 0.8rem; font-weight: 700; color: #db2777; margin-bottom: 12px;
}
h1, h2 { font-size: 1.8rem; color: #831843; margin-bottom: 10px; line-height: 1.3; }
p { font-size: 0.92rem; color: #6b7280; margin-bottom: 20px; line-height: 1.5; }

/* COUNTDOWN */
.countdown-grid { display: flex; gap: 8px; margin-bottom: 25px; }
.time-box {
    flex: 1; background: #fff; padding: 12px 5px; border-radius: 14px;
    border: 1.5px solid #fbcfe8; box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.time-box span { display: block; font-size: 1.4rem; font-weight: 700; color: #db2777; }
.time-box small { font-size: 0.75rem; color: #9ca3af; }

/* CAKE */
.cake-box { font-size: 60px; margin: 20px 0; position: relative; }
.candles-flame { font-size: 24px; position: absolute; top: -15px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; }

/* LETTER */
.letter-box { background: #fff; padding: 20px; border-radius: 18px; border: 1.5px solid #fbcfe8; margin-bottom: 15px; text-align: left; max-height: 320px; overflow-y: auto; }
.letter-photo-frame { width: 110px; height: 110px; margin: 0 auto 15px; border-radius: 50%; overflow: hidden; border: 3px solid #db2777; box-shadow: 0 6px 15px rgba(219,39,119,0.2); }
.letter-photo-frame img { width: 100%; height: 100%; object-fit: cover; }
.letter-text { font-size: 0.88rem; color: #4a3b32; white-space: pre-line; line-height: 1.7; }

/* BUTTONS */
.button-group { display: flex; gap: 10px; justify-content: center; }
.btn-next {
    background: #db2777; color: white; border: none; width: 100%;
    padding: 13px; border-radius: 25px; font-weight: 700; font-size: 0.95rem;
    cursor: pointer; box-shadow: 0 6px 18px rgba(219,39,119,0.35); transition: transform 0.2s;
}
.btn-secondary {
    background: #8b5cf6; color: white; border: none; flex: 1;
    padding: 13px; border-radius: 25px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
}
.btn-back { background: transparent; border: none; color: #9ca3af; font-weight: 600; cursor: pointer; margin-top: 15px; font-size: 0.85rem; display: block; width: 100%; }
.btn-trick { background: #fff; color: #db2777; border: 2px solid #db2777; width: 100%; padding: 13px; border-radius: 25px; font-weight: 700; cursor: pointer; }

.status-text { font-size: 0.85rem; color: #db2777; font-weight: 600; margin-top: 10px; min-height: 20px; }
.game-area { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }

/* FLOATING MUSIC */
.floating-music-btn {
    position: fixed; bottom: 15px; right: 15px; background: white; color: #db2777;
    border: 2px solid #db2777; padding: 8px 16px; border-radius: 20px; font-weight: 700;
    font-size: 0.85rem; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 1000;
}
.floating-music-btn.playing { background: #db2777; color: white; }
