@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&family=Great+Vibes&display=swap');

:root {
    --primary: #ff1493;
    --secondary: #00ffff;
    --dark: #120338;
    --light: #ffffff;
}

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

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--dark);
    color: var(--light);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    position: relative;
    padding: 20px;
}

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

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle var(--duration) ease-in-out infinite;
    opacity: 0;
}

@keyframes twinkle {

    0%,
    100% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.background-name {
    position: fixed;
    width: 100%;
    text-align: center;
    font-family: 'Great Vibes', cursive;
    font-size: clamp(80px, 25vw, 300px);
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.08;
    z-index: 0;
    user-select: none;
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.08;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.12;
    }
}

.main-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

#title {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(40px, 8vw, 80px);
    text-align: center;
    position: relative;
    margin: 20px 0;
    animation: colorChange 8s linear infinite;
    padding: 0 10px;
}

@keyframes colorChange {

    0%,
    100% {
        color: var(--primary);
    }

    50% {
        color: var(--secondary);
    }
}

#countdown-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: clamp(10px, 2vw, 30px);
    width: 100%;
    max-width: 800px;
    padding: clamp(15px, 3vw, 40px);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 0 30px rgba(255, 20, 147, 0.2);
}

.countdown-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: clamp(10px, 2vw, 20px);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.countdown-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.3);
}

.countdown-number {
    font-size: clamp(30px, 5vw, 60px);
    font-weight: 700;
    color: var(--light);
    text-shadow: 0 0 10px var(--primary),
        0 0 20px var(--primary);
    position: relative;
}

.countdown-label {
    font-size: clamp(12px, 2vw, 16px);
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--secondary);
    font-weight: 300;
}

#audio-control {
    position: fixed;
    top: 20px;
    right: 20px;
    font-size: clamp(30px, 5vw, 40px);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#audio-control:hover {
    transform: scale(1.1) rotate(15deg);
    color: var(--secondary);
}

.heart {
    position: fixed;
    font-size: clamp(20px, 4vw, 30px);
    animation: floatHeart 4s linear forwards;
    z-index: 1;
    pointer-events: none;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) scale(0) rotate(0deg);
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        transform: translateY(-100vh) scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

.message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(24px, 5vw, 48px);
    text-align: center;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
    width: 90%;
}

.message.show {
    opacity: 1;
    animation: celebrateMessage 2s ease-in-out infinite;
}

@keyframes celebrateMessage {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.interactive-button {
    padding: 12px 24px;
    font-size: clamp(14px, 2vw, 18px);
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    border: none;
    border-radius: 25px;
    color: var(--light);
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(255, 20, 147, 0.3);
}

.interactive-button:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.5s ease;
    z-index: -1;
}

.interactive-button:hover:before {
    left: 100%;
}

.interactive-button:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 20, 147, 0.4);
}

.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    pointer-events: none;
    z-index: 10;
}

#theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: clamp(24px, 4vw, 30px);
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

#theme-toggle:hover {
    transform: scale(1.1) rotate(-15deg);
    color: var(--secondary);
}

.dark-theme {
    --dark: #120338;
    --light: #ffffff;
}

.light-theme {
    --dark: #f3e5f5;
    --light: #120338;
}

@media (max-width: 768px) {
    .main-container {
        padding: 10px;
    }

    #countdown-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .message {
        width: 95%;
        font-size: clamp(20px, 4vw, 36px);
    }
}

@media (max-width: 480px) {
    .background-name {
        font-size: 15vw;
    }

    #countdown-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 15px;
    }

    .countdown-box {
        padding: 8px;
    }

    #title {
        padding: 0 5px;
        text-align: center;
        width: 100%;
    }
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -30%);
    }

    20% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    80% {
        opacity: 1;
        transform: translate(-50%, -50%);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -70%);
    }
}

.snowfall {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: none;
}

.snowflake {
    position: absolute;
    color: white;
    opacity: 0.8;
    user-select: none;
    animation: fall linear forwards;
}

@keyframes fall {
    0% {
        transform: translateY(-50px) translateX(0) rotate(0deg);
        opacity: 0.8;
    }

    100% {
        transform: translateY(calc(100vh + 50px)) translateX(var(--translation-x)) rotate(var(--rotation));
        opacity: 0.4;
    }
}

.bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    animation: bubbleFloat linear infinite;
    pointer-events: none;
}

@keyframes bubbleFloat {
    0% {
        transform: translate(0, 100vh) scale(1);
        opacity: 0.7;
    }

    100% {
        transform: translate(var(--translate-x), -100px) scale(var(--scale));
        opacity: 0;
    }
}

.random-emoji {
    position: fixed;
    font-size: 24px;
    pointer-events: none;
    animation: emojiPop 3s forwards;
    z-index: 5;
}

@keyframes emojiPop {
    0% {
        transform: scale(0) rotate(-45deg);
        opacity: 0;
    }

    10% {
        transform: scale(1.2) rotate(0deg);
        opacity: 1;
    }

    20% {
        transform: scale(1) rotate(10deg);
    }

    80% {
        opacity: 1;
    }

    100% {
        transform: scale(1.5) rotate(30deg) translate(var(--translate-x), var(--translate-y));
        opacity: 0;
    }
}

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1s ease-out;
}

.loader {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 5px solid transparent;
    border-top-color: var(--primary);
    border-bottom-color: var(--secondary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.credit {
    position: fixed;
    bottom: 10px;
    right: 10px;
    font-size: 12px;
    color: var(--light);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 5px;
    z-index: 10;
}

.credit a {
    color: var(--primary);
    text-decoration: none;
}

.credit a:hover {
    text-decoration: underline;
}

.create-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--dark);
    color: var(--light);
    padding: 20px;
}

.create-container input,
.create-container button {
    padding: 10px;
    margin: 10px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
}

.create-container button {
    background: var(--primary);
    color: var(--light);
    cursor: pointer;
    transition: background 0.3s ease;
}

.create-container button:hover {
    background: var(--secondary);
}


