/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Confetti Animation */
#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #ff6b6b;
    animation: confetti-fall 3s linear infinite;
}

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

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

.balloon {
    position: absolute;
    width: 75px;
    height: 80px;
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: float 6s ease-in-out infinite;
}

.balloon::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 6px;
    background: #444;
    border-radius: 50% 50% 0 0%;
}



.balloon::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  width: 6px;
  height: 6px;
  background: white;
  opacity: 0.8;
  border-radius: 50%;
  box-shadow:
    0 0 5px white,
    0 0 10px white,
    0 0 15px white;

    animation: twinkle 5s infinite ease-in-out;
}

.string {
    position: absolute;
    top: 100%; /* Start right below the balloon */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 60px;
    background-color: black;
    animation: wiggle 3s ease-in-out infinite;
    transform-origin: top center;
}

@keyframes twinkle { 
    0%, 100% { opacity: 0.9; transform: scale } 
    50% { opacity: 0.2; transform: scale(1.4);
         }
}

@keyframes wiggle {
  0%, 100% { transform: translateX(-50%) rotate(0deg); }
  50% { transform: translateX(-50%) rotate(3deg); }
}

.balloon-1 {
    background: #02cf1a;
    top: 30%;
    left: 2%;
    animation-delay: -2s;
}


.balloon-2 {
    background: #016e8f;
    top: 20%;
    left: 10%;
    animation-delay: -2s;
}

.balloon-3 {
    background: #ff6a00;
    top: 60%;
    left: 5%;
    animation-delay: -4s;
}

.balloon-4 {
    background: #fffb00;
    top: 15%;
    right: 5%;
    animation-delay: -1s;
}

.balloon-5 {
    background: #6c5ce7;
    top: 70%;
    right: 25%;
    animation-delay: -3s;
}

.balloon-6 {
    background: #a302cf;
    top: 47%;
    right: 7%;
    animation-delay: -2s;
}

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

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Header Styles */
.birthday-header {
    text-align: center;
    margin-bottom: 3rem;
    animation: fadeInDown 1s ease-out;
}

.main-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(3% , 8vw, 4rem);
    color: #000000;
    letter-spacing: 5px;
    text-shadow: 3px 3px 0px #ffffff, 6px 6px 0px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite alternate;
}

.emoji {
    display: inline-block;
    animation: rotate 2s ease-in-out infinite;
}

.subtitle {
    font-size: 1.2rem;
    color: #444444;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgb(255, 255, 255,0.8);
}

/* Cake Styles */
.cake-container {
    display: flex;
    justify-content: center;
    margin: 3rem 0;
    animation: fadeInUp 1.5s ease-out;
}

.cake {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cake-layer {
    border-radius: 10px;
    position: relative;
    margin: -5px 0;
}

.cake-bottom {
    width: 200px;
    height: 40px;
    background: #8b4513;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cake-middle {
    width: 160px;
    height: 35px;
    background: #ff69b4;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.cake-top {
    width: 120px;
    height: 30px;
    background: #ffd700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.candles {
    position: absolute;
    top: -30px;
    display: flex;
    gap: 20px;
}

.candle {
    width: 8px;
    height: 25px;
    background: #fff;
    border-radius: 2px;
    position: relative;
}

.wick {
    width: 2px;
    height: 5px;
    background: #333;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.flame {
    width: 8px;
    height: 10px;
    background: radial-gradient(circle, #ffd700 30%, #ff6b6b 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    animation: flicker 0.5s ease-in-out infinite alternate;
}

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

/* Message Cards */
.messages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    animation: fadeIn 2s ease-out;
}

.message-card {
    background: rgb(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid transparent;
    background-clip: content-box;
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border-color: #00a3d7;
}

.message-card i {
    font-size: 3rem;
    color: #ffb5af;
    margin-bottom: 1rem;
}

.message-card h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #000000;
    margin-bottom: 1rem;
}

.message-card p {
    color: #000000;
    line-height: 1.6;
}

/* Interactive Buttons */
.interactive-section {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.birthday-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.birthday-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    background: linear-gradient(45deg, #ff5252, #00c7fc);
}

.birthday-btn:active {
    transform: translateY(0);
}

/* Birthday Counter */
.birthday-counter {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.birthday-counter h3 {
    font-family: 'Fredoka One', cursive;
    color: #ff6b6b;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.counter-display {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-item span {
    font-size: 3rem;
    font-weight: bold;
    color: #4ecdc4;
    font-family: 'Fredoka One', cursive;
}

.counter-item label {
    font-size: 0.9rem;
    color: #000000;
    margin-top: 0.5rem;
}

/* Footer */
.birthday-footer {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 20px;
    animation: fadeIn 3s ease-out;
}

.birthday-footer p {
    font-size: 1.2rem;
    color: #000000;
    margin-bottom: 1rem;
}

.party-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.party-icons i {
    font-size: 2rem;
    color: #ff6b6b;
    animation: bounce 2s ease-in-out infinite;
}

.party-icons i:nth-child(2) { animation-delay: 0.2s; }
.party-icons i:nth-child(3) { animation-delay: 0.4s; }
.party-icons i:nth-child(4) { animation-delay: 0.6s; }

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

@keyframes rotate {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-10deg);
    }
    75% {
        transform: rotate(10deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .messages {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .message-card {
        padding: 1.5rem;
    }
    
    .interactive-section {
        flex-direction: column;
        align-items: center;
    }
    
    .birthday-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .counter-display {
        gap: 1rem;
    }
    
    .counter-item span {
        font-size: 2rem;
    }
    
    .cake-bottom { width: 150px; }
    .cake-middle { width: 120px; }
    .cake-top { width: 90px; }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    .birthday-counter {
        padding: 1.5rem;
    }
    
    .birthday-counter h3 {
        font-size: 1.4rem;
    }
}

/* Special Effects */
.sparkle {
    animation: sparkle 1.5s ease-in-out infinite;
}

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

.pulse {
    animation: pulse 1s ease-in-out infinite;
}

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