/* =========================================================
   RESET
========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    font-family: 'Poppins', sans-serif;

    color: white;

    background:
        linear-gradient(
            180deg,
            #12091f 0%,
            #1b1030 25%,
            #24143e 50%,
            #1a102d 75%,
            #0f081c 100%
        );
}


/* =========================================================
   VARIABLES
========================================================= */

:root {
    --bg-dark: #12091f;
    --bg-card: rgba(255, 255, 255, 0.08);

    --pink: #ff7ac8;
    --pink-light: #ffb6e6;

    --purple: #cdb4db;
    --purple-dark: #9f86c0;

    --blue: #89b4fa;
    --cyan: #7bdff2;

    --glass: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.18);
}


/* =========================================================
   UTILIDAD
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   ESTRELLAS
========================================================= */

#stars {
    position: fixed;
    inset: 0;

    pointer-events: none;

    z-index: 0;

    overflow: hidden;
}

#stars::before,
#stars::after {
    content: "";

    position: absolute;
    inset: 0;

    background-image:
        radial-gradient(
            circle,
            rgba(255, 255, 255, 0.8) 1px,
            transparent 1px
        );

    background-size: 90px 90px;

    opacity: 0.35;

    animation: twinkle 5s infinite alternate;
}

#stars::after {
    background-size: 140px 140px;
    opacity: 0.2;
    animation-delay: 2s;
}

@keyframes twinkle {
    from {
        opacity: 0.15;
    }

    to {
        opacity: 0.5;
    }
}


/* =========================================================
   CORAZONES FLOTANTES
========================================================= */

#hearts-container {
    position: fixed;
    inset: 0;

    pointer-events: none;

    overflow: hidden;

    z-index: 1;
}

.floating-heart {
    position: absolute;

    bottom: -50px;

    font-size: 20px;

    opacity: 0;

    animation: heartFloat linear forwards;

    pointer-events: none;
}

@keyframes heartFloat {

    0% {
        transform:
            translateY(0)
            scale(0.6)
            rotate(0deg);

        opacity: 0;
    }

    15% {
        opacity: 0.8;
    }

    80% {
        opacity: 0.5;
    }

    100% {
        transform:
            translateY(-110vh)
            scale(1.2)
            rotate(25deg);

        opacity: 0;
    }
}


/* =========================================================
   PARTÍCULAS
========================================================= */

#particles {
    position: fixed;
    inset: 0;

    pointer-events: none;

    z-index: 1;
}


/* =========================================================
   NUBES
========================================================= */

.cloud {
    position: fixed;

    width: 170px;
    height: 55px;

    border-radius: 50px;

    background: rgba(255, 255, 255, 0.08);

    filter: blur(2px);

    pointer-events: none;

    z-index: 1;
}

.cloud::before,
.cloud::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    background: inherit;
}

.cloud::before {
    width: 70px;
    height: 70px;

    left: 25px;
    bottom: 15px;
}

.cloud::after {
    width: 90px;
    height: 90px;

    right: 20px;
    bottom: 10px;
}

.cloud1 {
    top: 12%;
    left: -200px;

    animation: cloudMove 40s linear infinite;
}

.cloud2 {
    top: 30%;
    left: -300px;

    opacity: 0.6;

    animation:
        cloudMove 55s linear infinite 10s;
}

.cloud3 {
    top: 55%;
    left: -250px;

    opacity: 0.4;

    animation:
        cloudMove 65s linear infinite 20s;
}

@keyframes cloudMove {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(130vw);
    }
}


/* =========================================================
   LUFFY
========================================================= */

#luffy-run {
    position: fixed;

    left: -400px;
    bottom: 20px;

    width: 350px;
    height: auto;

    z-index: 9999;

    pointer-events: none;

    user-select: none;

    filter:
        drop-shadow(0 0 10px rgba(255, 122, 200, 0.4))
        drop-shadow(0 0 20px rgba(205, 180, 219, 0.25));

    will-change: left, transform;
}


/* =========================================================
   THOUSAND SUNNY
========================================================= */

#sunny-ship {
    position: fixed;

    left: -300px;
    bottom: 15vh;

    width: 220px;
    height: auto;

    opacity: 0;

    z-index: 2;

    pointer-events: none;

    filter:
        drop-shadow(0 0 10px rgba(255, 255, 255, 0.2))
        drop-shadow(0 0 20px rgba(255, 122, 200, 0.15));

    will-change: transform, left, opacity;
}

.sunny-navegando {
    animation:
        sunnyBalanceo 20s linear forwards;
}

@keyframes sunnyBalanceo {

    0% {
        left: -300px;
        opacity: 0;

        transform:
            translateY(20px)
            rotate(-3deg)
            scaleX(-1);
    }

    10% {
        opacity: 1;
    }

    30% {
        transform:
            translateY(-15px)
            rotate(3deg)
            scaleX(-1);
    }

    50% {
        transform:
            translateY(10px)
            rotate(-2deg)
            scaleX(-1);
    }

    70% {
        transform:
            translateY(-12px)
            rotate(2deg)
            scaleX(-1);
    }

    90% {
        opacity: 1;
    }

    100% {
        left: 110vw;
        opacity: 0;

        transform:
            translateY(0)
            rotate(0deg)
            scaleX(-1);
    }
}
/* =========================================================
   CONTENIDO PRINCIPAL
========================================================= */

main {
    position: relative;

    z-index: 5;

    padding-bottom: 250px;
}

.section {
    position: relative;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 40px 20px;

    margin: 20px 0;
}


/* =========================================================
   HERO
========================================================= */

.hero {
    min-height: 45vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 30px 20px;
}

.hero-card {
    width: min(900px, 100%);

    padding: 50px 35px;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            rgba(255, 122, 200, 0.15),
            rgba(137, 180, 250, 0.1),
            rgba(205, 180, 219, 0.12)
        );

    border: 1px solid var(--border);

    border-radius: 30px;

    backdrop-filter: blur(15px);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.35),
        0 0 40px rgba(255, 122, 200, 0.08);
}

.hero-card h1 {
    font-size: clamp(40px, 7vw, 70px);

    margin-bottom: 15px;

    color: var(--pink-light);

    text-shadow:
        0 0 15px rgba(255, 122, 200, 0.5),
        0 0 30px rgba(255, 122, 200, 0.2);
}

.hero-card p {
    font-size: 18px;

    color: rgba(255, 255, 255, 0.85);
}


/* =========================================================
   GLASS CARDS
========================================================= */

.glass-card {
    width: min(900px, 100%);

    padding: 35px;

    text-align: center;

    background: var(--glass);

    border: 1px solid var(--border);

    border-radius: 28px;

    backdrop-filter: blur(15px);

    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.3);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-6px);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(255, 122, 200, 0.08);
}


/* =========================================================
   TÍTULOS
========================================================= */

h1,
h2,
h3 {
    font-weight: 600;
}

h2 {
    margin-bottom: 25px;

    color: var(--pink-light);

    font-size: clamp(24px, 4vw, 32px);
}

p {
    line-height: 1.7;
}


/* =========================================================
   BOTONES
========================================================= */

button {
    border: none;

    padding: 13px 25px;

    border-radius: 30px;

    font-family: inherit;
    font-size: 15px;
    font-weight: 600;

    color: white;

    cursor: pointer;

    background:
        linear-gradient(
            135deg,
            var(--pink),
            var(--purple-dark)
        );

    box-shadow:
        0 8px 20px rgba(255, 122, 200, 0.2);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        filter 0.25s ease;
}

button:hover {
    transform: translateY(-3px);

    filter: brightness(1.08);

    box-shadow:
        0 12px 30px rgba(255, 122, 200, 0.3);
}

button:active {
    transform: scale(0.96);
}


/* =========================================================
   PANTALLA INICIAL
========================================================= */

#welcome-screen,
#countdown-screen {
    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 20px;

    background:
        linear-gradient(
            180deg,
            #12091f,
            #24143e
        );
}

.welcome-card,
.countdown-card {
    width: min(600px, 100%);

    padding: 45px 30px;

    text-align: center;

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid var(--border);

    border-radius: 30px;

    backdrop-filter: blur(20px);

    box-shadow:
        0 20px 70px rgba(0, 0, 0, 0.5),
        0 0 40px rgba(255, 122, 200, 0.1);
}

.welcome-card h1,
.countdown-card h1 {
    margin-bottom: 20px;

    color: var(--pink-light);
}

.welcome-card p {
    margin-bottom: 30px;

    color: rgba(255, 255, 255, 0.85);
}


/* =========================================================
   COUNTDOWN
========================================================= */

#counter {
    margin-top: 20px;

    font-size: clamp(70px, 15vw, 130px);

    font-weight: 700;

    color: var(--pink-light);

    text-shadow:
        0 0 20px rgba(255, 122, 200, 0.6);

    animation: counterPulse 1s infinite alternate;
}

@keyframes counterPulse {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.08);
    }
}


/* =========================================================
   CONTADOR DE RELACIÓN
========================================================= */

.vintage-counter {
    display: flex;

    justify-content: center;
    align-items: center;

    flex-wrap: wrap;

    gap: 20px;

    margin-top: 25px;
}

.counter-item {
    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 8px;
}

.time-box {
    min-width: 100px;

    padding: 15px 12px;

    border-radius: 15px;

    font-size: 30px;
    font-weight: 700;

    color: var(--pink-light);

    background:
        rgba(255, 255, 255, 0.06);

    border: 1px solid rgba(255, 255, 255, 0.15);

    box-shadow:
        inset 0 0 20px rgba(255, 122, 200, 0.05),
        0 10px 25px rgba(0, 0, 0, 0.2);
}

.counter-item span {
    font-size: 12px;

    letter-spacing: 2px;

    color: rgba(255, 255, 255, 0.65);
}


/* =========================================================
   GALERÍA
========================================================= */

.gallery {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));

    gap: 18px;

    margin-top: 20px;
}

.gallery img {
    width: 100%;
    height: 250px;

    object-fit: cover;

    border-radius: 20px;

    border: 1px solid rgba(255, 255, 255, 0.15);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.25);

    cursor: pointer;

    transition:
        transform 0.35s ease,
        filter 0.35s ease,
        box-shadow 0.35s ease;
}

.gallery img:hover {
    transform: scale(1.04);

    filter: brightness(1.08);

    box-shadow:
        0 15px 35px rgba(255, 122, 200, 0.2);
}


/* =========================================================
   CARTA
========================================================= */

.letter-card button {
    margin-bottom: 20px;
}

#letterContent {
    margin-top: 20px;

    padding: 25px;

    text-align: left;

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.05);

    border:
        1px solid rgba(255, 255, 255, 0.1);
}

#typedText {
    white-space: pre-line;

    line-height: 1.9;

    color: rgba(255, 255, 255, 0.9);
}


/* =========================================================
   MENSAJES
========================================================= */

#randomMessage {
    min-height: 55px;

    margin-bottom: 25px;

    color: rgba(255, 255, 255, 0.9);

    font-size: 17px;

    line-height: 1.8;
}


/* =========================================================
   FRASES
========================================================= */

#quoteBox {
    padding: 25px;

    border-radius: 20px;

    color: var(--pink-light);

    font-size: 18px;

    font-style: italic;

    line-height: 1.8;

    background:
        rgba(255, 255, 255, 0.05);

    border:
        1px solid rgba(255, 255, 255, 0.12);
}


/* =========================================================
   REPRODUCTOR DE MÚSICA
========================================================= */

.music-card {
    overflow: hidden;
}

.music-player {
    display: flex;

    align-items: center;

    gap: 18px;

    padding: 20px;

    border-radius: 22px;

    background:
        rgba(255, 255, 255, 0.06);

    border:
        1px solid rgba(255, 255, 255, 0.12);
}

.music-cover {
    width: 70px;
    height: 70px;

    flex-shrink: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    border-radius: 18px;

    font-size: 32px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 122, 200, 0.35),
            rgba(205, 180, 219, 0.25)
        );

    box-shadow:
        0 0 25px rgba(255, 122, 200, 0.15);
}

.music-details {
    flex: 1;

    min-width: 0;

    text-align: left;
}

.music-name {
    font-size: 17px;
    font-weight: 600;

    color: white;
}

.music-artist {
    margin-top: 3px;

    font-size: 13px;

    color: rgba(255, 255, 255, 0.6);
}

.music-progress {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 12px;
}

.music-progress span {
    min-width: 35px;

    font-size: 11px;

    color: rgba(255, 255, 255, 0.6);
}

.music-progress span:last-child {
    text-align: right;
}

#musicSeek {
    width: 100%;
    height: 5px;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    cursor: pointer;
    outline: none;
}

#musicSeek::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;

    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: #ff7ac8;

    cursor: pointer;
    border: 2px solid white;

    /* IMPORTANTE: sin transición */
    transition: none;
}

#musicSeek::-moz-range-thumb {
    width: 14px;
    height: 14px;

    border-radius: 50%;

    background: #ff7ac8;

    cursor: pointer;
    border: 2px solid white;
}

.music-play {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;

    border-radius: 50%;

    font-size: 18px;
}


/* =========================================================
   FINAL
========================================================= */

.final-card {
    padding: 50px 30px;
}

.final-card h1 {
    margin-bottom: 20px;

    color: var(--pink-light);

    font-size: clamp(32px, 6vw, 55px);

    text-shadow:
        0 0 20px rgba(255, 122, 200, 0.4);
}

.final-card p {
    margin-bottom: 30px;

    color: rgba(255, 255, 255, 0.85);
}


/* =========================================================
   MODAL
========================================================= */

#modal {
    position: fixed;

    inset: 0;

    z-index: 20000;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 20px;

    background:
        rgba(5, 2, 12, 0.82);

    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;

    width: min(700px, 100%);
    max-height: 90vh;

    overflow-y: auto;

    padding: 35px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(36, 20, 62, 0.97),
            rgba(18, 9, 31, 0.97)
        );

    border:
        1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.6),
        0 0 50px rgba(255, 122, 200, 0.1);

    scrollbar-width: thin;
    scrollbar-color:
        rgba(255, 122, 200, 0.6)
        transparent;
}

.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background:
        rgba(255, 122, 200, 0.6);
}

.close-modal-btn {
    position: sticky;

    top: 0;
    left: 100%;

    width: 40px;
    height: 40px;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0;

    border-radius: 50%;

    font-size: 18px;

    background:
        rgba(255, 255, 255, 0.1);

    z-index: 2;
}

.close-modal-btn:hover {
    background:
        rgba(255, 122, 200, 0.3);
}


/* =========================================================
   RECUERDO
========================================================= */

.memory-modal {
    text-align: center;
}

.memory-modal h2 {
    margin-bottom: 15px;
}

.memory-image {
    display: block;

    width: auto;
    max-width: 90%;
    max-height: 65vh;

    margin: 20px auto;

    border-radius: 20px;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.4);
}

.memory-modal p {
    color: rgba(255, 255, 255, 0.85);

    line-height: 1.8;
}


/* =========================================================
   FUEGOS ARTIFICIALES
========================================================= */

#fireworksCanvas {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    z-index: 15000;

    pointer-events: none;

    display: none;
}

#fireworksBtn {
    animation: fireworksPulse 2s infinite;
}

@keyframes fireworksPulse {

    0%,
    100% {
        box-shadow:
            0 8px 20px rgba(255, 122, 200, 0.2);
    }

    50% {
        box-shadow:
            0 8px 35px rgba(255, 122, 200, 0.5);
    }
}


/* =========================================================
   FINAL ROMÁNTICO
========================================================= */

.final-romantico-content {
    width: min(700px, 92vw);
    max-height: 85vh;

    overflow-y: auto;

    padding: 40px 30px;

    text-align: center;

    border-radius: 30px;

    background:
        linear-gradient(
            145deg,
            rgba(40, 18, 55, 0.98),
            rgba(18, 9, 31, 0.98)
        );

    border:
        1px solid rgba(255, 255, 255, 0.18);

    box-shadow:
        0 30px 100px rgba(0, 0, 0, 0.6),
        0 0 60px rgba(255, 122, 200, 0.2);

    scrollbar-width: thin;

    scrollbar-color:
        rgba(255, 122, 200, 0.6)
        transparent;
}

.final-romantico-content::-webkit-scrollbar {
    width: 6px;
}

.final-romantico-content::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background:
        rgba(255, 122, 200, 0.6);
}

.final-heart {
    font-size: 70px;

    margin-bottom: 15px;

    animation: finalHeartBeat 1.5s infinite;
}

@keyframes finalHeartBeat {

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

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

.final-romantico-content h1 {
    color: var(--pink-light);

    font-size: clamp(35px, 7vw, 60px);

    margin-bottom: 10px;
}

.final-romantico-content .final-text {
    margin-top: 20px;

    color: rgba(255, 255, 255, 0.9);

    line-height: 1.9;
}

.final-frase {
    margin-top: 25px;

    color: var(--purple);

    font-size: 18px;

    font-style: italic;
}

.final-love {
    margin-top: 25px;

    color: var(--pink-light);

    font-size: 25px;
    font-weight: 700;
}

.final-thanks {
    margin-top: 15px;

    color: rgba(255, 255, 255, 0.7);
}


/* =========================================================
   SCROLLBAR GENERAL
========================================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background:
        #12091f;
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            var(--pink),
            var(--purple-dark)
        );
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {

    .section {
        padding: 25px 15px;
    }

    .glass-card {
        padding: 25px 18px;

        border-radius: 22px;
    }

    .hero {
        min-height: 40vh;

        padding: 20px 15px;
    }

    .hero-card {
        padding: 40px 20px;

        border-radius: 24px;
    }

    .hero-card p {
        font-size: 16px;
    }

    .vintage-counter {
        gap: 10px;
    }

    .time-box {
        min-width: 75px;

        padding: 12px 8px;

        font-size: 23px;
    }

    .counter-item span {
        font-size: 10px;
    }

    .gallery {
        grid-template-columns:
            repeat(2, 1fr);

        gap: 10px;
    }

    .gallery img {
        height: 180px;

        border-radius: 15px;
    }

    #luffy-run {
        width: 260px;

        bottom: 15px;
    }

    #sunny-ship {
        width: 150px;

        bottom: 12vh;
    }

    .music-player {
        gap: 12px;

        padding: 15px;
    }

    .music-cover {
        width: 55px;
        height: 55px;

        font-size: 25px;
    }

    .music-name {
        font-size: 14px;
    }

    .music-artist {
        font-size: 11px;
    }

    .music-play {
        width: 45px;
        height: 45px;
    }

    .modal-content {
        padding: 25px 18px;
    }

    .memory-image {
        max-width: 100%;
    }
}


@media (max-width: 480px) {

    .welcome-card,
    .countdown-card {
        padding: 35px 20px;
    }

    .welcome-card h1,
    .countdown-card h1 {
        font-size: 28px;
    }

    .vintage-counter {
        gap: 7px;
    }

    .time-box {
        min-width: 65px;

        font-size: 20px;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .gallery img {
        height: 230px;
    }

    #luffy-run {
        width: 220px;
    }

    #sunny-ship {
        width: 100px;
    }

    .music-player {
        flex-wrap: wrap;
    }

    .music-details {
        min-width: calc(100% - 80px);
    }

    .music-play {
        margin-left: auto;
    }

    .final-romantico-content {
        padding: 30px 20px;
    }
}
