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

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Navigation Menu */
.nav-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 10px;
    z-index: 1000;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

:root {
    --nav-height: 64px; /* used to offset fixed nav */
}

.nav-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.nav-btn:hover,
.nav-btn.active {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

/* Visual hint when audio needs a user gesture */
.music-btn.needs-gesture {
    outline: 2px dashed #ffd6e0;
    box-shadow: 0 0 0 6px rgba(255, 214, 224, 0.18);
}

/* Content Sections */
.content-section {
    display: none;
    padding: calc(var(--nav-height) + 16px) 20px 20px; /* avoid being under nav */
    min-height: 100vh;
    position: relative;
    z-index: 10;
}

.content-section.active {
    display: block;
}

/* Main Content Section */
.main-content {
    position: relative;
    z-index: 10;
    perspective: 1000px;
    padding-top: calc(var(--nav-height) + 12px); /* ensure not hidden behind fixed nav */
}

.main-content.active {
    display: block;
}

.main-content:not(.active) {
    display: none;
}

.section-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    color: white;
    text-align: center;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
    /* Ensure content isn't hidden under fixed nav on small screens */
    body {
        padding-top: var(--nav-height);
    }

/* Rose Petals Animation */
.rose-petals {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Reduce the footprint and increase touch target for mobile */
    .music-player {
        min-width: 120px;
        padding: 8px;
        border-radius: 14px;
    }
    pointer-events: none;
    .music-btn {
        width: 48px;
        height: 48px;
        font-size: 1.1rem;
        padding: 10px;
    }
    z-index: 2;
    .music-player .song-title {
        display: none; /* conserve space on small screens */
    }
}

.petal {
    position: absolute;
    width: 15px;
    height: 15px;
    /* Lightbox should fit on small screens */
    .lightbox-content {
        max-width: 98% !important;
        max-height: 80% !important;
        width: auto;
        height: auto;
    }
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    border-radius: 50% 0 50% 0;
    animation: petalFall 8s linear infinite;
}

.petal:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
}

.petal:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
    animation-duration: 10s;
}

.petal:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
    animation-duration: 7s;
}

.petal:nth-child(4) {
    left: 70%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.petal:nth-child(5) {
    left: 90%;
    animation-delay: 3s;
    animation-duration: 6s;
}

@keyframes petalFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* Floating Hearts Animation */
.hearts {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.heart {
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    transform: rotate(45deg);
    animation: float 6s ease-in-out infinite;
}

.heart::before,
.heart::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #ff6b6b;
    border-radius: 50%;
}

.heart::before {
    top: -10px;
    left: 0;
}

.heart::after {
    top: 0;
    left: -10px;
}

.heart:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    animation-duration: 6s;
}

.heart:nth-child(2) {
    left: 20%;
    animation-delay: 2s;
    animation-duration: 8s;
}

.heart:nth-child(3) {
    left: 35%;
    animation-delay: 4s;
    animation-duration: 7s;
}

.heart:nth-child(4) {
    left: 50%;
    animation-delay: 1s;
    animation-duration: 9s;
}

.heart:nth-child(5) {
    left: 80%;
    animation-delay: 3s;
    animation-duration: 5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(100vh) rotate(45deg);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    50% {
        transform: translateY(-10vh) rotate(45deg);
    }
}

/* Main Content */
.main-content {
    position: relative;
    z-index: 10;
    perspective: 1000px;
    padding-top: 80px; /* ensure not hidden behind fixed nav */
}

.birthday-card {
    width: 400px;
    height: 500px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease-in-out;
}

.birthday-card.flipped {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    background: linear-gradient(145deg, #ffffff, #f0f0f0);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-back {
    transform: rotateY(180deg);
    background: linear-gradient(145deg, #ffeaa7, #fab1a0);
}

/* Cake Animation */
.cake-container {
    margin-bottom: 20px;
}

.cake {
    position: relative;
    width: 120px;
    height: 100px;
    margin: 0 auto;
    animation: bounce 2s ease-in-out infinite;
}

.cake-layer {
    position: absolute;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.layer1 {
    width: 100px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    bottom: 0;
    left: 10px;
}

.layer2 {
    width: 80px;
    height: 30px;
    background: linear-gradient(45deg, #4ecdc4, #6dd5ed);
    bottom: 30px;
    left: 20px;
}

.layer3 {
    width: 60px;
    height: 30px;
    background: linear-gradient(45deg, #ffeaa7, #fdcb6e);
    bottom: 60px;
    left: 30px;
}

.candle {
    position: absolute;
    width: 4px;
    height: 20px;
    background: #fff;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.flame {
    position: absolute;
    width: 8px;
    height: 12px;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: flicker 1s ease-in-out infinite alternate;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes flicker {
    0% {
        transform: translateX(-50%) scale(1);
    }
    100% {
        transform: translateX(-50%) scale(1.1);
    }
}

/* Typography */
.birthday-title {
    font-family: 'Dancing Script', cursive;
    font-size: 3rem;
    color: #2d3436;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from {
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    }
    to {
        text-shadow: 2px 2px 20px rgba(255, 107, 107, 0.5);
    }
}

.girlfriend-name {
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    color: #e17055;
    margin-bottom: 20px;
    font-weight: 600;
}

.message {
    margin-bottom: 30px;
}

.message p {
    font-size: 1.1rem;
    color: #2d3436;
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Buttons */
.open-card-btn,
.close-card-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    font-family: 'Poppins', sans-serif;
}

.open-card-btn:hover,
.close-card-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

/* Card Back Styling */
.photo-frame {
    width: 150px;
    height: 150px;
    border: 5px solid #fff;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #74b9ff, #0984e3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.photo-placeholder p {
    font-size: 0.9rem;
    margin-top: 10px;
}

.special-message {
    text-align: left;
    margin-bottom: 20px;
}

.special-message h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8rem;
    color: #2d3436;
    margin-bottom: 15px;
    text-align: center;
}

.special-message p {
    font-size: 1rem;
    color: #2d3436;
    margin-bottom: 15px;
    line-height: 1.6;
}

.signature {
    font-family: 'Dancing Script', cursive;
    font-size: 1.3rem;
    color: #e17055;
    font-weight: 600;
    text-align: center;
    margin-top: 20px;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.balloon,
.gift {
    position: absolute;
    font-size: 2rem;
    animation: floatUp 8s ease-in-out infinite;
}

.balloon1 {
    left: 10%;
    animation-delay: 0s;
}

.balloon2 {
    left: 30%;
    animation-delay: 2s;
}

.balloon3 {
    left: 70%;
    animation-delay: 4s;
}

.gift1 {
    left: 20%;
    animation-delay: 1s;
}

.gift2 {
    left: 80%;
    animation-delay: 3s;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confettiFall 3s linear infinite;
}

.confetti:nth-child(odd) {
    background: #4ecdc4;
    animation-delay: 0.5s;
}

.confetti:nth-child(3n) {
    background: #ffeaa7;
    animation-delay: 1s;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Countdown Timer */
.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.countdown-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
    min-width: 60px;
}

.countdown-item span {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.countdown-item label {
    font-size: 0.8rem;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Love Quote Rotator */
.quote-container {
    margin: 20px 0;
    text-align: center;
}

.love-quote {
    font-family: 'Great Vibes', cursive;
    font-size: 1.5rem;
    color: #ff6b6b;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    animation: quoteGlow 3s ease-in-out infinite alternate;
}

@keyframes quoteGlow {
    from {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }
    to {
        text-shadow: 1px 1px 10px rgba(255, 107, 107, 0.5);
    }
}

/* Photo Gallery */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: white;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-caption {
    font-size: 1.1rem;
    font-weight: 600;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
}

.lightbox-caption {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.2rem;
    text-align: center;
}

/* Quiz Styles */
.quiz-container {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.quiz-question h3 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.quiz-question p {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2rem;
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.quiz-option {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.quiz-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.quiz-option.correct {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
}

.quiz-option.incorrect {
    background: linear-gradient(45deg, #ff6b6b, #c44569);
}

.quiz-results {
    text-align: center;
    color: white;
}

.quiz-results h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.quiz-restart {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.1rem;
    margin-top: 20px;
}

/* Games Section */
.games-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.game-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-10px);
    border-color: #ff6b6b;
    box-shadow: 0 20px 40px rgba(255, 107, 107, 0.3);
}

.game-card h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.game-card p {
    color: white;
    margin-bottom: 20px;
    opacity: 0.9;
}

.game-icon {
    font-size: 3rem;
    margin-top: 10px;
}

/* Messages Section */
.messages-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    padding: 16px;
    max-width: 1000px;
    margin: 0 auto;
}

.message-card {
    background: rgba(255, 255, 255, 0.06);
    padding: 18px;
    border-radius: 12px;
    border-left: 4px solid rgba(255,107,107,0.9);
}

.message-card h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.message-card p {
    color: white;
    line-height: 1.6;
    font-style: italic;
}

/* Mobile adjustments for messages */
@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
        padding: 12px;
        gap: 12px;
    }

    .message-card {
        padding: 14px;
        border-radius: 10px;
    }

    .message-card h3 {
        font-size: 1.1rem;
    }

    .message-card p {
        font-size: 0.98rem;
    }
}

/* Music Player */
.music-player {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    z-index: 1000;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    min-width: 200px;
}

.music-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.music-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.music-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.music-control {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
}

.music-control:hover {
    background: rgba(255, 107, 107, 0.2);
    transform: scale(1.1);
}

.volume-slider {
    width: 60px;
    height: 5px;
    border-radius: 5px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.volume-slider::-moz-range-thumb {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #ff6b6b;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.3);
}

.song-info {
    text-align: center;
    margin-top: 5px;
}

.song-title {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    display: block;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 1px, 1px);
    white-space: nowrap;
    border: 0;
}

/* Fireworks Button */
.fireworks-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 15px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.fireworks-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.6);
}

/* Main Photo in Card */
.main-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Interactive Section */
.interactive-section {
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

/* Birthday Stats */
.birthday-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    text-align: center;
    background: rgba(204, 71, 71, 0.616);
    padding: 15px;
    border-radius: 15px;
    min-width: 80px;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #ff6b6b;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    color: white;
    opacity: 0.9;
}

/* Birthday Wishes */
.birthday-wishes {
    margin-bottom: 25px;
    text-align: center;
}

.birthday-wishes h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.wish-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wish-btn {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.wish-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

/* Birthday Memories */
.birthday-memories h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.memory-timeline {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.memory-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 80px;
    border: 2px solid transparent;
}

.memory-item:hover {
    transform: translateY(-5px);
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.2);
}

.memory-icon {
    display: block;
    font-size: 2rem;
    margin-bottom: 8px;
}

.memory-text {
    color: white;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Enhanced Surprise Button */
.open-card-btn {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    font-family: 'Poppins', sans-serif;
    position: relative;
    overflow: hidden;
}

.open-card-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.6);
}

.open-card-btn:active {
    transform: translateY(-2px);
}

/* Surprise Button Animation */
.open-card-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.5s;
}

.open-card-btn:hover::before {
    left: 100%;
}

/* Mobile Animations (Kept for reference, but overridden below for perf) */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(255, 107, 107, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0);
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    20% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* =========================================================
MOBILE FIX: AGGRESSIVE PERFORMANCE OPTIMIZATION
This block overrides the previous, less effective media queries.
========================================================= 
*/
@media (max-width: 768px) {
    
    /* 1. KILL ALL expensive, continuous background animations */
    .hearts,
    .rose-petals,
    .floating-elements {
        display: none !important; 
    }

    /* 2. Stop infinite animations on core elements (CPU/battery saving) */
    .cake {
        animation: none; /* Disables the 'bounce' effect */
    }

    .flame {
        animation: none; /* Disables the 'flicker' effect */
        box-shadow: 0 0 5px rgba(255, 165, 0, 0.8); /* Static glow */
    }

    .birthday-title {
        animation: none; /* Disables the 'glow' effect */
        text-shadow: 2px 2px 10px rgba(255, 107, 107, 0.3); /* Static glow */
    }

    .love-quote {
        animation: none; /* Disables the 'quoteGlow' effect */
        text-shadow: 1px 1px 5px rgba(255, 107, 107, 0.3); /* Static glow */
    }
    
    /* 3. Optimize core layout and touch targets */
    .container {
        padding: 5px;
    }
    
    .birthday-card {
        width: 95vw;
        max-width: 350px;
        height: auto; /* Allow height to adjust naturally */
        max-height: 90vh;
    }

    .card-front,
    .card-back {
        padding: 20px;
    }

    .nav-menu {
        padding: 5px;
        gap: 5px;
    }
    
    .nav-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
        min-height: 40px; 
    }

    .countdown-timer {
        gap: 10px;
    }
    
    .countdown-item span {
        font-size: 1.5rem;
    }

    .open-card-btn,
    .close-card-btn {
        padding: 15px 30px;
        font-size: 1rem;
    }

    .music-player {
        bottom: 10px;
        right: 10px;
        padding: 10px;
        min-width: 150px;
    }
    
    .fireworks-btn {
        bottom: 10px;
        left: 10px;
        width: 50px;
        height: 50px;
    }
}

/* ===== Extra Small Screen (phones) adjustments ===== */
@media (max-width: 480px) {
    html, body {
        font-size: 15px;
    }

    .nav-menu {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 8px;
    }

    .nav-btn {
        padding: 12px 8px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .container {
        padding: 8px;
        align-items: flex-start;
    }

    .main-content, .content-section {
        padding-top: 100px;
        padding-left: 12px;
        padding-right: 12px;
        padding-bottom: 24px;
    }

    .birthday-card {
        width: 100%;
        max-width: 360px;
        margin: 8px auto;
        padding: 12px;
    }

    .card-front, .card-back {
        padding: 14px;
    }

    .birthday-title {
        font-size: 1.6rem;
    }

    .girlfriend-name {
        font-size: 1.1rem;
    }

    .photo-gallery {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .gallery-item img {
        height: auto;
        max-height: none;
        border-radius: 10px;
    }

    .quiz-container {
        padding: 16px;
    }

    .message p,
    .special-message p {
        font-size: 1rem;
    }

    .open-card-btn,
    .close-card-btn {
        padding: 12px 18px;
        font-size: 1rem;
    }

    .music-player {
        bottom: 12px;
        right: 12px;
        min-width: 140px;
        padding: 10px;
    }

    /* Make interactive sections vertically stacked and full width */
    .birthday-stats {
        flex-direction: column;
        gap: 10px;
    }

    .messages-container {
        grid-template-columns: 1fr;
    }

    .game-card {
        padding: 18px;
    }
}