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

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #ff6b9d, #c44569, #f8b500);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0;
    margin: 0;
    touch-action: manipulation;
}

.container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem;
    gap: 1rem;
}

.birthday-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 1.5rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    animation: cardFloat 3s ease-in-out infinite;
    z-index: 10;
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
}

.title {
    font-size: 2.2rem;
    color: #c44569;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: titlePulse 2s ease-in-out infinite;
}

.cake {
    position: relative;
    margin: 2rem auto;
    width: 100px;
    height: 80px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.cake:hover {
    transform: scale(1.05);
}

.cake-instruction {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8rem;
    color: #666;
    opacity: 0.7;
}

.cake-slice {
    position: absolute;
    width: 25px;
    height: 30px;
    background: linear-gradient(45deg, #ff6b9d, #ffa8cc);
    border-radius: 5px;
    opacity: 0;
    transition: all 0.5s ease;
}

.slice-1 {
    top: 15px;
    left: 10px;
    transform: rotate(-10deg);
}

.slice-2 {
    top: 15px;
    left: 35px;
    transform: rotate(5deg);
}

.slice-3 {
    top: 15px;
    left: 60px;
    transform: rotate(15deg);
}

.slice-4 {
    top: 35px;
    left: 25px;
    transform: rotate(-5deg);
}

.cake.cutting .cake-slice {
    opacity: 1;
    animation: sliceFloat 2s ease-out forwards;
}

.cake.cutting .cake-base {
    animation: cakeShake 0.5s ease-out;
}

.cake.cutting .cake-instruction {
    opacity: 0;
}

.cake-base {
    width: 100px;
    height: 60px;
    background: linear-gradient(45deg, #ff6b9d, #ffa8cc);
    border-radius: 10px;
    position: relative;
}

.cake-base::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 10px;
    right: 10px;
    height: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.candle {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 25px;
    background: #f8b500;
    border-radius: 3px;
}

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

.message {
    font-size: 1rem;
    color: #666;
    margin: 1.5rem 0;
    font-style: italic;
    line-height: 1.4;
}

.party-btn {
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(196, 69, 105, 0.4);
    min-height: 50px;
    touch-action: manipulation;
    width: 100%;
    max-width: 280px;
}

.party-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 69, 105, 0.6);
}

.balloons {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.balloon {
    position: absolute;
    width: 45px;
    height: 60px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: balloonFloat 4s ease-in-out infinite;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background: #666;
}

.balloon-1 {
    background: #ff6b9d;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.balloon-2 {
    background: #c44569;
    top: 15%;
    right: 8%;
    animation-delay: 1s;
}

.balloon-3 {
    background: #f8b500;
    top: 25%;
    right: 2%;
    animation-delay: 2s;
}

.balloon-4 {
    background: #ff6b9d;
    top: 35%;
    left: 2%;
    animation-delay: 0.5s;
}

.balloon-5 {
    background: #c44569;
    top: 45%;
    left: 10%;
    animation-delay: 1.5s;
}

.balloon {
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

.balloon.popped {
    animation: balloonPop 0.5s ease-out forwards;
}

.surprise-message {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    color: #c44569;
    font-weight: bold;
    z-index: 100;
    animation: surpriseAppear 2s ease-out forwards;
    pointer-events: none;
}

.confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti::before,
.confetti::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b9d;
    animation: confettiFall 3s linear infinite;
}

.confetti::before {
    left: 20%;
    animation-delay: 0s;
}

.confetti::after {
    left: 80%;
    background: #f8b500;
    animation-delay: 1.5s;
}

.sparkles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) { top: 20%; left: 15%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 40%; right: 20%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { top: 60%; left: 25%; animation-delay: 1s; }
.sparkle:nth-child(4) { top: 80%; right: 30%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { top: 30%; left: 70%; animation-delay: 2s; }

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

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

@keyframes flicker {
    0% { transform: translateX(-50%) rotate(-2deg); }
    100% { transform: translateX(-50%) rotate(2deg); }
}

@keyframes balloonFloat {
    0%, 100% { transform: translateY(0px) rotate(-2deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

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

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

@keyframes balloonPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(0); opacity: 0; }
}

@keyframes surpriseAppear {
    0% { opacity: 0; transform: translateY(-20px) scale(0.8); }
    20% { opacity: 1; transform: translateY(0) scale(1.1); }
    30% { transform: scale(1); }
    90% { opacity: 1; }
    100% { opacity: 0; }
}

@keyframes sliceFloat {
    0% { transform: translateY(0) rotate(var(--rotation, 0deg)); }
    100% { 
        transform: translateY(-50px) translateX(var(--float-x, 0px)) rotate(calc(var(--rotation, 0deg) + 180deg));
        opacity: 0;
    }
}

@keyframes cakeShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.compliment-section {
    margin: 1.5rem 0;
    text-align: center;
}

.compliment-btn {
    background: linear-gradient(45deg, #ffa8cc, #ff6b9d);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 107, 157, 0.3);
    min-height: 44px;
    touch-action: manipulation;
    width: 100%;
    max-width: 200px;
}

.compliment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 157, 0.5);
}

.compliment-display {
    background: rgba(255, 182, 193, 0.2);
    padding: 1rem;
    border-radius: 15px;
    font-style: italic;
    color: #c44569;
    font-size: 0.95rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 107, 157, 0.3);
    animation: complimentGlow 3s ease-in-out infinite;
    text-align: center;
    line-height: 1.4;
}

.celebration-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.champagne-btn {
    background: linear-gradient(45deg, #f8b500, #ffd700);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(248, 181, 0, 0.4);
    font-weight: bold;
    min-height: 50px;
    touch-action: manipulation;
    width: 100%;
    max-width: 280px;
}

.champagne-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(248, 181, 0, 0.6);
}

.champagne-bottle {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 120px;
    background: linear-gradient(to bottom, #2d5016, #4a7c59);
    border-radius: 5px 5px 15px 15px;
    z-index: 1000;
    animation: champagneRise 1s ease-out forwards;
}

.champagne-bottle::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 15px;
    height: 20px;
    background: #8B4513;
    border-radius: 3px;
}

.champagne-cork {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 15px;
    background: #D2691E;
    border-radius: 50% 50% 20% 20%;
    animation: corkPop 0.5s ease-out 1s forwards;
}

.champagne-bubbles {
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 200px;
    opacity: 0;
    animation: bubblesFlow 2s ease-out 1.2s forwards;
}

@keyframes complimentGlow {
    0%, 100% { border-color: rgba(255, 107, 157, 0.3); }
    50% { border-color: rgba(255, 107, 157, 0.8); }
}

@keyframes champagneRise {
    0% { bottom: -100px; }
    100% { bottom: 20%; }
}

@keyframes corkPop {
    0% { transform: translateX(-50%) translateY(0) rotate(0deg); }
    100% { transform: translateX(-50%) translateY(-100px) rotate(360deg); opacity: 0; }
}

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

/* Login Styles */
.login-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff6b9d, #c44569, #f8b500);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 1rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    width: 100%;
    max-width: 350px;
    animation: loginFloat 3s ease-in-out infinite;
}

.login-title {
    font-size: 2rem;
    color: #c44569;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2rem;
    font-style: italic;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-input {
    padding: 1rem;
    border: 2px solid rgba(255, 107, 157, 0.3);
    border-radius: 15px;
    font-size: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.8);
    color: #c44569;
    outline: none;
    transition: all 0.3s ease;
    min-height: 44px;
    touch-action: manipulation;
}

.login-input:focus {
    border-color: #ff6b9d;
    box-shadow: 0 0 10px rgba(255, 107, 157, 0.3);
    background: rgba(255, 255, 255, 1);
}

.login-input::placeholder {
    color: rgba(196, 69, 105, 0.6);
}

.login-btn {
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(196, 69, 105, 0.4);
    min-height: 50px;
    touch-action: manipulation;
    font-weight: bold;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(196, 69, 105, 0.6);
}

.login-error {
    color: #ff6b9d;
    font-size: 0.9rem;
    margin-top: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.login-error.show {
    opacity: 1;
}

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

@keyframes loginSuccess {
    0% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); }
    100% { transform: scale(0) rotate(360deg); opacity: 0; }
}

.login-success {
    animation: loginSuccess 1s ease-out forwards;
}

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

.party-mode {
    animation: partyShake 0.5s ease-in-out infinite;
}

@keyframes partyShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.countdown-timer {
    position: relative;
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.5rem;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    z-index: 15;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.timer-text {
    font-size: 1rem;
    color: #c44569;
    font-weight: bold;
}

.age-display {
    font-size: 2.5rem;
    color: #ff6b9d;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    animation: ageGlow 2s ease-in-out infinite;
}

.timer-subtext {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.photo-carousel {
    position: relative;
    width: 100%;
    max-width: 280px;
    z-index: 12;
    margin: 0 auto;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.photo-frame {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background: linear-gradient(45deg, #ffa8cc, #ff6b9d);
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-frame.active {
    opacity: 1;
}

.placeholder-photo {
    color: white;
    text-align: center;
    font-size: 1rem;
    font-weight: bold;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}
.placeholder-photo img{
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }
.carousel-dots {
    text-align: center;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 8px;
    position: relative;
    z-index: 20;
    min-width: 100px;
    min-height: 44px;
    touch-action: manipulation;
}

.dot {
    height: 6px;
    width: 6px;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dot.active, .dot:hover {
    background-color: #ff6b9d;
}

.dot::before {
    content: '';
    width: 12px;
    height: 12px;
    background-color: inherit;
    border-radius: 50%;
}

.music-controls {
    margin-bottom: 1rem;
}

.music-btn {
    background: linear-gradient(45deg, #f8b500, #ffa8cc);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(248, 181, 0, 0.3);
    min-height: 44px;
    touch-action: manipulation;
}

.music-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(248, 181, 0, 0.5);
}

.music-btn.playing {
    animation: musicPulse 1s ease-in-out infinite;
}

@keyframes ageGlow {
    0%, 100% { text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1); }
    50% { text-shadow: 0 0 20px rgba(255, 107, 157, 0.8); }
}

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

/* Mobile-first responsive design */
@media (max-width: 480px) {
    .login-card {
        padding: 1.5rem;
        margin: 0.5rem;
    }
    
    .login-title {
        font-size: 1.8rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .login-input {
        font-size: 0.9rem;
        padding: 0.8rem;
    }
    
    .login-btn {
        font-size: 1rem;
        padding: 0.9rem 1.5rem;
    }
    
    .container {
        padding: 0.5rem;
        gap: 0.8rem;
    }
    
    .birthday-card {
        padding: 1.2rem;
        margin: 0;
    }
    
    .title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    .age-display {
        font-size: 2rem;
    }
    
    .timer-text {
        font-size: 0.9rem;
    }
    
    .timer-subtext {
        font-size: 0.8rem;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .balloon {
        width: 35px;
        height: 50px;
    }
    
    .cake {
        width: 80px;
        height: 65px;
    }
    
    .cake-instruction {
        font-size: 0.7rem;
    }
    
    .compliment-display {
        font-size: 0.9rem;
        padding: 0.8rem;
        min-height: 50px;
    }
    
    .message {
        font-size: 0.9rem;
        margin: 1rem 0;
    }
    
    .music-btn, .compliment-btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
    
    .party-btn, .champagne-btn {
        font-size: 1rem;
        padding: 0.9rem 1.2rem;
    }
}

@media (max-width: 360px) {
    .title {
        font-size: 1.6rem;
    }
    
    .age-display {
        font-size: 1.8rem;
    }
    
    .balloon-4, .balloon-5 {
        display: none;
    }
    
    .compliment-display {
        font-size: 0.85rem;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        gap: 1.2rem;
    }
    
    .celebration-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .party-btn, .champagne-btn {
        max-width: 45%;
        min-width: 200px;
    }

    .placeholder-photo img{
        max-width: 70%;
        height: auto;
        border-radius: 10px;
    }
}