/* ==========================================================
   Paleta: Verde Pacay + Crema | Dark Cinema
========================================================== */

/* ── VARIABLES ── */
:root {
    --bg: #0c1a0e;
    --bg-deep: #06100a;
    --accent: #66BB6A;
    --accent-glow: rgba(102, 187, 106, 0.35);
    --accent-dim: rgba(102, 187, 106, 0.12);
    --gold: #FFD54F;
    --gold-glow: rgba(255, 213, 79, 0.5);
    --cream: #FDFBF7;
    --grey: #9ab09c;
    --glass: rgba(12, 26, 14, 0.7);
    --radius: 8px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ── RESET & BASE ── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--bg-deep);
    color: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    /* Fix: quitar outline azul del navegador en todo el body */
    outline: none;
}

.hidden {
    display: none !important;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* ── TYPOGRAPHY ── */
h1,
h2,
h3,
h4 {
    font-weight: 800;
}

/* ── KEYFRAMES PREMIUM ── */
@keyframes fadeIn {
    from {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

@keyframes fadeOut {
    from {
        opacity: 1
    }

    to {
        opacity: 0
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px)
    }

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

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0)
    }

    to {
        opacity: 0;
        transform: translateY(30px)
    }
}

@keyframes dropIn {
    from {
        transform: scale(0.9) translateY(30px);
        opacity: 0
    }

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

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

    to {
        transform: scale(0.95);
        opacity: 0
    }
}

@keyframes cinematicReveal {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.6
    }

    50% {
        opacity: 1
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 15px var(--accent-glow)
    }

    50% {
        box-shadow: 0 0 40px var(--accent-glow), 0 0 80px rgba(102, 187, 106, 0.15)
    }
}

@keyframes tickFlash {
    0% {
        color: var(--cream);
        transform: scale(1.15)
    }

    100% {
        color: var(--accent);
        transform: scale(1)
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% center
    }

    100% {
        background-position: 200% center
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0.7);
        opacity: 0
    }

    60% {
        transform: scale(1.06);
        opacity: 1
    }

    80% {
        transform: scale(0.97)
    }

    100% {
        transform: scale(1)
    }
}

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.95)
    }

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

/* ================================================================
   1. PANTALLA DE ENTRADA — SELECCIÓN DE PERFIL
================================================================ */
.profile-gate {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 30% 40%, #152618 0%, var(--bg-deep) 70%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Subtle particle dots background */
.profile-gate::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(102, 187, 106, 0.08) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.profile-gate.fade-out {
    opacity: 0;
    transform: scale(1.08);
    pointer-events: none;
}

.gate-header {
    position: absolute;
    top: 0;
    left: 0;
    padding: 2rem 4rem;
    width: 100%;
}

.logo-netflix {
    color: var(--accent);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 4px;
    text-transform: uppercase;
    text-shadow: 0 0 30px var(--accent-glow);
}

.profile-selection {
    text-align: center;
    animation: fadeIn 1.2s ease;
}

.profile-title {
    font-size: clamp(1.4rem, 3vw, 2.2rem);
    font-weight: 400;
    color: var(--cream);
    margin-bottom: 2.5rem;
    opacity: 0.85;
}

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

.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.profile:hover {
    transform: translateY(-8px);
}

.profile:hover .avatar-wrapper {
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
}

.profile:hover .profile-name {
    color: var(--cream);
}

.avatar-wrapper {
    width: clamp(100px, 10vw, 180px);
    height: clamp(100px, 10vw, 180px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
}

.avatar {
    width: 100%;
    height: 100%;
}

/* Avatar — CSS puro sin imagen externa */
.avatar-1 {
    background: linear-gradient(135deg, #4CAF50, #81C784);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--bg-deep);
    font-weight: 700;
    user-select: none;
}

.avatar-1::after {
    content: 'V';
}

.profile-name {
    color: var(--grey);
    font-size: clamp(13px, 1.2vw, 20px);
    font-weight: 500;
    transition: color 0.3s;
}

/* ================================================================
   2. NAVBAR GLOBAL
================================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to bottom, rgba(6, 16, 10, 0.98) 0%, transparent 100%);
    transition: background 0.4s, box-shadow 0.4s, padding 0.3s;
    z-index: 900;
    border: none;
    outline: none;
    /* Fix borde azul */
}

.navbar.scrolled {
    background: rgba(6, 16, 10, 0.97);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    padding: 0.8rem 3rem;
    backdrop-filter: blur(10px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-left .logo-netflix {
    font-size: 1.9rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: all 0.25s;
    padding-bottom: 4px;
    white-space: nowrap;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a.active,
.nav-links a:hover {
    opacity: 1;
    font-weight: 700;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
}

.nav-avatar {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: var(--bg-deep);
    font-weight: 700;
}

.nav-avatar:hover {
    border-color: var(--cream);
}

/* ================================================================
   3. HERO / BILLBOARD
================================================================ */
.billboard {
    position: relative;
    width: 100%;
    height: 88vh;
    min-height: 560px;
    overflow: hidden;
}

.billboard-image {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.billboard-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.75) saturate(1.1);
}

.billboard-vignette {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(6, 16, 10, 0.92) 0%, rgba(6, 16, 10, 0.4) 55%, transparent 100%),
        linear-gradient(to bottom, rgba(6, 16, 10, 0.2) 0%, transparent 40%, rgba(6, 16, 10, 0.98) 100%);
}

.billboard-layer {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 4.5rem;
}

.billboard-content {
    max-width: 42%;
    animation: slideUp 0.9s ease;
}

.logo-and-text {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.6rem;
}

.n-icon {
    color: var(--accent);
    font-weight: 900;
    font-size: 2.2rem;
    text-shadow: 0 0 20px var(--accent-glow);
}

.original-text {
    color: var(--grey);
    font-size: 0.75rem;
    letter-spacing: 4px;
    font-weight: 600;
}

.title-logo {
    font-size: clamp(2.8rem, 4.5vw, 5rem);
    line-height: 1.05;
    margin-bottom: 1.2rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.tags {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.8rem;
    font-size: 0.9rem;
    font-weight: 600;
    flex-wrap: wrap;
}

.match {
    color: #46d369;
    letter-spacing: 0.5px;
}

.rating {
    border: 1px solid var(--grey);
    padding: 2px 8px;
    border-radius: 3px;
    color: var(--cream);
    font-size: 0.8rem;
}

.hd {
    border: 1px solid var(--grey);
    padding: 2px 7px;
    font-size: 0.75rem;
    border-radius: 3px;
    color: var(--grey);
}

.synopsis {
    font-size: clamp(0.85rem, 1.1vw, 1.05rem);
    line-height: 1.65;
    margin-bottom: 1.8rem;
    color: rgba(253, 251, 247, 0.85);
}

.billboard-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.7rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.btn-play {
    background: var(--cream);
    color: #0c1a0e;
}

.btn-play:hover {
    background: rgba(253, 251, 247, 0.85);
    transform: scale(1.03);
}

.btn-more {
    background: rgba(20, 40, 22, 0.7);
    color: var(--cream);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.btn-more:hover {
    background: rgba(30, 60, 33, 0.9);
    border-color: var(--accent);
}

.glow-btn:hover {
    box-shadow: 0 0 10px var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent) !important;
}

.btn-more:hover {
    background: rgba(20, 40, 22, 0.9);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.03);
}

/* Floating Skip Intro button */
.btn-skip-intro {
    position: absolute;
    bottom: 28px;
    right: 36px;
    z-index: 100;
    background: rgba(6, 16, 10, 0.55);
    color: var(--cream);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    cursor: pointer;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}

.btn-skip-intro:hover {
    background: rgba(102, 187, 106, 0.25);
    border-color: var(--accent);
    color: var(--accent);
}

/* ================================================================
   4. CARRUSELES DE FOTOS
================================================================ */
.sliders-container {
    position: relative;
    z-index: 20;
    margin-top: -110px;
    padding: 0 0 5rem 4rem;
}

.slider-row {
    margin-bottom: 3rem;
}

.row-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--cream);
    letter-spacing: 0.5px;
}

.row-items {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-right: 4rem;
    padding-bottom: 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.row-items::-webkit-scrollbar {
    display: none;
}

.movie-card {
    min-width: 240px;
    height: 145px;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
}

.movie-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.2);
}

.movie-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.3s;
}

.movie-card:hover {
    transform: scale(1.08) translateY(-4px);
    z-index: 10;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.movie-card:hover img {
    filter: brightness(1.1);
}

/* ================================================================
   5. FLIP CARDS — RAZONES DE AMOR
================================================================ */
.flip-items {
    perspective: 1200px;
}

.flip-card {
    min-width: 200px;
    max-width: 220px;
    height: 190px;
    perspective: 1200px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.flip-card:hover {
    transform: translateY(-4px);
}

.flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.flip-front {
    background: linear-gradient(145deg, #1a421d, var(--accent));
    color: var(--bg-deep);
    font-weight: bold;
    font-family: 'Dancing Script', cursive;
    font-size: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.flip-back {
    background: linear-gradient(145deg, #fffdf5, #f5f0e0);
    color: var(--bg-deep);
    transform: rotateY(180deg);
    font-family: 'Lora', serif;
    font-size: 0.92rem;
    font-style: italic;
    line-height: 1.55;
    border: 2px solid var(--accent);
    box-shadow: 0 0 20px rgba(102, 187, 106, 0.15), inset 0 0 0 1px rgba(102, 187, 106, 0.15);
}

/* ================================================================
   5b. TAB CONTENT — TRANSICIÓN DE ENTRADA/SALIDA
================================================================ */
.content-view {
    animation: none;
}

.content-view.tab-entering {
    animation: tabSlideIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.content-view.tab-leaving {
    animation: tabSlideOut 0.3s cubic-bezier(0.55, 0, 1, 0.45) forwards;
    pointer-events: none;
}

@keyframes tabSlideIn {
    from {
        opacity: 0;
        transform: translateY(18px)
    }

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

@keyframes tabSlideOut {
    from {
        opacity: 1;
        transform: translateY(0)
    }

    to {
        opacity: 0;
        transform: translateY(-12px)
    }
}

/* ================================================================
   6. PESTAÑA TOP SECRET — COSMOS
================================================================ */
#tab-magia {
    background:
        radial-gradient(ellipse at 20% 10%, rgba(26, 66, 29, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 90%, rgba(255, 213, 79, 0.06) 0%, transparent 50%),
        linear-gradient(to bottom, #071008 0%, #050d07 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
}

#particles-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.shooting-star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .06), 0 0 0 6px rgba(255, 255, 255, .06), 0 0 15px rgba(255, 255, 255, .9);
    animation: shooting 4s linear infinite;
}

.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 250px;
    height: 1px;
    background: linear-gradient(90deg, #fff, transparent);
}

@keyframes shooting {
    0% {
        transform: scale(1) translateX(0) rotate(45deg);
        opacity: 1;
    }

    100% {
        transform: scale(0.1) translateX(1200px) rotate(45deg);
        opacity: 0;
    }
}

.magic-container {
    padding-top: 18vh;
    text-align: center;
    position: relative;
    z-index: 10;
    padding-bottom: 4rem;
}

.magic-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(3rem, 6vw, 5rem);
    margin-bottom: 1rem;
    color: #fff;
    text-shadow: 0 0 25px rgba(255, 213, 79, 0.6), 0 0 60px rgba(102, 187, 106, 0.3);
}

.magic-subtitle {
    font-family: 'Lora', serif;
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 2.5rem;
    color: #ccc;
    padding: 0 1.5rem;
}

.reward-box {
    background: linear-gradient(145deg, #111e13, #0a1409);
    color: var(--cream);
    padding: 3rem 3.5rem;
    border-radius: 12px;
    max-width: 620px;
    margin: 2rem auto;
    border: 1px solid rgba(255, 213, 79, 0.35);
    box-shadow: 0 0 50px rgba(255, 213, 79, 0.12), 0 20px 60px rgba(0, 0, 0, 0.5), inset 0 0 30px rgba(255, 213, 79, 0.04);
    animation: bounceIn 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.reward-box h2 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 0 0 30px var(--gold-glow);
    animation: glowPulse 3s ease infinite;
}

.reward-box p {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(253, 251, 247, 0.9);
}

.hunt-wrapper {
    display: none;
}

/* ================================================================
   7. SECUENCIAS CINEMÁTICAS
================================================================ */
.cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.7s ease;
}

.cinematic-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.cinematic-overlay .letterbox-top,
.cinematic-overlay .letterbox-bottom {
    position: absolute;
    left: 0;
    width: 100%;
    background: #000;
    z-index: 2;
    transition: height 1.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.cinematic-overlay .letterbox-top {
    top: 0;
    height: 18vh;
}

.cinematic-overlay .letterbox-bottom {
    bottom: 0;
    height: 18vh;
}

.cinematic-overlay.open .letterbox-top,
.cinematic-overlay.open .letterbox-bottom {
    height: 0;
}

.cinematic-overlay .cinematic-text {
    color: #fff;
    text-align: center;
    z-index: 3;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.1s ease, transform 1.1s ease;
    padding: 0 2rem;
}

.cinematic-overlay.show-text .cinematic-text {
    opacity: 1;
    transform: scale(1);
}

.cinematic-overlay.fade-text .cinematic-text {
    opacity: 0;
    transform: scale(0.96);
}

.cinematic-studio {
    font-size: 0.8rem;
    letter-spacing: 7px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
}

.cinematic-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(2.8rem, 7vw, 5.5rem);
    color: var(--gold);
    line-height: 1.2;
    margin-bottom: 0.9rem;
    text-shadow: 0 0 50px var(--gold-glow), 0 0 100px rgba(255, 213, 79, 0.2);
}

.cinematic-subtitle {
    font-family: 'Lora', serif;
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: rgba(255, 255, 255, 0.75);
    font-style: italic;
}

.cinematic-skip {
    position: absolute;
    bottom: 2.5rem;
    right: 2.5rem;
    z-index: 10;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    padding: 8px 20px;
    font-size: 0.82rem;
    letter-spacing: 1px;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: all 0.2s ease;
}

.cinematic-skip:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: #fff;
    color: #fff;
}

/* ── Tema exclusivo: Perfil Valeria ── */
@keyframes valeria-pulse {
    0%, 100% { opacity: 0.18; transform: scale(1);   }
    50%       { opacity: 0.45; transform: scale(1.08); }
}
@keyframes heart-float {
    0%   { transform: translateY(0)   scale(1);   opacity: 0.9; }
    100% { transform: translateY(-90px) scale(0.5); opacity: 0;   }
}

.cinematic-valeria-theme {
    background: radial-gradient(ellipse at center,
        #0a2212 0%,
        #040d06 70%,
        #000 100%
    );
}

/* Aura verde detrás del texto */
.cinematic-valeria-theme::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%,
        rgba(102, 187, 106, 0.18) 0%,
        transparent 65%
    );
    animation: valeria-pulse 3.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

/* Corazoncitos flotantes decorativos */
.cinematic-valeria-theme::after {
    content: '💚 💚 💚 💚 💚';
    position: absolute;
    bottom: 22vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    letter-spacing: 2rem;
    opacity: 0;
    animation: heart-float 4s ease-out 1.5s forwards;
    z-index: 4;
    pointer-events: none;
    white-space: nowrap;
}

/* Barras letterbox con leve tinte verde */
.cinematic-valeria-theme .letterbox-top,
.cinematic-valeria-theme .letterbox-bottom {
    background: linear-gradient(to bottom, #000 70%, #051a08);
}

/* Texto de estudio con color acento */
.cinematic-valeria-theme .cinematic-studio {
    color: var(--accent);
    letter-spacing: 9px;
    font-size: 0.78rem;
}

/* Título en verde brillante en lugar de dorado */
.cinematic-valeria-theme .cinematic-title {
    color: var(--accent);
    text-shadow:
        0 0 40px rgba(102, 187, 106, 0.7),
        0 0 90px rgba(102, 187, 106, 0.3);
}

/* Subtítulo más luminoso */
.cinematic-valeria-theme .cinematic-subtitle {
    color: rgba(253, 251, 247, 0.88);
}


/* ================================================================
   8. MODALES GENERALES
================================================================ */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Animación de entrada al aparecer más pausada */
    animation: modalFadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.modal.hidden {
    display: none !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }

    to {
        opacity: 1;
        backdrop-filter: blur(10px);
    }
}

.modal-content {
    background: linear-gradient(160deg, #101f12, #0a1509);
    width: 90%;
    max-width: 820px;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    max-height: 92vh;
    box-shadow: var(--shadow);
    border: 1px solid rgba(102, 187, 106, 0.12);
    animation: dropIn 0.6s cubic-bezier(0.2, 1, 0.2, 1);
}

.close-btn {
    position: absolute;
    top: 14px;
    right: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--grey);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--cream);
}

.modal-body {
    padding: 3rem;
}

/* Letter modal */
.letter-body {
    background: linear-gradient(160deg, #fffdf8, #f9f5ec);
    color: var(--bg-deep);
    border-radius: 12px;
}

.letter-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.4rem;
    text-align: center;
    margin-bottom: 1.8rem;
    color: #2d5a30;
}

.letter-text {
    font-family: 'Lora', serif;
    font-size: 1.08rem;
    line-height: 1.9;
    color: #1a2e1b;
}

.letter-text .signature {
    text-align: right;
    margin-top: 2rem;
    font-weight: 700;
    color: #2d5a30;
    font-family: 'Dancing Script', cursive;
    font-size: 1.6rem;
}

/* Countdown modal */
.time-box {
    background: linear-gradient(135deg, #1a3d1e, #102412);
    padding: 16px 22px;
    border-radius: var(--radius);
    min-width: 85px;
    display: inline-block;
    margin: 0 6px;
    border: 1px solid rgba(102, 187, 106, 0.2);
    box-shadow: 0 0 20px rgba(102, 187, 106, 0.08);
}

.time-box span {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--accent);
    display: block;
    font-variant-numeric: tabular-nums;
    transition: color 0.2s;
}

.time-box span.tick {
    animation: tickFlash 0.35s ease forwards;
}

.time-box p {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--grey);
    margin-top: 4px;
}

.countdown-blocks {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.video-wrapper {
    width: 100%;
    max-width: 640px;
    margin: 1.8rem auto 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(102, 187, 106, 0.25);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

/* PIN modal */
#pin-input {
    background: #1a2e1d;
    border: 2px solid rgba(102, 187, 106, 0.3);
    color: var(--cream);
    font-size: 2rem;
    font-weight: 700;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: var(--radius);
    letter-spacing: 14px;
    outline: none;
    transition: border 0.3s, box-shadow 0.3s;
}

#pin-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px var(--accent-glow);
}

#pin-input::placeholder {
    color: rgba(154, 176, 156, 0.4);
    font-weight: 300;
    letter-spacing: 8px;
}

.error-shake {
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
    border-color: #e50914 !important;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-2px, 0, 0)
    }

    20%,
    80% {
        transform: translate3d(4px, 0, 0)
    }

    30%,
    50%,
    70% {
        transform: translate3d(-8px, 0, 0)
    }

    40%,
    60% {
        transform: translate3d(8px, 0, 0)
    }
}

/* --- Estilos para transiciones de contenido --- */
.fade-transition {
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    opacity: 1;
    filter: blur(0);
}

.fade-out-active {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(10px);
    pointer-events: none;
}

.reveal-content {
    animation: cinematicReveal 0.8s cubic-bezier(0.2, 1, 0.2, 1) forwards;
}

/* Efecto escalonado para párrafos de cartas */
.birthday-letter-body p {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-content .birthday-letter-body p {
    opacity: 1;
    transform: translateY(0);
}

.reveal-content .birthday-letter-body p:nth-child(1) { transition-delay: 0.1s; }
.reveal-content .birthday-letter-body p:nth-child(2) { transition-delay: 0.25s; }
.reveal-content .birthday-letter-body p:nth-child(3) { transition-delay: 0.4s; }
.reveal-content .birthday-letter-body p:nth-child(4) { transition-delay: 0.55s; }
.reveal-content .birthday-letter-body p:nth-child(5) { transition-delay: 0.7s; }
.reveal-content .birthday-letter-body p:nth-child(6) { transition-delay: 0.85s; }
.reveal-content .birthday-letter-body p:nth-child(7) { transition-delay: 1.0s; }
.reveal-content .birthday-letter-body p:nth-child(8) { transition-delay: 1.15s; }
.reveal-content .birthday-letter-body p:nth-child(9) { transition-delay: 1.3s; }
.reveal-content .birthday-letter-body p:nth-child(10) { transition-delay: 1.45s; }


/* ================================================================
   9. BOTÓN PREMIUM DE ACCIÓN
================================================================ */
.modal-action-bar {
    display: flex;
    justify-content: center;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(102, 187, 106, 0.15);
    margin-top: 2rem;
}

.btn-premium-close {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 36px;
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-premium-close::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--accent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-premium-close span,
.btn-premium-close>* {
    position: relative;
    z-index: 1;
}

.btn-premium-close:hover {
    color: var(--bg-deep);
    box-shadow: 0 0 25px var(--accent-glow);
    transform: translateY(-2px);
}

.btn-premium-close:hover::before {
    opacity: 1;
}

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

/* ── Flip Card Stagger Entrance ── */
.flip-card {
    opacity: 0;
    animation: cardReveal 0.5s ease forwards;
}

/* Each card gets its delay set inline via JS */

/* Logo color plano con glow (gradient-clip no es confiable entre browsers) */
.logo-netflix {
    color: var(--accent);
    text-shadow: 0 0 25px var(--accent-glow);
    transition: text-shadow 0.3s ease;
}

.logo-netflix:hover {
    text-shadow: 0 0 50px var(--accent-glow), 0 0 100px rgba(102, 187, 106, 0.3);
}

/* ── Avatar profile hover ring ── */
.profile:hover .avatar-wrapper {
    box-shadow: 0 0 0 3px var(--accent), 0 0 30px var(--accent-glow);
}

/* ── Nav link active glow ── */
.nav-links a.active {
    text-shadow: 0 0 12px var(--accent-glow);
}

/* ── Btn hover lift ── */
.btn-play:hover {
    transform: translateY(-3px) scale(1.02);
}

.btn-more:hover {
    transform: translateY(-3px) scale(1.02);
}

/* Movie card shimmer al hover (via background-position, no transform) */
.movie-card {
    position: relative;
    overflow: hidden;
}

.movie-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 20%, rgba(255, 255, 255, 0.08) 50%, transparent 80%);
    background-size: 200% 100%;
    background-position: -200% center;
    border-radius: inherit;
    transition: background-position 0.7s ease;
}

.movie-card:hover::after {
    background-position: 200% center;
}

/* ── Premium close button pulse on first render ── */
.btn-premium-close {
    animation: glowPulse 4s ease infinite;
}

/* ================================================================
   10. FOOTER
================================================================ */
.netflix-footer {
    text-align: center;
    color: var(--grey);
    padding: 2.5rem 1rem;
    font-size: 0.82rem;
    letter-spacing: 1px;
}

/* ================================================================
   11. RESPONSIVE MÓVIL
================================================================ */
@media (max-width: 768px) {
    .gate-header {
        padding: 1.5rem 1.5rem;
        text-align: center;
    }

    .profile-title {
        font-size: 1.4rem;
    }

    .navbar {
        padding: 0.9rem 1.5rem;
        background: rgba(6, 16, 10, 0.97);
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
        flex-wrap: wrap;
        gap: 8px;
    }

    .nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        width: 100%;
    }

    .nav-links {
        flex-direction: row;
        gap: 1.2rem;
        overflow-x: auto;
        white-space: nowrap;
        width: 100%;
        padding-bottom: 6px;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }

    .nav-right {
        display: none;
    }

    .billboard {
        height: 82vh;
        min-height: 520px;
    }

    .billboard-layer {
        padding: 0 1.5rem;
        align-items: flex-end;
        padding-bottom: 4.5rem;
        justify-content: center;
        text-align: center;
    }

    .billboard-content {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .title-logo {
        font-size: 2.6rem;
    }

    .synopsis {
        font-size: 0.9rem;
    }

    .tags {
        justify-content: center;
        flex-wrap: wrap;
        font-size: 0.82rem;
    }

    .billboard-buttons {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 0.7rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        font-size: 0.92rem;
    }

    .btn-skip-intro {
        bottom: 12px;
        right: 12px;
        font-size: 0.78rem;
        padding: 7px 14px;
    }

    .sliders-container {
        margin-top: -60px;
        padding: 0 0 2.5rem 1.5rem;
    }

    .movie-card {
        min-width: 140px;
        height: 100px;
        cursor: pointer;
    }
    .movie-card:hover {
        transform: scale(1.05);
        opacity: 0.9;
    }

    .flip-card {
        min-width: 150px;
        height: 170px;
    }

    .reward-box {
        padding: 2rem 1.5rem;
        width: 92%;
        text-align: center;
    }

    .magic-title {
        font-size: 2.3rem;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .time-box span {
        font-size: 1.9rem;
    }

    .time-box {
        min-width: 65px;
        padding: 12px 14px;
    }
}

/* ================================================================
   LIGHTBOX — MODAL DE FOTO AMPLIADA
================================================================ */
.photo-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    animation: modalFadeIn 0.3s ease forwards;
    cursor: zoom-out;
}

.photo-modal-overlay.hidden {
    display: none !important;
}

.photo-modal-overlay.photo-closing {
    animation: modalFadeOut 0.35s ease forwards;
}

@keyframes modalFadeOut {
    from { opacity: 1; backdrop-filter: blur(14px); }
    to   { opacity: 0; backdrop-filter: blur(0px); }
}

.photo-lightbox-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.photo-enlarged {
    max-width: 92vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow:
        0 0 0 1px rgba(102, 187, 106, 0.2),
        0 30px 80px rgba(0, 0, 0, 0.8),
        0 0 60px rgba(102, 187, 106, 0.08);
    transform: scale(0.88) translateY(20px);
    opacity: 0;
    transition:
        transform 0.45s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        opacity 0.35s ease;
    user-select: none;
    -webkit-user-drag: none;
}

.photo-enlarged.photo-visible {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.photo-close-btn {
    position: fixed;
    top: 20px;
    right: 24px;
    z-index: 10001;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
}

.photo-close-btn:hover {
    background: rgba(102, 187, 106, 0.3);
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1) rotate(90deg);
}

.photo-hint {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 500;
    pointer-events: none;
    user-select: none;
}

/* ================================================================
   12. CARTA DE CUMPLEAÑOS (aparece al expirar el contador)
================================================================ */
@keyframes letterReveal {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes floatHeart {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-8px) scale(1.05); }
}

.birthday-letter-wrapper {
    background: linear-gradient(160deg, #fffdf7, #f5f0e0);
    border-radius: 14px;
    padding: 3rem 3.5rem;
    margin-top: 1.8rem;
    border: 2px solid rgba(102, 187, 106, 0.3);
    box-shadow:
        0 0 60px rgba(102, 187, 106, 0.1),
        0 30px 80px rgba(0, 0, 0, 0.4),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    text-align: left;
    animation: letterReveal 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    position: relative;
    overflow: hidden;
}

/* Decoración de papel líneas */
.birthday-letter-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(
        transparent,
        transparent 27px,
        rgba(102, 187, 106, 0.07) 27px,
        rgba(102, 187, 106, 0.07) 28px
    );
    pointer-events: none;
    border-radius: inherit;
}

/* Línea vertical decorativa izquierda */
.birthday-letter-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 3.5rem;
    width: 1px;
    height: 100%;
    background: rgba(220, 100, 100, 0.18);
    pointer-events: none;
}

.birthday-letter-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px dashed rgba(45, 90, 48, 0.25);
    position: relative;
    z-index: 1;
}

.birthday-letter-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.8rem;
    animation: floatHeart 3s ease-in-out infinite;
}

.birthday-letter-title {
    font-family: 'Dancing Script', cursive;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: #1a5c1e;
    margin-bottom: 0.5rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(26, 92, 30, 0.15);
}

.birthday-letter-subtitle {
    font-family: 'Lora', serif;
    font-size: 0.95rem;
    color: #4a7a4e;
    font-style: italic;
    opacity: 0.85;
}

.birthday-letter-body {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    line-height: 2;
    color: #1c2e1e;
    position: relative;
    z-index: 1;
}

.birthday-letter-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

.birthday-letter-body p:first-child {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4rem;
    color: #2d5a30;
    font-weight: 600;
    text-align: left;
    margin-bottom: 1.8rem;
}

.birthday-letter-body em {
    color: #2d5a30;
    font-style: italic;
    font-weight: 600;
}

.birthday-letter-closing {
    font-family: 'Dancing Script', cursive !important;
    font-size: 1.35rem !important;
    color: #1a5c1e !important;
    text-align: center !important;
    font-weight: 600;
    margin-top: 2.5rem !important;
    padding: 1.5rem;
    background: rgba(102, 187, 106, 0.06);
    border-radius: 10px;
    border: 1px solid rgba(102, 187, 106, 0.18);
}

.birthday-letter-signature {
    font-family: 'Dancing Script', cursive !important;
    font-size: 1.8rem !important;
    color: #2d5a30 !important;
    text-align: right !important;
    font-weight: 700;
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
    text-shadow: 0 0 15px rgba(45, 90, 48, 0.2);
}

/* Responsive para carta */
@media (max-width: 768px) {
    .birthday-letter-wrapper {
        padding: 2rem 1.5rem;
        margin-top: 1.2rem;
    }

    .birthday-letter-wrapper::after {
        left: 1.5rem;
    }

    .birthday-letter-body {
        font-size: 0.95rem;
        line-height: 1.85;
    }

    .birthday-letter-body p:first-child {
        font-size: 1.2rem;
    }

    .birthday-letter-closing {
        font-size: 1.15rem !important;
    }

    .birthday-letter-signature {
        font-size: 1.5rem !important;
    }
}