/* CSS Principal - La Noche Dorada 2 */

/* ==========================================
   1. Variables y Reseteo
   ========================================== */
:root {
    --gold-primary: #D4AF37;
    --gold-light: #FFDF00;
    --gold-dark: #8A7322;
    --gold-gradient: linear-gradient(135deg, #FFDF00 0%, #D4AF37 50%, #8A7322 100%);
    --gold-gradient-hover: linear-gradient(135deg, #FFF099 0%, #FFDF00 50%, #D4AF37 100%);
    
    --bg-dark: #070708;
    --bg-card: rgba(18, 18, 20, 0.65);
    --border-glass: rgba(212, 175, 55, 0.2);
    --border-glass-active: rgba(212, 175, 55, 0.6);
    
    --text-white: #FFFFFF;
    --text-gold: #E5C158;
    --text-gray: #A0A0AB;
    
    --font-primary: 'Rajdhani', sans-serif;
    --font-accent: 'Rajdhani', sans-serif;
    
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==========================================
   2. Capas de Fondo y Efectos Atmosféricos
   ========================================== */
/* Fondo espacial */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -3;
}

/* Nebulosa dorada overlay */
.nebula-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 40%, rgba(138, 115, 34, 0.15) 0%, rgba(7, 7, 8, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

/* Polvo de estrellas */
.stars-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(1px 1px at 20px 30px, #fff, rgba(0,0,0,0)),
        radial-gradient(1px 1px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(1.5px 1.5px at 50px 160px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 80px 120px, rgba(212, 175, 55, 0.8), rgba(0,0,0,0)),
        radial-gradient(1px 1px at 150px 220px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 250px 30px, rgba(212, 175, 55, 0.5), rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 300px 300px;
    opacity: 0.4;
    z-index: -1;
    pointer-events: none;
    animation: starsRotate 240s linear infinite;
}

@keyframes starsRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================
   3. Rocas Flotantes (Diseño 3D)
   ========================================== */
.floating-rock {
    position: fixed;
    background-size: contain;
    background-repeat: no-repeat;
    z-index: -1;
    pointer-events: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.8));
    transition: transform 0.5s ease-out;
    mix-blend-mode: screen;
}

/* Rocas decorativas usando degradados simulando el poster si no hay imágenes */
.rock-left {
    top: 10%;
    left: -80px;
    width: 320px;
    height: 450px;
    background-image: url('../images/roca1.png');
    animation: floatLeft 8s ease-in-out infinite alternate;
}

.rock-right {
    top: 15%;
    right: -80px;
    width: 320px;
    height: 480px;
    background-image: url('../images/roca2.png');
    animation: floatRight 9s ease-in-out infinite alternate;
}

.rock-bottom {
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 480px;
    height: 250px;
    background-image: url('../images/roca3.png');
    background-position: bottom center;
    animation: floatBottom 7s ease-in-out infinite alternate;
}

/* Fallback de rocas usando formas abstractas y degradados dorados oscuros si la imagen no carga */
.floating-rock:not([style*="background-image"]) {
    border: 1px solid rgba(212, 175, 55, 0.05);
}
.rock-left:not([style*="background-image"]) {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
}
.rock-right:not([style*="background-image"]) {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}
.rock-bottom:not([style*="background-image"]) {
    border-radius: 50% 50% 0 0 / 40% 40% 0 0;
}

@keyframes floatLeft {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-15px) rotate(2deg); }
}

@keyframes floatRight {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(18px) rotate(-3deg); }
}

@keyframes floatBottom {
    0% { transform: translate(-50%, 0); }
    100% { transform: translate(-50%, -10px); }
}

/* ==========================================
   4. Estructura y Hero Content
   ========================================== */
.main-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    z-index: 1;
}

/* Header */
.header {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-bottom: 2rem;
}

.sponsor-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
}

.sponsor-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.3em;
    color: var(--text-gray);
    opacity: 0.8;
}

.stake-logo {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: 0.05em;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.stake-logo span {
    color: var(--gold-primary);
    font-weight: 600;
}

/* Hero Content */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: auto 0;
    width: 100%;
    max-width: 700px;
}

/* Logo de Evento */
.logo-container {
    margin-bottom: 2rem;
    perspective: 1000px;
}

.event-logo {
    max-width: 100%;
    height: auto;
    max-height: 240px;
    object-fit: contain;
    filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.25));
    animation: pulseLogo 6s ease-in-out infinite alternate;
    mix-blend-mode: screen;
}

@keyframes pulseLogo {
    0% { transform: scale(1); filter: drop-shadow(0 0 25px rgba(212, 175, 55, 0.25)); }
    100% { transform: scale(1.02); filter: drop-shadow(0 0 35px rgba(212, 175, 55, 0.4)); }
}

/* Fallback del logo estilizado */
.logo-text-fallback {
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.logo-title {
    font-family: var(--font-accent);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: 0.05em;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
}

.logo-title span {
    font-size: 4rem;
    letter-spacing: 0.1em;
}

.roman-numeral {
    font-family: var(--font-accent);
    font-size: 7.5rem;
    font-weight: 800;
    line-height: 1;
    margin-top: -10px;
    background: linear-gradient(180deg, #FFFFFF 0%, #D4AF37 40%, #8A7322 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 20px rgba(212, 175, 55, 0.2));
}

.event-details {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

.event-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-gold);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
    text-transform: uppercase;
}

.event-date {
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
}

/* ==========================================
   5. Cuenta Regresiva (Countdown)
   ========================================== */
.countdown-container {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 3rem;
    width: 100%;
}

.countdown-card {
    background: rgba(10, 10, 12, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    width: 85px;
    height: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.countdown-card::before {
    display: none;
}

.countdown-card:hover {
    border-color: rgba(212, 175, 55, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.05);
}

.countdown-card .number {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-gold);
    line-height: 1;
    z-index: 1;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.countdown-card .label {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-gray);
    letter-spacing: 0.04em;
    margin-top: 0.3rem;
    z-index: 1;
}

/* ==========================================
   6. Botones (CTA)
   ========================================== */
.cta-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    width: 100%;
}

.btn {
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: 0.08em;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #000000;
    box-shadow: 0 5px 25px rgba(212, 175, 55, 0.4);
    font-weight: 800;
}

.btn-gold:hover {
    background: var(--gold-gradient-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.6);
}

.btn-gold:active {
    transform: translateY(1px);
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transition: none;
}

.btn-gold:hover .btn-glow {
    animation: lightSweep 1.5s ease-in-out infinite;
}

@keyframes lightSweep {
    0% { left: -100%; }
    100% { left: 100%; }
}

.btn-pulse {
    animation: goldPulse 2s infinite;
}

@keyframes goldPulse {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.cta-subtitle {
    font-size: 0.8rem;
    color: var(--text-gray);
    letter-spacing: 0.05em;
}

.btn-block {
    width: 100%;
}

/* ==========================================
   7. Footer
   ========================================== */
.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.watch-live {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.2em;
    color: var(--text-gold);
}

.social-channels {
    display: flex;
    gap: 1.5rem;
}

.channel-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--text-white);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition-smooth);
}

.channel-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.channel-icon {
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.kick .channel-icon {
    background-color: #53fc18;
    color: #000000;
    font-family: Arial, sans-serif;
}

.youtube .channel-icon {
    background-color: #ff0000;
    color: #ffffff;
}

.channel-link:hover.kick {
    border-color: rgba(83, 252, 24, 0.5);
    box-shadow: 0 0 15px rgba(83, 252, 24, 0.15);
}

.channel-link:hover.youtube {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.15);
}

/* ==========================================
   8. Modal (Glassmorphism)
   ========================================== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 1rem;
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: linear-gradient(135deg, rgba(12, 12, 14, 0.95) 0%, rgba(6, 6, 8, 0.98) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    width: 100%;
    max-width: 680px;
    padding: 2rem 2.5rem;
    position: relative;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(212, 175, 55, 0.05);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    max-height: 92vh;
    overflow-y: auto;
}

.modal-backdrop.open .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--text-gray);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-gold);
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 2rem;
    text-align: center;
}

.modal-header h2 {
    font-family: var(--font-accent);
    font-size: 1.8rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.modal-header p {
    font-size: 0.85rem;
    color: var(--text-gray);
}

/* Formulario */
.form-group {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(229, 193, 88, 0.85);
}

.label-optional {
    color: var(--text-gray);
    font-size: 0.65rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

input[type="text"],
input[type="email"],
input[type="tel"] {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0.7rem 1rem;
    color: var(--text-white);
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    width: 100%;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

input:focus {
    outline: none;
    border-color: rgba(212, 175, 55, 0.5);
    background: rgba(0, 0, 0, 0.45);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.1);
}

/* Spinner de Carga */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

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

/* Estados del Formulario */
.form-status {
    padding: 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.form-status.success {
    background-color: rgba(83, 252, 24, 0.1);
    border: 1px solid rgba(83, 252, 24, 0.3);
    color: #53fc18;
}

.form-status.error {
    background-color: rgba(255, 0, 0, 0.1);
    border: 1px solid rgba(255, 0, 0, 0.3);
    color: #ff4d4d;
}

/* Vista de Éxito */
.success-view {
    text-align: center;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.success-icon-container {
    position: relative;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 4px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold-primary);
    animation: spin 1.5s linear infinite;
}

.success-icon-checkmark {
    font-size: 2.5rem;
    color: var(--gold-primary);
    font-weight: bold;
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    z-index: 1;
}

.success-view h3 {
    font-family: var(--font-accent);
    font-size: 1.6rem;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-view p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* ==========================================
   9. Media Queries (Responsividad)
   ========================================== */

/* Tablets / Escritorios Medianos */
@media (max-width: 1024px) {
    .rock-left {
        width: 200px;
        height: 280px;
        left: -50px;
    }
    
    .rock-right {
        width: 200px;
        height: 300px;
        right: -50px;
    }
    
    .rock-bottom {
        width: 320px;
        height: 180px;
        bottom: -70px;
    }
}

/* Móviles */
@media (max-width: 768px) {
    /* Ocultar rocas flotantes para optimizar espacio en móviles */
    .floating-rock {
        display: none !important;
    }
    
    .main-container {
        padding: 1.5rem 1rem;
    }
    
    .logo-title {
        font-size: 2.5rem;
    }
    
    .logo-title span {
        font-size: 2.8rem;
    }
    
    .roman-numeral {
        font-size: 5.5rem;
    }
    
    .countdown-container {
        gap: 0.6rem;
    }
    
    .countdown-card {
        width: 65px;
        height: 70px;
        border-radius: 6px;
    }
    
    .countdown-card .number {
        font-size: 1.6rem;
    }
    
    .countdown-card .label {
        font-size: 0.5rem;
        letter-spacing: 0.02em;
        margin-top: 0.2rem;
    }
    
    .btn {
        width: 100%;
        padding: 1.1rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .modal-content {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
    }
    
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .social-channels {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 300px;
    }
    
    .channel-link {
        justify-content: center;
    }
}

/* Móviles muy pequeños */
@media (max-width: 360px) {
    .countdown-card {
        width: 58px;
        height: 64px;
    }
    
    .countdown-card .number {
        font-size: 1.4rem;
    }
}
