/* ============================================
   HAPPY PRINCEMAS - Estilo Inspirado no Prince
   ============================================ */

/* Reset e Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Outfit', sans-serif;
}

body {
    background: radial-gradient(ellipse at center, #2a0845 0%, #1a0533 30%, #0d001a 70%, #000000 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Canvas dos fogos */
#fireworks-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    will-change: contents;
}

/* Overlay com gradiente sutil */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(75, 0, 130, 0.15) 50%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Símbolo do Prince flutuando */
.prince-symbol {
    position: fixed;
    top: 8%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    color: #d4af37;
    opacity: 0.6;
    z-index: 5;
    animation: floatSymbol 4s ease-in-out infinite, glowGold 2s ease-in-out infinite alternate;
    text-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.3);
}

@keyframes floatSymbol {

    0%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    50% {
        transform: translateX(-50%) translateY(-15px);
    }
}

@keyframes glowGold {
    from {
        opacity: 0.4;
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.4), 0 0 40px rgba(212, 175, 55, 0.2);
    }

    to {
        opacity: 0.8;
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.8), 0 0 60px rgba(212, 175, 55, 0.5), 0 0 80px rgba(212, 175, 55, 0.3);
    }
}

/* Conteúdo Principal */
.content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 2rem;
    will-change: transform;
    transform: translateZ(0);
}

.subtitle-top {
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 1rem;
    color: #d4af37;
    letter-spacing: 0.4em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fadeInDown 1.5s ease 0.5s forwards;
}

/* Título Principal - Happy Princemas */
.glowing-text {
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 900;
    font-size: clamp(2.5rem, 8vw, 6rem);
    background: linear-gradient(135deg, #e0b0ff, #ffffff, #d4af37, #e0b0ff, #9b59b6);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s ease-in-out infinite, pulseText 3s ease-in-out infinite, fadeInUp 1.5s ease forwards;
    filter: drop-shadow(0 0 30px rgba(156, 39, 176, 0.6)) drop-shadow(0 0 60px rgba(128, 0, 128, 0.3));
    line-height: 1.2;
    position: relative;
}

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

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes pulseText {

    0%,
    100% {
        filter: drop-shadow(0 0 30px rgba(156, 39, 176, 0.6)) drop-shadow(0 0 60px rgba(128, 0, 128, 0.3));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 50px rgba(156, 39, 176, 0.9)) drop-shadow(0 0 80px rgba(128, 0, 128, 0.5)) drop-shadow(0 0 120px rgba(212, 175, 55, 0.3));
        transform: scale(1.02);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Ano */
.year-display {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(3rem, 10vw, 7rem);
    color: #d4af37;
    margin: 0.5rem 0;
    opacity: 0;
    animation: fadeInScale 1.5s ease 1s forwards, goldPulse 2.5s ease-in-out 2.5s infinite;
    text-shadow:
        0 0 20px rgba(212, 175, 55, 0.6),
        0 0 40px rgba(212, 175, 55, 0.4),
        0 0 80px rgba(212, 175, 55, 0.2);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes goldPulse {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(212, 175, 55, 0.6), 0 0 40px rgba(212, 175, 55, 0.4), 0 0 80px rgba(212, 175, 55, 0.2);
    }

    50% {
        text-shadow: 0 0 30px rgba(212, 175, 55, 0.9), 0 0 60px rgba(212, 175, 55, 0.6), 0 0 100px rgba(212, 175, 55, 0.4), 0 0 140px rgba(156, 39, 176, 0.2);
    }
}

/* Tagline (frase do Prince) */
.tagline {
    font-family: 'Great Vibes', cursive;
    font-size: clamp(1rem, 3vw, 1.6rem);
    color: #c599e8;
    opacity: 0;
    animation: fadeInUp 1.5s ease 1.5s forwards;
    margin-top: 0.5rem;
    text-shadow: 0 0 15px rgba(197, 153, 232, 0.4);
}

/* Linha Decorativa */
.decorative-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    opacity: 0;
    animation: fadeInUp 1.5s ease 2s forwards;
}

.decorative-line .line {
    width: 80px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d4af37, transparent);
}

.decorative-line .star {
    color: #d4af37;
    font-size: 0.8rem;
    animation: twinkle 2s ease-in-out infinite;
}

.decorative-line .love-symbol {
    color: #9b59b6;
    font-size: 1.2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes twinkle {

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

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

@keyframes heartbeat {

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

    15% {
        transform: scale(1.2);
    }

    30% {
        transform: scale(1);
    }

    45% {
        transform: scale(1.15);
    }
}

/* Purple Rain container (agora renderizado no canvas) */
.rain-container {
    display: none;
}

/* Efeito de piscar do texto (classe toggle via JS) */
.blink-out {
    animation: blinkEffect 0.6s ease-in-out;
}

@keyframes blinkEffect {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    25% {
        opacity: 0;
        transform: scale(0.95);
    }

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

    75% {
        opacity: 0;
        transform: scale(0.95);
    }

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

/* Transição de texto flash */
.flash-transition {
    animation: flashSwap 1s ease-in-out;
}

@keyframes flashSwap {
    0% {
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(156, 39, 176, 0.6));
    }

    30% {
        opacity: 0;
        filter: drop-shadow(0 0 0px transparent);
        transform: scale(0.8);
    }

    50% {
        opacity: 0;
    }

    70% {
        opacity: 1;
        filter: drop-shadow(0 0 60px rgba(212, 175, 55, 1));
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        filter: drop-shadow(0 0 30px rgba(156, 39, 176, 0.6));
        transform: scale(1);
    }
}

/* Responsividade */
@media (max-width: 768px) {
    .prince-symbol {
        font-size: 2rem;
        top: 5%;
    }

    .subtitle-top {
        font-size: 0.7rem;
        letter-spacing: 0.2em;
    }

    .tagline {
        font-size: 1rem;
    }

    .decorative-line .line {
        width: 40px;
    }
}

@media (max-width: 480px) {
    .subtitle-top {
        font-size: 0.6rem;
    }

    .content {
        padding: 1rem;
    }
}