/* --- TEMA "VIBRANT EVENT" --- */

/* 1. Importar tipografía moderna y definir paleta de colores */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

:root {
    --color-background: #1a1a2e; /* Azul noche oscuro */
    --color-surface: #16213e;    /* Azul marino oscuro para las tarjetas */
    --color-primary: #e94560;    /* Magenta vibrante */
    --color-secondary: #0f3460;  /* Azul más profundo */
    --color-text: #e0e0e0;       /* Texto blanco roto */
    --color-text-muted: #a0a0a0; /* Texto grisáceo */
    --gradient-main: linear-gradient(45deg, #f05a76, #7d6eeb);
    --font-main: 'Poppins', sans-serif;
}

/* 2. Estilos base y generales */
body {
    font-family: var(--font-main);
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 680px;
    background-color: var(--color-surface);
    border-radius: 20px;
    border: 1px solid #2a3b5e;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 20px;
    box-sizing: border-box;
}

header {
    text-align: center;
    border-bottom: 1px solid #2a3b5e;
    padding-bottom: 15px;
    margin-bottom: 25px;
}

header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

h2 {
    font-size: 1.4rem;
    text-align: center;
    color: #fff;
    margin-bottom: 20px;
}

/* 3. Estilos de las opciones de votación */
.options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.option-card {
    background-color: var(--color-secondary);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
}

.option-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.option-card input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.option-card input[type="radio"]:checked + img + p {
    color: #fff;
    font-weight: 600;
}

.option-card input[type="radio"]:checked ~ * {
    /* Efecto de selección */
}

/* Aplicar el borde con gradiente al seleccionar */
.option-card input[type="radio"]:checked {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 12px;
    border: 3px solid var(--color-primary);
    box-sizing: border-box;
    cursor: pointer;
}


.option-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.option-card p {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
}

.vote-button {
    display: block;
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    background: var(--gradient-main);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.vote-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.6);
}

/* 4. Estilos de los resultados */
.results {
    margin-top: 20px;
}

.result-item {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-thumbnail {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
    flex-shrink: 0;
}

.result-details {
    flex-grow: 1;
}

.result-info {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
}

.option-text {
    color: #fff;
}

.votes {
    color: var(--color-text-muted);
}

.progress-bar-container {
    width: 100%;
    background-color: #0f3460;
    border-radius: 20px;
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-main);
    border-radius: 20px;
    transition: width 0.5s ease-in-out;
}

.feedback {
    text-align: center;
    margin-top: 25px;
    font-size: 1rem;
    padding: 15px;
    border-radius: 8px;
    background-color: var(--color-secondary);
    color: var(--color-text);
}

/* 5. Estilos de la pantalla de ganador */
.winner-announcement {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 30px;
    border-bottom: 1px solid #2a3b5e;
}

.winner-announcement h2 {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

.winner-card {
    display: inline-block;
    background: var(--color-secondary);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 0 25px rgba(233, 69, 96, 0.3);
}

.winner-card img {
    max-width: 100%;
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
}

.winner-card h3 {
    margin: 0 0 5px 0;
    font-size: 1.6rem;
    color: #fff;
}

.winner-card p {
    margin: 0;
    font-size: 1.1rem;
    color: var(--color-text-muted);
}

/* 6. Estilos para Admin y Login (para mantener consistencia) */
.admin-container h2, .login-container h1 {
    color: #fff;
}

.admin-card {
    background-color: var(--color-surface);
    border: 1px solid #2a3b5e;
}

.admin-card label, .login-container label {
    color: var(--color-text);
    font-weight: 600;
}

.admin-card input[type="text"],
.admin-card input[type="number"],
.login-container input[type="password"] {
    background-color: #0f3460;
    border: 1px solid #2a3b5e;
    color: var(--color-text);
    padding: 12px;
}

.admin-card input[type="text"]:focus,
.admin-card input[type="number"]:focus,
.login-container input[type="password"]:focus {
    outline: none;
    border-color: var(--color-primary);
}

.admin-card fieldset {
    border: 1px dashed #2a3b5e;
}

.admin-card legend {
    color: var(--color-text-muted);
    font-weight: 600;
}

.admin-card button,
.login-container button {
    background: var(--gradient-main);
    border: none;
    font-weight: 700;
}

.login-body {
    align-items: center;
}

.login-container {
    background-color: var(--color-surface);
    border: 1px solid #2a3b5e;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logout-button {
    background-color: #2a3b5e;
    color: #fff;
}

.logout-button:hover {
    background-color: var(--color-primary);
}