/* ========================================
   Birthday Countdown - Styles
   Modern, vibrant design with animations
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --card-bg: rgba(255, 255, 255, 0.08);
    --card-border: rgba(255, 255, 255, 0.15);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --glow-color: rgba(102, 126, 234, 0.5);
    --celebration-gold: #ffd700;

    /* Theme variables (will be set by JS) */
    --theme-primary: #ff69b4;
    --theme-secondary: #ff1493;
    --theme-accent: #ffb6c1;
    --theme-glow: rgba(255, 105, 180, 0.5);
}

body {
    font-family: 'Outfit', sans-serif;
    min-height: 100vh;
    background: var(--bg-gradient);
    color: var(--text-primary);
    overflow-x: hidden;
}

.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
}

/* Animated Particles Background */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: float 15s infinite ease-in-out;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Love Bubbles */
.love-bubble {
    position: absolute;
    bottom: -60px;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(255, 105, 180, 0.3) 0%, rgba(255, 20, 147, 0.2) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 105, 180, 0.4);
    border-radius: 30px;
    font-size: clamp(0.95rem, 2.5vw, 1.2rem);
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 0 30px rgba(255, 105, 180, 0.4),
        0 0 60px rgba(255, 105, 180, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.15);
    text-shadow: 0 0 15px rgba(255, 105, 180, 0.8),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes bubble-rise {
    0% {
        transform: translateY(0);
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    85% {
        opacity: 1;
    }

    100% {
        transform: translateY(-110vh);
        opacity: 0;
    }
}

@keyframes bubble-sway {

    0%,
    100% {
        margin-left: 0;
    }

    25% {
        margin-left: 30px;
    }

    75% {
        margin-left: -30px;
    }
}

@keyframes bubble-glow {
    0% {
        box-shadow: 0 0 30px rgba(255, 105, 180, 0.4),
            0 0 60px rgba(255, 105, 180, 0.2),
            inset 0 0 20px rgba(255, 255, 255, 0.15);
    }

    100% {
        box-shadow: 0 0 40px rgba(255, 105, 180, 0.6),
            0 0 80px rgba(255, 105, 180, 0.3),
            inset 0 0 30px rgba(255, 255, 255, 0.2);
    }
}

/* Floating Hearts */
.floating-heart {
    position: absolute;
    bottom: -50px;
    pointer-events: none;
    z-index: 3;
    animation: heart-float linear forwards;
    filter: drop-shadow(0 0 10px rgba(255, 105, 180, 0.5));
}

@keyframes heart-float {
    0% {
        transform: translateY(0) rotate(0deg) scale(0.5);
        opacity: 0;
    }

    10% {
        opacity: 1;
        transform: translateY(-10vh) rotate(15deg) scale(1);
    }

    30% {
        transform: translateY(-30vh) rotate(-10deg) scale(1.1);
    }

    50% {
        transform: translateY(-50vh) rotate(20deg) scale(0.9);
    }

    70% {
        transform: translateY(-70vh) rotate(-15deg) scale(1);
        opacity: 0.8;
    }

    100% {
        transform: translateY(-110vh) rotate(10deg) scale(0.7);
        opacity: 0;
    }
}

/* Sparkles */
.sparkle {
    position: absolute;
    pointer-events: none;
    z-index: 4;
    animation: sparkle-pop 2s ease-out forwards;
}

@keyframes sparkle-pop {
    0% {
        transform: scale(0) rotate(0deg);
        opacity: 0;
    }

    20% {
        transform: scale(1.5) rotate(45deg);
        opacity: 1;
    }

    40% {
        transform: scale(1) rotate(90deg);
        opacity: 1;
    }

    100% {
        transform: scale(0) rotate(180deg);
        opacity: 0;
    }
}

/* Main Content */
.content {
    text-align: center;
    z-index: 10;
    max-width: 800px;
    width: 100%;
}

.celebration-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 0 20px var(--theme-glow));
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-15px) scale(1.1);
    }
}

.title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    font-family: 'Dancing Script', cursive;
    background: linear-gradient(135deg, var(--theme-primary) 0%, var(--theme-secondary) 50%, var(--theme-accent) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
    animation: gradient-shift 3s ease infinite;
    filter: drop-shadow(0 0 30px var(--theme-glow));
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.title-sub {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 300;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Countdown Container */
.countdown-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(0.5rem, 2vw, 1.5rem);
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.countdown-item {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: clamp(1rem, 3vw, 2rem) clamp(1.5rem, 4vw, 2.5rem);
    min-width: clamp(80px, 18vw, 140px);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.countdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    opacity: 0.8;
}

.countdown-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.5);
}

.countdown-value {
    font-size: clamp(2rem, 7vw, 4rem);
    font-weight: 700;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.countdown-value.pulse {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

.countdown-label {
    font-size: clamp(0.7rem, 2vw, 1rem);
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.countdown-separator {
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--text-secondary);
    animation: blink 1s ease-in-out infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

/* Message */
.message {
    margin-bottom: 2rem;
}

#message-text {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--text-secondary);
    font-weight: 300;
}

.message.celebration #message-text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 700;
    background: linear-gradient(90deg, #ffd700, #ff6b6b, #4ecdc4, #ffd700);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 300% 50%;
    }
}

/* Progress Bar */
.progress-container {
    max-width: 500px;
    margin: 0 auto;
}

.progress-bar {
    height: 6px;
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--progress, 0%);
    background: var(--primary-gradient);
    border-radius: 10px;
    transition: width 1s ease;
    box-shadow: 0 0 20px var(--glow-color);
}

.progress-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* Confetti */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0;
    animation: confetti-fall 4s ease-out forwards;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 1;
    }

    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* Birthday Mode */
body.birthday-mode {
    background: linear-gradient(135deg, #2d1b4e 0%, #1a1a2e 50%, #0f3460 100%);
}

body.birthday-mode .celebration-icon {
    animation: birthday-bounce 0.5s ease-in-out infinite;
}

@keyframes birthday-bounce {

    0%,
    100% {
        transform: translateY(0) scale(1) rotate(-5deg);
    }

    50% {
        transform: translateY(-20px) scale(1.2) rotate(5deg);
    }
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .countdown-separator {
        display: none;
    }

    .countdown-container {
        gap: 0.75rem;
    }

    .countdown-item {
        min-width: 70px;
    }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Selection styling */
::selection {
    background: rgba(102, 126, 234, 0.5);
    color: white;
}