/* --- Importación de Fuentes --- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@300;400&display=swap');

/* --- Variables de Color --- */
/* TEMA OSCURO (POR DEFECTO) */
:root {
    --gold-color: #FFD700;
    --dark-background: #121212;
    --card-background: #1E1E1E;
    --text-color: #E0E0E0;
    --header-font: 'Cinzel', serif;
    --body-font: 'Lato', sans-serif;
    --shadow-color: rgba(255, 215, 0, 0.6); /* Sombra para el modo oscuro */
}

/* NUEVO: TEMA CLARO */
body.light-theme {
    --gold-color: #b8860b; /* Un oro más oscuro para mejor contraste */
    --dark-background: #f4f4f9; /* Un fondo blanco-grisáceo suave */
    --card-background: #ffffff; /* Tarjetas blancas */
    --text-color: #2c2c2c; /* Texto oscuro */
    --shadow-color: rgba(0, 0, 0, 0.2); /* Sombra para el modo claro */
}

/* --- Estilos Generales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    background-color: var(--dark-background);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* --- Encabezado Principal (Futurista) --- */
.main-header {
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 50%, #000000 100%);
    padding: 6rem 1rem;
    text-align: center;
    border-bottom: 3px solid var(--gold-color);
    position: relative;
    overflow: hidden;
    transition: border-color 0.3s ease, background 0.3s ease;
}
body.light-theme .main-header {
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 50%, #ffffff 100%);
}

.main-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, transparent, var(--gold-color), transparent);
    filter: blur(4px);
    opacity: 0.7;
    transition: background 0.3s ease;
}

.main-header h1 {
    font-family: var(--header-font);
    font-size: 5rem;
    color: var(--gold-color);
    text-shadow: 
        0 0 10px var(--shadow-color),
        0 0 20px var(--shadow-color),
        0 0 30px var(--shadow-color);
    letter-spacing: 5px;
    line-height: 1;
    margin-bottom: 1rem;
    transition: all 0.5s ease;
}
body.light-theme .main-header h1 {
    text-shadow: 2px 2px 4px var(--shadow-color);
}

.main-header h1:hover {
    transform: scale(1.02);
}

.main-header p {
    font-family: var(--body-font);
    font-size: 1.5rem;
    color: #b0b0b0;
    font-style: normal;
    letter-spacing: 2px;
    margin-top: 0.5rem;
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}
body.light-theme .main-header p {
    color: #555;
}

.main-header p::after {
    content: '';
    display: block;
    width: 50px;
    height: 1px;
    background-color: var(--gold-color);
    margin: 1rem auto 0 auto;
    opacity: 0.7;
    transition: background-color 0.3s ease;
}

/* --- Barra de Navegación --- */
.main-nav {
    background-color: var(--card-background);
    padding: 1rem;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}
body.light-theme .main-nav {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.main-nav a {
    color: var(--gold-color);
    text-decoration: none;
    font-family: var(--header-font);
    margin: 0 1.5rem;
    font-size: 1.1rem;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}
.main-nav a:hover {
    color: #FFF;
    text-shadow: 0 0 10px var(--gold-color);
}
body.light-theme .main-nav a:hover {
    color: #000;
}

/* --- Secciones de Contenido --- */
.content-section {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    border-bottom: 1px solid #333;
}
body.light-theme .content-section {
    border-bottom: 1px solid #ddd;
}

.content-section h2 {
    font-family: var(--header-font);
    font-size: 2.5rem;
    color: var(--gold-color);
    text-align: center;
    margin-bottom: 1rem;
}

.section-intro {
    text-align: center;
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
    color: #ccc;
}
body.light-theme .section-intro {
    color: #666;
}

/* --- Contenedor de Premios (Lobby) --- */
.awards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.award-card {
    background-color: var(--card-background);
    padding: 2rem;
    border: 1px solid var(--gold-color);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}
body.light-theme .award-card {
     box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.award-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}
body.light-theme .award-card:hover {
     box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.award-card h3 {
    font-family: var(--header-font);
    color: var(--gold-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.award-card h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: #ddd;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
    text-align: center;
}
body.light-theme .award-card h4 {
    color: #333;
    border-bottom: 1px solid #eee;
}

.award-card ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.award-card ul li {
    padding: 0.5rem 0;
    text-align: center;
    color: var(--gold-color);
    font-family: var(--header-font);
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    transition: all 0.2s ease;
}
body.light-theme .award-card ul li {
    text-shadow: none;
}

.award-card ul li:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px var(--gold-color);
}
body.light-theme .award-card ul li:hover {
    text-shadow: 0 0 5px rgba(184, 134, 11, 0.5);
}

/* --- Botones --- */
button, .cta-button {
    display: block;
    width: fit-content;
    margin: 2rem auto 0 auto;
    padding: 1rem 2.5rem;
    background-color: var(--gold-color);
    color: var(--dark-background);
    font-family: var(--header-font);
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
body.light-theme .cta-button {
    color: var(--dark-background);
}

button:hover, .cta-button:hover {
    background-color: #fff;
    transform: scale(1.05);
}
body.light-theme button:hover, body.light-theme .cta-button:hover {
    background-color: #333;
    color: #fff;
}

/* --- Pie de Página --- */
.main-footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--card-background);
    margin-top: 2rem;
    border-top: 1px solid #333;
    transition: all 0.3s ease;
}
body.light-theme .main-footer {
    border-top: 1px solid #ddd;
}


/* --- ESTILOS MEJORADOS PARA VOTACIONES --- */
#voting-form fieldset {
    background-color: transparent;
    border: none;
    padding: 0;
    margin-bottom: 3rem;
}

#voting-form legend {
    display: block;
    width: fit-content;
    margin: 2rem auto;
    padding: 0.5rem 2rem;
    text-align: center;
    font-size: 1.8rem;
    position: relative;
    color: var(--gold-color);
    font-family: var(--header-font);
    border: 2px solid rgba(184, 134, 11, 0.3);
    border-radius: 50px;
    background-color: rgba(184, 134, 11, 0.05);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.2);
    transition: all 0.3s ease;
}
body.light-theme #voting-form legend {
    border: 2px solid rgba(184, 134, 11, 0.3);
    background-color: rgba(184, 134, 11, 0.05);
    box-shadow: 0 0 15px rgba(184, 134, 11, 0.2);
}

.nominee-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}
.nominee-wrapper {
    flex: 1 1 180px;
    min-width: 180px;
    display: flex;
}
.nominee-wrapper input[type="radio"] {
    display: none;
}
.nominee-card {
    background-color: var(--card-background);
    border: 2px solid #444;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    width: 100%;
    display: flex; /* Asegura que el contenido interno de la tarjeta pueda ser flex */
    flex-direction: column; /* Apila el avatar y el nombre */
    align-items: center; /* Centra el contenido horizontalmente */
    justify-content: center; /* Centra el contenido verticalmente */
}
body.light-theme .nominee-card {
    border: 2px solid #ddd;
}

.nominee-card:hover {
    transform: translateY(-8px);
    border-color: var(--gold-color);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}
body.light-theme .nominee-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Estilos para AVATAR individual */
.nominee-avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem auto;
    font-size: 3rem;
    line-height: 80px; /* Centra el emoji 👤 verticalmente */
    text-align: center; /* Centra el emoji 👤 horizontalmente */
    filter: grayscale(80%);
    transition: all 0.3s ease-in-out;
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--dark-background); /* Color de fondo por si la imagen no carga */
    display: flex; /* Para centrar imágenes dentro del div */
    justify-content: center;
    align-items: center;
}

.nominee-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Asegura que la imagen llene el espacio sin deformarse */
}

/* NUEVO: Estilos para AVATARES de PAREJA */
.nominee-pair-avatars {
    display: flex;
    justify-content: center; /* Centra las dos imágenes de pareja */
    align-items: center;
    margin: 0 auto 1rem auto;
    width: 120px; /* Ancho total para los dos avatares */
    height: 80px; /* Altura para los dos avatares */
    position: relative;
    filter: grayscale(80%);
    transition: all 0.3s ease-in-out;
}

.nominee-pair-avatars .avatar-half {
    width: 60px; /* La mitad del ancho del contenedor */
    height: 60px; /* Un poco más pequeños que el avatar individual */
    border-radius: 50%;
    overflow: hidden;
    background-color: var(--dark-background);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem; /* Tamaño del emoji en la mitad */
    position: absolute; /* Para solapar */
    border: 2px solid var(--card-background); /* Borde para separación */
    box-shadow: 0 0 5px rgba(0,0,0,0.3);
}

.nominee-pair-avatars .avatar-half:first-child {
    left: 0;
    z-index: 2; /* Para que el primero quede por encima */
}

.nominee-pair-avatars .avatar-half:last-child {
    right: 0;
    z-index: 1; /* Para que el segundo quede detrás */
}

.nominee-pair-avatars .avatar-half img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nominee-name {
    font-family: var(--header-font);
    font-size: 1.1rem;
    color: var(--text-color);
    font-weight: bold;
}

/* Efecto al seleccionar (aplicado al contenedor de la tarjeta) */
.nominee-wrapper input[type="radio"]:checked + .nominee-card .nominee-avatar {
    filter: grayscale(0%);
    transform: scale(1.1);
    box-shadow: 0 0 15px var(--gold-color); /* Mantenemos el brillo para avatares individuales */
}
.nominee-wrapper input[type="radio"]:checked + .nominee-card .nominee-pair-avatars {
    filter: grayscale(0%);
    transform: scale(1.1);
    /* Quitamos el brillo del contenedor de la pareja */
}

/* NUEVO: Aplicamos el brillo a cada mitad de la pareja individualmente */
.nominee-wrapper input[type="radio"]:checked + .nominee-card .nominee-pair-avatars .avatar-half {
    box-shadow: 0 0 15px var(--gold-color);
}

.nominee-wrapper input[type="radio"]:checked + .nominee-card {
    background-color: #2a2a2a;
    border-color: var(--gold-color);
    transform: translateY(-5px) scale(1.03);
    /* Ya no hay brillo en la tarjeta entera */
}
body.light-theme .nominee-wrapper input[type="radio"]:checked + .nominee-card {
    background-color: #fff;
    border-color: var(--gold-color);
    box-shadow: 0 0 20px rgba(184, 134, 11, 0.5);
}

/* --- ESTILOS PARA LA VENTANA MODAL --- */
.modal-overlay {
    display: none; 
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}
.modal-content {
    background-color: var(--card-background);
    margin: auto;
    padding: 30px;
    border: 2px solid var(--gold-color);
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0,0,0, 0.5);
    animation: slide-up 0.4s ease-out;
}
body.light-theme .modal-content {
     box-shadow: 0 5px 30px rgba(0,0,0, 0.2);
}

@keyframes slide-up {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    transition: color 0.3s ease;
}
.modal-close:hover,
.modal-close:focus {
    color: var(--gold-color);
    text-decoration: none;
    cursor: pointer;
}
#lobby .award-card {
    cursor: pointer;
}
#modal-body h3 { font-size: 2rem; text-align: center; color: var(--gold-color); font-family: var(--header-font); }
#modal-body p { margin-top: 1rem; font-size: 1.1rem; text-align: center; }
#modal-body h4 { margin-top: 1.5rem; text-align: center; color: var(--gold-color); border-bottom: 1px solid var(--gold-color); padding-bottom: 0.5rem;}
#modal-body ul { list-style: none; padding-left: 0; margin-top: 1rem; }
#modal-body ul li { 
    padding: 0.5rem 0; 
    font-size: 1.2rem; 
    text-align: center; 
    color: var(--gold-color); 
    font-family: var(--header-font); 
    letter-spacing: 1px;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
    transition: all 0.2s ease;
}
body.light-theme #modal-body ul li {
    text-shadow: none;
}
#modal-body ul li:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px var(--gold-color);
}
body.light-theme #modal-body ul li:hover {
    text-shadow: 0 0 5px rgba(184, 134, 11, 0.5);
}

/* --- BARRA DE DESPLAZAMIENTO --- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold-color) var(--dark-background);
}
::-webkit-scrollbar {
  width: 12px;
}
::-webkit-scrollbar-track {
  background: var(--dark-background);
}
::-webkit-scrollbar-thumb {
  background-color: var(--gold-color);
  border-radius: 20px;
  border: 3px solid var(--dark-background);
}

/* --- BOTÓN DE CONFIGURACIÓN Y MENÚ DE TEMA --- */
.settings-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 3000;
}

#settings-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    line-height: 1;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--card-background);
    color: var(--gold-color);
    border: 2px solid var(--gold-color);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
body.light-theme #settings-button {
     box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

#settings-button:hover {
    transform: scale(1.1) rotate(45deg);
    box-shadow: 0 0 15px var(--gold-color);
}

.settings-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 220px;
    background-color: var(--card-background);
    border: 1px solid var(--gold-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform-origin: bottom right;
}
body.light-theme .settings-menu {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.settings-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.theme-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-color);
    font-family: var(--body-font);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #555;
    transition: .4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}
input:checked + .slider {
    background-color: var(--gold-color);
}
input:focus + .slider {
    box-shadow: 0 0 1px var(--gold-color);
}
input:checked + .slider:before {
    transform: translateX(26px);
}
.slider.round {
    border-radius: 34px;
}
.slider.round:before {
    border-radius: 50%;
}

/* Media Queries */
@media (max-width: 768px) {
    .main-header { padding: 4rem 1rem; }
    .main-header h1 { font-size: 3.5rem; letter-spacing: 3px; }
    .main-header p { font-size: 1.2rem; letter-spacing: 1px; }
}
@media (max-width: 480px) {
    .main-header h1 { font-size: 2.5rem; letter-spacing: 2px; }
    .main-header p { font-size: 1rem; letter-spacing: 0.5px; }
}