/* Variables de Diseño */
:root {
    --bg-color: #090909;
    --text-color: #F5F5F5;
    --accent-aqua: #6EE7D8;
    --accent-wine: #5E1124;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --font-title: 'Cormorant Garamond', serif;
    --font-text: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-text);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden; 
    position: relative;
    scroll-behavior: smooth;
}

/* --- Menú Minimalista --- */
.menu-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.8rem;
    cursor: pointer;
    z-index: 100;
    opacity: 0;
    transition: opacity 1s ease;
}

.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: rgba(9, 9, 9, 0.95);
    backdrop-filter: blur(10px);
    z-index: 101;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem;
    transition: right 0.6s cubic-bezier(0.8, 0, 0.2, 1);
    border-left: 1px solid rgba(255,255,255,0.05);
}

.side-menu.open {
    right: 0;
}

.close-menu {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
}

.side-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.side-menu a {
    color: rgba(245, 245, 245, 0.5);
    text-decoration: none;
    font-family: var(--font-text);
    font-size: 1.1rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.side-menu a:hover {
    color: var(--text-color);
}

/* --- Fondos y Pantallas --- */
.ambient-bg {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, rgba(94, 17, 36, 0.1) 0%, var(--bg-color) 70%);
    opacity: 0;
    transition: opacity 3s ease;
    z-index: 0;
    pointer-events: none;
}

.ambient-bg.active {
    opacity: 1;
}

.screen {
    position: absolute;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 1s ease, transform 1s ease, visibility 0s linear 1s;
    z-index: 1;
}

.screen:not(.hidden-screen) {
    transition: opacity 1s ease, transform 1s ease, visibility 0s linear 0s;
}

.hidden-screen {
    opacity: 0;
    visibility: hidden; 
    pointer-events: none;
    transform: scale(1.05);
    z-index: -10; 
}

/* --- Bienvenida --- */
#hero-section { z-index: 10; }

.hero-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.title {
    font-family: var(--font-title);
    font-size: 5.5rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    opacity: 0;
    animation: fadeIn 3s ease forwards 1s;
    line-height: 1;
}

.age {
    font-family: var(--font-title);
    font-size: 4rem; 
    font-style: italic;
    color: #FFFFFF;
    opacity: 0;
    animation: fadeIn 3s ease forwards 1.7s; 
    margin-top: -0.5rem;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-family: var(--font-text);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.3em;
    color: rgba(245, 245, 245, 0.6);
    opacity: 0;
    animation: fadeIn 3s ease forwards 2.5s;
}

.quote {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-style: italic;
    color: var(--accent-aqua);
    opacity: 0;
    animation: fadeIn 3s ease forwards 3.5s;
    margin-top: 1rem;
}

.enter-btn {
    margin-top: 3rem;
    padding: 12px 40px;
    background: transparent;
    border: 1px solid rgba(245, 245, 245, 0.2);
    color: var(--text-color);
    font-family: var(--font-text);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.5s ease;
    opacity: 0;
    animation: slideUp 2s ease forwards 4.5s;
    border-radius: 50px;
}

.enter-btn:hover {
    background: var(--glass-bg);
    border-color: var(--accent-aqua);
    box-shadow: 0 0 15px rgba(110, 231, 216, 0.1);
}

/* --- Cuenta Regresiva Fija --- */
.countdown-fixed {
    position: fixed;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    gap: 2.5rem;
    z-index: 90;
    opacity: 1;
    transition: opacity 1.5s ease;
    pointer-events: none;
}

.countdown-fixed.hidden-element { opacity: 0; }

.countdown-fixed .time-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.countdown-fixed .time-number {
    font-family: var(--font-title);
    font-size: clamp(2rem, 5vw, 3.5rem); 
    font-weight: 300;
    line-height: 1;
    text-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

.countdown-fixed .time-label {
    font-family: var(--font-text);
    font-size: clamp(0.6rem, 1.5vw, 0.75rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(245, 245, 245, 0.6);
    text-shadow: 0 2px 5px rgba(0,0,0,0.8);
}

/* --- Tarjetas (Home) --- */
.cards-container {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    width: 100%;
    max-width: 900px;
    padding: 2rem;
    padding-top: 10rem;
}

.section-quote { font-family: var(--font-title); font-size: 1.8rem; font-style: italic; color: var(--text-color); }
.section-subtitle { font-family: var(--font-text); font-size: 0.9rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(245, 245, 245, 0.5); margin-bottom: 2rem; }

.cards-wrapper { display: flex; gap: 2rem; width: 100%; justify-content: center; flex-wrap: wrap; }

.glass-card {
    background: var(--glass-bg);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    width: 300px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: rgba(110, 231, 216, 0.3);
    box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.card-content { display: flex; flex-direction: column; gap: 2rem; text-align: center; }
.card-title { font-family: var(--font-title); font-size: 2.2rem; line-height: 1.2; color: var(--text-color); }
.card-action { font-family: var(--font-text); font-size: 0.85rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-aqua); }

/* --- Quiz Section --- */
.quiz-container {
    width: 100%; max-width: 600px; padding: 2rem; padding-top: 8rem; display: flex; justify-content: center;
}
.quiz-card { width: 100%; height: auto; min-height: 450px; padding: 3rem 2rem; cursor: default; position: relative; overflow: hidden; }
.quiz-card:hover { transform: none; border-color: rgba(255, 255, 255, 0.05); box-shadow: none; }
.quiz-progress { font-family: var(--font-text); font-size: 0.8rem; letter-spacing: 0.2em; color: rgba(245, 245, 245, 0.4); text-transform: uppercase; margin-bottom: 1.5rem; }
.quiz-question { font-family: var(--font-title); font-size: 2.2rem; line-height: 1.3; margin-bottom: 3rem; }
.quiz-options { display: flex; flex-direction: column; gap: 1rem; width: 100%; }

.quiz-option {
    background: transparent; border: 1px solid rgba(245, 245, 245, 0.2); color: var(--text-color);
    font-family: var(--font-text); font-size: 1rem; padding: 1rem; border-radius: 8px; cursor: pointer;
    transition: all 0.3s ease; text-align: left; display: flex; align-items: center;
}
.quiz-option::before { content: '○'; margin-right: 15px; font-size: 1.2rem; color: var(--accent-aqua); }
.quiz-option:hover { background: rgba(255, 255, 255, 0.05); border-color: var(--accent-aqua); }

/* --- Leaderboard Section --- */
.leaderboard-container { width: 100%; max-width: 500px; padding: 2rem; padding-top: 8rem; text-align: center; }
.leaderboard-card { width: 100%; height: auto; padding: 2rem; cursor: default; }
.leaderboard-card:hover { transform: none; border-color: rgba(255, 255, 255, 0.05); box-shadow: none; }

#leaderboard-list { list-style: none; padding: 0; text-align: left; }
#leaderboard-list li {
    display: flex; justify-content: space-between; align-items: center; padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); font-family: var(--font-text); font-size: 1.2rem;
}
#leaderboard-list li:last-child { border-bottom: none; }
.medal { width: 30px; display: inline-block; }
.name { flex-grow: 1; padding-left: 10px; }
.score { font-weight: 600; color: var(--accent-aqua); }

/* --- Galería (Masonry) --- */
.gallery-container { width: 100%; max-width: 1000px; padding: 2rem; padding-top: 8rem; text-align: center; }
.masonry-grid { column-count: 3; column-gap: 1.5rem; margin-top: 3rem; width: 100%; text-align: left; }
.photo-item { break-inside: avoid; margin-bottom: 1.5rem; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.05); }
.photo-item img { width: 100%; display: block; transition: transform 0.4s ease; }
.photo-item:hover img { transform: scale(1.05); }

/* Animaciones Quiz */
.slide-in-right { animation: slideInRight 0.5s forwards ease; }
.slide-out-left { animation: slideOutLeft 0.5s forwards ease; }

@keyframes slideInRight { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutLeft { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(-50px); } }
@keyframes fadeIn { from { opacity: 0; filter: blur(10px); } to { opacity: 1; filter: blur(0); } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) { .masonry-grid { column-count: 2; } }
@media (max-width: 480px) { 
    .countdown-fixed { gap: 1.5rem; }
    .quiz-question { font-size: 1.8rem; }
    .masonry-grid { column-count: 1; }
}

.shake-screen {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}