/* ============================================
   BIRTHDAY SURPRISE WEBSITE - STYLES
   Theme: MR.DIY O.O Meow Cat + Yellow
   ============================================ */

/* === VARIABLES === */
:root {
    --yellow-bg: #FFD700;
    --yellow-light: #FFF8DC;
    --yellow-glow: #FFEB3B;
    --yellow-dark: #E6B800;
    --black-cat: #1a1a1a;
    --pink-accent: #FF6B9D;
    --pink-light: #FFB3C6;
    --pink-glow: rgba(255, 107, 157, 0.4);
    --white: #FFFFFF;
    --gold: #FFD700;
}

/* === RESET === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(180deg, #FFE066 0%, var(--yellow-bg) 30%, #FFC107 100%);
    min-height: 100vh;
    overflow: hidden;
    /* Disable scrolling - section navigation */
    color: var(--black-cat);
}

/* Full-page section navigation */
.section-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.5s ease;
}

.section-container:not(.active) {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.section-container.active {
    transform: translateY(0);
    opacity: 1;
}

/* Section navigation dots */
.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 500;
}

.section-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    border: 2px solid var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.section-dot.active {
    background: var(--pink-accent);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--pink-glow);
}

.section-dot:hover {
    background: var(--pink-light);
}

/* Next section button */
.next-section-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 8px 25px var(--pink-glow);
    transition: all 0.3s ease;
    z-index: 50;
}

.next-section-btn:hover {
    transform: translateX(-50%) translateY(-3px);
    box-shadow: 0 12px 35px var(--pink-glow);
}

/* Button inside game completion message shouldn't be absolute */
.game-complete-msg .next-section-btn {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    margin-top: 20px;
    display: inline-block;
}

.game-complete-msg .next-section-btn:hover {
    transform: translateY(-3px);
}

/* Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    border-radius: 24px;
}

/* === LOADING SCREEN === */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--yellow-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loading-cat {
    width: 120px;
    height: auto;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--black-cat);
    font-weight: 600;
}

.loading-dots span {
    animation: loadingDot 1.4s infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDot {

    0%,
    80%,
    100% {
        opacity: 0;
    }

    40% {
        opacity: 1;
    }
}

/* === PARTICLES BACKGROUND === */
.particles-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
}

/* === FLOATING HEARTS & SPARKLES === */
.sparkles-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.sparkle-star {
    position: absolute;
    font-size: 1.2rem;
    opacity: 0;
}

/* === HERO SECTION === */
.hero {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

/* Cat Mascot */
.cat-mascot {
    position: relative;
    margin-bottom: 30px;
}

.cat-image {
    width: 200px;
    height: auto;
    filter: drop-shadow(0 15px 40px rgba(0, 0, 0, 0.25));
    cursor: pointer;
    transition: filter 0.3s ease;
}

.cat-image:hover {
    filter: drop-shadow(0 20px 50px rgba(255, 107, 157, 0.4));
}

/* Birthday Hat on Cat */
.cat-hat {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-30%) rotate(15deg);
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 60px solid var(--pink-accent);
    filter: drop-shadow(0 5px 15px rgba(255, 107, 157, 0.5));
    opacity: 0;
}

.cat-hat::before {
    content: '✦';
    position: absolute;
    top: -20px;
    left: -7px;
    font-size: 1.2rem;
    color: var(--gold);
}

.cat-hat::after {
    content: '';
    position: absolute;
    bottom: -60px;
    left: -28px;
    width: 56px;
    height: 12px;
    background: repeating-linear-gradient(90deg,
            var(--gold),
            var(--gold) 7px,
            var(--pink-accent) 7px,
            var(--pink-accent) 14px);
    border-radius: 3px;
}

/* Hero Text */
.hero-content {
    opacity: 0;
    transform: translateY(30px);
}

.hero-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2.2rem, 10vw, 4rem);
    color: var(--black-cat);
    margin-bottom: 15px;
    line-height: 1.2;
}

.hero-name {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
    font-weight: 700;
    color: var(--pink-accent);
    margin-bottom: 25px;
    text-shadow: 0 3px 15px var(--pink-glow);
}

.age-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: var(--white);
    font-size: 3rem;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px var(--pink-glow);
    opacity: 0;
    transform: scale(0);
}

/* CTA Button */
.cta-btn {
    background: linear-gradient(135deg, var(--black-cat), #333);
    color: var(--white);
    border: none;
    padding: 20px 50px;
    font-size: 1.25rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    border-radius: 60px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateY(20px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.4);
}

.cta-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.6s ease;
}

.cta-btn:hover::before {
    left: 100%;
}

/* === QUIZ MODAL === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    padding: 40px 30px;
    max-width: 440px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.4) inset;
    transform: scale(0.8) translateY(50px);
    opacity: 0;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #888;
    transition: all 0.3s ease;
    line-height: 0;
}

.modal-close:hover {
    color: var(--white);
    background: var(--pink-accent);
    transform: rotate(90deg);
}

.quiz-header {
    text-align: center;
    margin-bottom: 35px;
}

.quiz-cat-mini {
    width: 85px;
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.1));
}

.quiz-title {
    font-family: 'Quicksand', sans-serif;
    font-size: 1.6rem;
    color: var(--black-cat);
    margin-bottom: 5px;
}

/* Quiz Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    background: var(--white);
    border: 2px solid transparent;
    padding: 18px 25px;
    border-radius: 18px;
    font-family: 'Quicksand', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.quiz-option:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 107, 157, 0.3);
}

.quiz-option.selected {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: var(--white);
    border-color: transparent;
    box-shadow: 0 10px 25px var(--pink-glow);
    transform: translateY(-2px);
}

.quiz-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.7rem;
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.quiz-question {
    display: none;
}

.quiz-question.active {
    display: block;
}

.quiz-question h3 {
    font-size: 1.15rem;
    margin-bottom: 22px;
    color: var(--black-cat);
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quiz-option {
    background: linear-gradient(135deg, var(--yellow-light), #FFF);
    border: 2px solid transparent;
    padding: 18px 22px;
    border-radius: 18px;
    cursor: pointer;
    font-size: 1.05rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 500;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.quiz-option:hover {
    border-color: var(--pink-accent);
    transform: translateX(10px);
    box-shadow: 0 8px 25px var(--pink-glow);
}

.quiz-option.selected {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: var(--white);
    transform: scale(1.02);
    border-color: transparent;
}

.quiz-progress {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 30px;
}

.progress-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.4s ease;
}

.progress-dot.completed {
    background: var(--pink-accent);
    transform: scale(1.15);
}

.progress-dot.current {
    background: var(--gold);
    box-shadow: 0 0 15px var(--gold);
}

.quiz-result {
    display: none;
    text-align: center;
    padding: 20px 0;
}

.quiz-result.active {
    display: block;
}

.quiz-result h3 {
    font-family: 'Pacifico', cursive;
    font-size: 1.8rem;
    color: var(--pink-accent);
    margin-bottom: 20px;
}

.quiz-result p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #444;
}

.continue-btn {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: var(--white);
    border: none;
    padding: 18px 40px;
    font-size: 1.1rem;
    font-family: 'Quicksand', sans-serif;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 10px 30px var(--pink-glow);
    transition: all 0.3s ease;
}

.continue-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px var(--pink-glow);
}

/* === PHOTO COLLAGE SECTION === */
.photos-section {
    padding: 30px 15px 80px;
    background: linear-gradient(180deg, #f5f0e8 0%, #ebe6de 100%);
    position: relative;
    z-index: 10;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 7vw, 2.8rem);
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    z-index: 100;
}

/* Collage Container */
.photo-collage {
    position: relative;
    width: 100%;
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

/* Polaroid Frame */
.polaroid {
    position: absolute;
    background: #fff;
    padding: 10px 10px 35px 10px;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15),
        0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease, z-index 0s;
    will-change: transform;
}

.polaroid:hover {
    transform: scale(1.15) rotate(0deg) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    z-index: 1000 !important;
}

.polaroid img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

/* Different sizes for variety */
.polaroid.size-small {
    width: 100px;
}

.polaroid.size-medium {
    width: 140px;
}

.polaroid.size-large {
    width: 180px;
}

/* Floating animation classes */
.polaroid.float-1 {
    animation: polaroidFloat1 4s ease-in-out infinite;
}

.polaroid.float-2 {
    animation: polaroidFloat2 5s ease-in-out infinite;
}

.polaroid.float-3 {
    animation: polaroidFloat3 6s ease-in-out infinite;
}

.polaroid.float-4 {
    animation: polaroidFloat4 4.5s ease-in-out infinite;
}

@keyframes polaroidFloat1 {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotate));
    }

    50% {
        transform: translateY(-8px) rotate(calc(var(--rotate) + 2deg));
    }
}

@keyframes polaroidFloat2 {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotate));
    }

    50% {
        transform: translateY(-12px) rotate(calc(var(--rotate) - 2deg));
    }
}

@keyframes polaroidFloat3 {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotate));
    }

    50% {
        transform: translateY(-6px) rotate(calc(var(--rotate) + 3deg));
    }
}

@keyframes polaroidFloat4 {

    0%,
    100% {
        transform: translateY(0) rotate(var(--rotate));
    }

    50% {
        transform: translateY(-10px) rotate(calc(var(--rotate) - 1deg));
    }
}

/* Photo counter */
.photo-counter {
    text-align: center;
    margin-top: 40px;
    font-size: 1rem;
    color: #888;
    position: relative;
    z-index: 100;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .polaroid.size-small {
        width: 70px;
        padding: 6px 6px 25px 6px;
    }

    .polaroid.size-medium {
        width: 100px;
        padding: 8px 8px 30px 8px;
    }

    .polaroid.size-large {
        width: 130px;
    }

    .photo-collage {
        min-height: 500px;
    }
}

/* Mobile photo grid layout */
@media (max-width: 768px) {
    .photo-collage {
        overflow: visible;
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        padding: 10px !important;
        height: auto !important;
        min-height: auto !important;
    }

    .polaroid {
        position: static !important;
        width: 100% !important;
        left: auto !important;
        top: auto !important;
        padding: 5px 5px 18px 5px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
        animation: none !important;
    }

    .polaroid img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
    }
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    opacity: 0;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 95%;
    max-height: 85vh;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    transform: scale(0.9);
    opacity: 0;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--pink-accent);
    transform: rotate(90deg);
}

/* === LETTER GAME SECTION === */
.game-section {
    padding: 80px 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.game-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #555;
    line-height: 1.6;
}

.letter-display {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    /* Keep all letters on one row */
    gap: 6px;
    margin-bottom: 30px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 10px;
}

.letter-slot {
    width: 38px;
    height: 48px;
    min-width: 38px;
    /* Prevent shrinking */
    background: rgba(255, 255, 255, 0.9);
    border: 2px dashed var(--pink-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pink-accent);
    transition: all 0.4s ease;
}

.letter-slot.filled {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    border-color: var(--pink-accent);
    color: var(--white);
    box-shadow: 0 5px 20px var(--pink-glow);
}

.game-area {
    height: 320px;
    position: relative;
    background: linear-gradient(180deg, #2a2a3d, #1a1a2e);
    border-radius: 30px;
    margin: 30px auto;
    max-width: 500px;
    overflow: hidden;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 215, 0, 0.3);
}

/* Stars background in game area */
.game-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 50px 160px, rgba(255, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 90px 40px, rgba(255, 255, 255, 0.2), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255, 255, 255, 0.25), transparent),
        radial-gradient(2px 2px at 160px 120px, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
}

.floating-letter {
    position: absolute;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold) !important;
    cursor: pointer;
    user-select: none;
    text-shadow:
        0 0 20px var(--gold),
        0 0 40px rgba(255, 215, 0, 0.6),
        0 0 60px rgba(255, 215, 0, 0.4);
    z-index: 100;
    /* Force visibility */
    visibility: visible !important;
    display: block !important;
}

.floating-letter:hover {
    transform: scale(1.4) !important;
}

.floating-letter.collected {
    pointer-events: none;
}

/* Letter floating animation */
@keyframes letterFloat {
    0% {
        transform: translateY(0) scale(1);
    }

    100% {
        transform: translateY(-15px) scale(1.05);
    }
}

.game-hint {
    font-size: 0.95rem;
    color: #888;
    margin-top: 15px;
}

/* Game Success Overlay (Embedded) */
.game-success-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: all 0.5s ease;
}

.game-success-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.success-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 2px solid var(--pink-light);
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.game-success-overlay.active .success-content {
    transform: scale(1);
}

.success-content h3 {
    font-size: 1.8rem;
    color: var(--pink-accent);
    margin-bottom: 5px;
}

.success-content p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.claim-gift-btn {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(255, 107, 157, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.claim-gift-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(255, 107, 157, 0.4);
}

/* Pulse Animation */
.heart-pulse {
    font-size: 3rem;
    margin: 20px 0;
    display: inline-block;
    animation: heartBeat 1.5s infinite;
}

@keyframes heartBeat {
    0% {
        transform: scale(1);
    }

    14% {
        transform: scale(1.3);
    }

    28% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.3);
    }

    70% {
        transform: scale(1);
    }
}

/* === SECRET MESSAGE - LOVE LETTER STYLE === */
.secret-section {
    padding: 60px 20px 100px;
    background: linear-gradient(180deg, #FFF0F5 0%, #FFE4E1 100%);
    text-align: center;
    position: relative;
    z-index: 10;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.secret-section.active {
    display: block;
}

/* Floating hearts background */
.secret-section::before {
    content: '💕';
    position: absolute;
    top: 20px;
    left: 10%;
    font-size: 3rem;
    opacity: 0.15;
    animation: floatHeart 6s ease-in-out infinite;
}

.secret-section::after {
    content: '💗';
    position: absolute;
    bottom: 30px;
    right: 10%;
    font-size: 2.5rem;
    opacity: 0.15;
    animation: floatHeart 5s ease-in-out infinite 1s;
}

@keyframes floatHeart {

    0%,
    100% {
        transform: translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* Envelope/Letter Card */
.secret-message {
    max-width: 500px;
    margin: 0 auto;
    background: #fff;
    border-radius: 20px;
    padding: 40px 30px 50px;
    box-shadow:
        0 20px 60px rgba(255, 107, 157, 0.2),
        0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    z-index: 1;
}

/* Envelope flap decoration */
.secret-message::before {
    content: '';
    position: absolute;
    top: -30px;
    /* Adjusted to sit nicely */
    left: 50%;
    transform: translateX(-50%);
    width: 70px;
    /* Slightly larger */
    height: 70px;
    background: var(--pink-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.3);
}

.secret-message::after {
    content: '💌';
    position: absolute;
    top: -28px;
    /* Adjusted to center in circle */
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    z-index: 2;
}

.secret-message {
    padding-top: 60px;
    /* More space inside for title */
    margin-top: 40px;
    /* Space outside for the flap */
}

.secret-message h2 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(1.8rem, 6vw, 2.5rem);
    color: var(--pink-accent);
    margin-bottom: 25px;
    margin-top: 15px;
    opacity: 0;
    transform: translateY(30px);
}

.secret-message p {
    font-size: clamp(1rem, 3.5vw, 1.15rem);
    line-height: 1.9;
    margin-bottom: 18px;
    color: #555;
    text-align: left;
    opacity: 0;
    transform: translateY(20px);
}

.secret-message p:last-of-type {
    text-align: center;
    color: var(--pink-accent);
    font-weight: 600;
    margin-top: 25px;
}

.secret-message .signature {
    font-family: 'Pacifico', cursive;
    font-size: 1.3rem;
    color: var(--pink-accent);
    margin-top: 30px;
    text-align: center;
    opacity: 0;
}

.heart-emoji {
    font-size: 4rem;
    display: block;
    text-align: center;
    margin: 25px auto 10px;
    filter: drop-shadow(0 5px 15px rgba(255, 107, 157, 0.4));
    opacity: 0;
    transform: scale(0);
}

/* === CONFETTI === */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    opacity: 0;
}

/* === MUSIC TOGGLE === */
.music-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--black-cat), #333);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--white);
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.music-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.45);
}

.music-toggle.playing {
    background: linear-gradient(135deg, var(--pink-accent), #FF8FAB);
}

/* === RESPONSIVE === */
@media (min-width: 768px) {
    .cat-image {
        width: 250px;
    }

    .instax-carousel {
        height: 480px;
        max-width: 400px;
    }

    .instax-frame {
        width: 320px;
        padding: 18px 18px 55px 18px;
    }

    .letter-slot {
        width: 55px;
        height: 65px;
        font-size: 2.2rem;
    }

    .game-area {
        height: 380px;
        max-width: 600px;
    }

    .floating-letter {
        font-size: 2.8rem;
    }
}

@media (max-width: 380px) {
    .cat-image {
        width: 160px;
    }

    .age-badge {
        width: 80px;
        height: 80px;
        font-size: 2.5rem;
    }

    .instax-frame {
        width: 240px;
    }

    .letter-slot {
        width: 38px;
        height: 48px;
        font-size: 1.5rem;
    }
}

/* === MOBILE FIXES (Added for Scroll & Layout Issues) === */
@media (max-width: 768px) {

    /* Allow scrolling if content overflows */
    .section-container {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust photos section to flow naturally */
    .photos-section {
        height: auto !important;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding-top: 40px;
        padding-bottom: 50px;
    }

    /* Make Next Button relative and visible */
    .next-section-btn {
        position: relative !important;
        bottom: auto !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        margin: 30px auto;
        display: block;
        width: fit-content;
    }

    /* Ensure grid fits */
    .photo-collage {
        height: auto;
        min-height: 400px;
    }

    /* Ensure Game Area isn't cut off */
    .game-section {
        min-height: 100vh;
        height: auto;
        padding-bottom: 80px;
    }
}

/* === FINAL TWEAKS & POLISH === */
.music-toggle {
    display: none !important;
    /* Hide music button */
}

/* New External Header Styles */
.secret-header {
    text-align: center;
    margin-bottom: 20px;
    padding-top: 40px;
    animation: float 3s ease-in-out infinite;
}

.envelope-icon {
    font-size: 4rem;
    margin-bottom: 10px;
    filter: drop-shadow(0 5px 15px rgba(255, 107, 157, 0.4));
}

.secret-header h2 {
    font-family: 'Pacifico', cursive;
    font-size: clamp(2rem, 6vw, 2.8rem);
    color: var(--pink-accent);
    /* Changed to Pink as requested */
    text-shadow: 2px 2px 0px #fff;
    /* White outline for readability */
    margin: 0;
}

/* Elegant Background Orbs (Replacing Emojis) */
.sparkles-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    /* Behind content */
}

.glowing-orb {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 107, 157, 0.4) 0%, rgba(255, 107, 157, 0) 70%);
    filter: blur(2px);
}

.secret-message {
    width: 90%;
    max-width: 600px;
    max-height: 60vh;
    /* Reduced slightly to fit header */
    overflow-y: auto;
    /* Custom Scrollbar for cute look */
    scrollbar-width: thin;
    scrollbar-color: var(--pink-accent) #fff;
    padding: 30px;
    padding-right: 15px;
    /* Prevent text hiding behind scrollbar */
    box-sizing: border-box;
    margin: 0 auto;
    /* Reset styles from previous version */
    margin-top: 0;
}

/* Remove old pseudo-elements causing clip issues */
.secret-message::before,
.secret-message::after {
    display: none !important;
}

/* Clean up section padding */
.secret-section {
    overflow: visible;
    padding-top: 20px;
    /* Standard padding */
    min-height: 100vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-title>div {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Game Success - Better Styling */
.success-content {
    background: rgba(255, 255, 255, 0.98);
    border: 3px solid var(--pink-accent);
    box-shadow: 0 10px 40px rgba(255, 107, 157, 0.4);
    padding: 25px;
    border-radius: 25px;
    margin: 0 20px;
    /* Safety margin on mobile */
}

.success-content h3 {
    font-family: 'Pacifico', cursive;
    font-size: 2rem;
    color: var(--pink-accent);
    margin-bottom: 10px;
}

/* Ensure next button has space */
.next-section-btn {
    margin-bottom: 50px !important;
}

.hero-title>div {
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Ensure next button has space */
.next-section-btn {
    margin-bottom: 50px !important;
}