/* Variables para colores y estilos globales */
:root {
    --bg-dark: #0a0f24;
    --bg-gradient: linear-gradient(135deg, #0a0f24 0%, #1a2245 100%);
    --card-bg: rgba(28, 37, 65, 0.7);
    --card-border: rgba(91, 192, 190, 0.2);
    --text-main: #e0e6ed;
    --text-muted: #8a9bb2;
    --primary: #5bc0be;
    --primary-hover: #3a8a89;
    --secondary: #3a506b;
    --error: #ff4d4d;
    --success: #2ecc71;
}

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contenedor-principal {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.titulo-quiz {
    text-align: center;
    color: var(--primary);
    text-shadow: 0 2px 10px rgba(91, 192, 190, 0.3);
    margin-bottom: 30px;
}

/* Estilos de Tarjeta (Glassmorphism) */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--card-border);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.seccion {
    margin-bottom: 25px;
}

.seccion h3 {
    color: #fff;
    border-bottom: 2px solid var(--secondary);
    padding-bottom: 8px;
    margin-bottom: 15px;
}

.nota {
    font-size: 0.85em;
    color: var(--text-muted);
    background: rgba(0,0,0,0.2);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid var(--primary);
}

/* Entradas de formulario */
.grupo-input {
    margin-bottom: 15px;
}

.grupo-input label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, select {
    width: 100%;
    padding: 12px;
    background-color: rgba(11, 19, 43, 0.6);
    border: 1px solid var(--secondary);
    color: white;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 8px rgba(91, 192, 190, 0.4);
}

input::placeholder {
    color: #556677;
}

/* Botones */
button {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primario {
    background-color: var(--primary);
    color: var(--bg-dark);
    box-shadow: 0 4px 15px rgba(91, 192, 190, 0.3);
}

.btn-primario:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-primario:disabled {
    background-color: var(--secondary);
    color: #aaa;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-secundario {
    background-color: transparent;
    border: 2px solid var(--secondary);
    color: white;
    margin-top: 20px;
}

.btn-secundario:hover {
    background-color: var(--secondary);
}

/* Alertas */
.alerta {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.alerta-error {
    background-color: rgba(255, 77, 77, 0.15);
    border: 1px solid var(--error);
    color: #ff8080;
}

.alerta-exito {
    background-color: rgba(46, 204, 113, 0.15);
    border: 1px solid var(--success);
    color: #82e0aa;
}

/* Tabla Leaderboard */
.titulo-leaderboard {
    text-align: center;
    color: gold;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

.tabla-contenedor {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 15px;
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
}

th {
    background-color: var(--secondary);
    color: white;
    font-weight: 600;
}

td {
    background-color: rgba(11, 19, 43, 0.4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

tbody tr:hover td {
    background-color: rgba(91, 192, 190, 0.1);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
