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

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

body {
    font-family: 'Courier New', monospace;
    min-height: 100vh;
    background: linear-gradient(-45deg, #0a0a0a, #1a0033, #001a33, #330033);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    padding: 10px;
    position: relative;
}

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

.stars::before {
    content: '';
    position: absolute;
    width: 2px;
    height: 2px;
    background: #00ffff;
    box-shadow: 
        10vw 10vh 1px #00ffff,
        20vw 20vh 1px #ff00ff,
        30vw 30vh 1px #00ff00,
        40vw 40vh 1px #ffff00,
        50vw 50vh 1px #00ffff,
        60vw 60vh 1px #ff00ff,
        70vw 70vh 1px #00ff00,
        80vw 80vh 1px #ffff00,
        90vw 90vh 1px #00ffff,
        15vw 15vh 1px #ff00ff,
        25vw 25vh 1px #00ff00,
        35vw 35vh 1px #ffff00,
        45vw 45vh 1px #00ffff,
        55vw 55vh 1px #ff00ff,
        65vw 65vh 1px #00ff00,
        75vw 75vh 1px #ffff00,
        85vw 85vh 1px #00ffff,
        95vw 95vh 1px #ff00ff;
    animation: twinkle 5s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 0.3; }
}

.container {
    padding: 20px;
    perspective: 1000px;
}

.birthday-card {
    background: rgba(0, 0, 0, 0.9);
    padding: 30px;
    border-radius: 20px;
    border: 2px solid #00ffff;
    box-shadow: 
        0 0 20px #00ffff,
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(0, 255, 255, 0.1);
    text-align: center;
    max-width: 450px;
    width: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: none;
    overflow: hidden;
}

@keyframes cardFloat {
    0%, 100% { transform: translateZ(0) rotateX(0); }
    50% { transform: translateZ(20px) rotateX(2deg); }
}

.title {
    color: #00ffff;
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 
        0 0 5px #00ffff,
        0 0 10px #00ffff,
        0 0 15px #00ffff,
        0 0 20px #00ffff;
    animation: colorChange 6s infinite, textGlitch 4s infinite;
    font-weight: bold;
    letter-spacing: 2px;
}

.name {
    color: #ff00ff;
    font-size: 1.8em;
    margin-bottom: 25px;
    text-shadow: 
        0 0 5px #ff00ff,
        0 0 10px #ff00ff,
        0 0 15px #ff00ff;
    animation: nameFloat 3s ease-in-out infinite, nameGlow 2s infinite;
    font-weight: bold;
    letter-spacing: 1px;
}

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

@keyframes colorChange {
    0% { color: #00ffff; text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff; }
    33% { color: #ff00ff; text-shadow: 0 0 5px #ff00ff, 0 0 10px #ff00ff, 0 0 15px #ff00ff; }
    66% { color: #00ff00; text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00; }
    100% { color: #00ffff; text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff, 0 0 15px #00ffff; }
}

.message {
    margin-top: 30px;
    line-height: 1.6;
}

.message p {
    margin: 12px 0;
    color: #00ff00;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
    text-shadow: 0 0 3px #00ff00;
    font-family: 'Courier New', monospace;
}

.greeting { animation-delay: 0.2s !important; }
.wish { animation-delay: 0.4s !important; }
.hope { animation-delay: 0.6s !important; }
.future { animation-delay: 0.8s !important; }
.blessing { animation-delay: 1s !important; }
.signature { animation-delay: 1.2s !important; }

@keyframes fadeInUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.signature {
    margin-top: 30px;
    font-style: italic;
    color: #888;
}

.balloons {
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
}

.balloon {
    width: 30px;
    height: 40px;
    background: #ff6b6b;
    border-radius: 50%;
    position: relative;
    animation: float 4s ease-in-out infinite;
}

.balloon:nth-child(2) { background: #4ecdc4; animation-delay: 0.5s; }
.balloon:nth-child(3) { background: #ffbe0b; animation-delay: 1s; }
.balloon:nth-child(4) { background: #ff006e; animation-delay: 1.5s; }
.balloon:nth-child(5) { background: #8338ec; animation-delay: 2s; }
.balloon:nth-child(6) { background: #3a86ff; animation-delay: 2.5s; }

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

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

.cake {
    width: 80px;
    height: 65px;
    background: linear-gradient(45deg, #ff00ff, #00ffff);
    border-radius: 10px;
    position: relative;
    margin: 25px auto;
    animation: cakeFloat 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.6);
    border: 1px solid #00ffff;
}

@keyframes cakeFloat {
    0%, 100% { transform: translateY(0) rotateY(0); }
    50% { transform: translateY(-10px) rotateY(5deg); }
}

.cake::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 20px;
    background: linear-gradient(45deg, #ff80ff, #80ffff);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 128, 255, 0.5);
}

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

.flame {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 12px;
    background: linear-gradient(45deg, #ffff00, #ff8000);
    border-radius: 50% 50% 20% 20%;
    animation: flicker 1s ease-in-out infinite;
    box-shadow: 0 0 10px #ffff00;
}

@keyframes flicker {
    0%, 100% { transform: translateX(-50%) scale(1) rotate(0deg); opacity: 1; }
    25% { transform: translateX(-50%) scale(1.1) rotate(5deg); opacity: 0.8; }
    75% { transform: translateX(-50%) scale(0.9) rotate(-5deg); opacity: 0.9; }
}

@keyframes blowOut {
    0% { 
        transform: translateX(-50%) scale(1) rotate(0deg); 
        opacity: 1; 
    }
    50% { 
        transform: translateX(-50%) scale(1.5) rotate(10deg); 
        opacity: 0.5; 
    }
    100% { 
        transform: translateX(-50%) scale(0) rotate(45deg); 
        opacity: 0; 
    }
}

@keyframes windBlow {
    0% { 
        transform: translateX(0) scale(1); 
        opacity: 1; 
    }
    100% { 
        transform: translateX(30px) scale(0.5); 
        opacity: 0; 
    }
}

.gift-box {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 25px auto 0;
    cursor: pointer;
}


.gift-container {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #00ff00, #ffff00);
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
    border: 1px solid #00ffff;
}

.gift-lid {
    position: absolute;
    width: 58px;
    height: 16px;
    background: linear-gradient(45deg, #00ff80, #80ff00);
    top: -16px;
    left: -4px;
    border-radius: 5px;
    transform-origin: bottom;
    box-shadow: 0 0 8px rgba(0, 255, 128, 0.5);
    border: 1px solid #00ffff;
}

@keyframes lidWiggle {
    0%, 100% { transform: rotateZ(0); }
    25% { transform: rotateZ(-2deg); }
    75% { transform: rotateZ(2deg); }
}

.gift-bow {
    position: absolute;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #00ff80, #80ff00);
    top: -24px;
    left: 17px;
    border-radius: 50%;
    box-shadow: 
        -12px 0 linear-gradient(45deg, #00ff80, #80ff00),
        12px 0 linear-gradient(45deg, #00ff80, #80ff00),
        0 0 8px rgba(0, 255, 128, 0.5);
}

.confetti {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.confetti::after {
    content: '🎉';
    font-size: 20px;
    position: absolute;
    animation: confettiFall 3s linear infinite;
}

@keyframes confettiFall {
    0% { top: -20px; left: 50%; transform: translateX(-50%) rotate(0deg); opacity: 1; }
    100% { top: 100%; left: 50%; transform: translateX(-50%) rotate(360deg); opacity: 0; }
}

/* Cyberpunk glitch animations */
@keyframes glitch {
    0%, 100% { transform: translateY(0) rotateX(0); }
    10% { transform: translateY(-2px) rotateX(1deg) skew(1deg); }
    20% { transform: translateY(0) rotateX(0) skew(0deg); }
    30% { transform: translateY(-1px) rotateX(-1deg) skew(-1deg); }
    40% { transform: translateY(0) rotateX(0) skew(0deg); }
    50% { transform: translateY(-2px) rotateX(1deg) skew(1deg); }
    60% { transform: translateY(0) rotateX(0) skew(0deg); }
    70% { transform: translateY(-1px) rotateX(-1deg) skew(-1deg); }
    80% { transform: translateY(0) rotateX(0) skew(0deg); }
    90% { transform: translateY(-2px) rotateX(1deg) skew(1deg); }
}

@keyframes textGlitch {
    0%, 100% { 
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff;
    }
    10% { 
        text-shadow: 
            -2px 0 #ff00ff,
            2px 0 #00ffff,
            0 0 15px #00ffff;
    }
    20% { 
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff;
    }
    30% { 
        text-shadow: 
            2px 0 #ff00ff,
            -2px 0 #00ffff,
            0 0 15px #00ffff;
    }
    40% { 
        text-shadow: 
            0 0 5px #00ffff,
            0 0 10px #00ffff,
            0 0 15px #00ffff;
    }
}

@keyframes nameGlow {
    0%, 100% { 
        text-shadow: 
            0 0 5px #ff00ff,
            0 0 10px #ff00ff,
            0 0 15px #ff00ff;
    }
    50% { 
        text-shadow: 
            0 0 10px #ff00ff,
            0 0 20px #ff00ff,
            0 0 30px #ff00ff;
    }
}

/* Ripple effect for clicks */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.8;
    }
    50% {
        opacity: 0.4;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.6);
    animation: ripple 0.8s ease-out;
    pointer-events: none;
}

/* Matrix-style digital rain effect */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 0, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(0, 255, 0, 0.1) 0%, transparent 50%);
    animation: digitalRain 10s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes digitalRain {
    0% { opacity: 0.5; }
    50% { opacity: 0.8; }
    100% { opacity: 0.5; }
} 