@import url('https://fonts.googleapis.com/css2?family=Bitcount+Grid+Single:wght@100..900&family=Permanent+Marker&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Archivo+Narrow:ital,wght@0,400..700;1,400..700&family=Bitcount+Grid+Single:wght@100..900&family=Permanent+Marker&display=swap');
@import url('https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;700&display=swap');

/* ===========================
   VARIABLES
=========================== */
:root{
    --color-secundario: #57277B;
    --color-tercero: #2F0B4A;
    --color-cuarto: #293478;
}

/* ===========================
   ESTILOS GENERALES
=========================== */
body {
    margin: 0 auto;
    width: 100%; 
    min-height: 100vh;
    background: linear-gradient(to bottom right, #000000, #2F0B4A);
    font-family: 'Archivo Narrow', sans-serif;
    color: white;
    text-align: center;
    position: relative;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-size: cover;
}

/* ===========================
   AVATARES (Manteniendo estilos por compatibilidad)
=========================== */

header img.logo-principal {
    width: 11%;
    max-width: 160px;
    height: auto;
    margin: 2% auto 1%;
    display: block;
}

main.avatares {
    background-color: var(--color-tercero);
    width: 51.22%; 
    margin: 0 auto;
    padding: 4.27% 3.66%; 
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0,0,0,0.6);
}


main.avatares h2 {
    font-size: 1.375em; 
    margin-bottom: 1.83%; 
}

#avatares img {
    width: 5.49%; 
    margin: 0 0.73%; 
}

input {
    width: 80%;
    height: 4.88%;
    border: none;
    border-radius: 8px;
    background: #3c2453;
    padding: 1.22%;
    color: #fff;
    margin-top: 1.22%;
    font-size: 0.9375em;
}

/* Botón principal mejorado */
button, button#entrar {
    width: 70%;
    max-width: 260px;
    padding: 0.7rem 1rem;
    margin-top: 2.44%;
    background: linear-gradient(135deg, #ff6fa8 0%, #ff4da6 100%);
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    color: #fff;
    font-size: 1.05em;
    letter-spacing: 0.4px;
    box-shadow: 0 8px 20px rgba(255,77,166,0.18);
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

button:hover, button#entrar:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(255,77,166,0.24);
}

button:active, button#entrar:active {
    transform: translateY(0);
    box-shadow: 0 6px 12px rgba(0,0,0,0.18);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===========================
   CLASIFICACIÓN
=========================== */

nav img {
    width: 4.27%; 
    margin: 1.22%; 
}

header img {
    /* Ajustado para el trofeo */
    width: 6.5%; 
    margin-bottom: 15px;
}

header h1{
    font-size: 2.8em; 
    font-weight: 900;
    margin-bottom: 2.44%; 
    font-family: "Bitcount Grid Single", sans-serif;
}

main.clasificacion {
    margin: 0 auto;
    background-color: var(--color-tercero);
    padding: 2.44% 0; 
    border-radius: 10px;
    margin-top: 1.22%; 
    width: 75.61%; 
}

.top {
    font-size: 0.875em; 
    margin-bottom: 2.44%; 
}

.tarjetas {
    width: 58%; /* Ajustado */
    margin: 1.22% auto; 
    padding: 1.6% 2.5%; /* Ajustado */
    border-radius: 12px; /* Ajustado */
    background-color: var(--color-secundario);
    color: white;
    font-weight: bold;
    text-align: left;
    font-size: 1.1em; /* Ajustado */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease; /* Transición para el hover */
}

/* Efecto al pasar el mouse por cualquier tarjeta */
.tarjetas:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 77, 166, 0.2);
}

.tarjetas:last-child {
    border: none; /* Quitamos el borde, ya que no es top 3 */
}

.puesto {
    width: 6%; /* Ajustado */
    font-size: 1.4em; /* Puesto más grande */
    display: inline-block;
    text-align: center;
}

.nombre {
    width: 40%; /* Ajustado */
    padding-left: 3%; /* Ajustado */
    display: inline-block;
}

.puntos {
    font-size: 1.1em; /* Ajustado */
    float: right; /* Alineamos a la derecha */
}

/* Estilos de podio previamente definidos (eliminados para usar nth-child directamente) */
/* .oro, .plata, .bronce { ... } */


/* ===========================
   ESTILOS TOP 3 PULIDOS (NTH-CHILD)
=========================== */

/* 1er Puesto: Dorado (Oro) */
.tarjetas:nth-child(1) {
    background: linear-gradient(135deg, #FFD700, #DAA520); /* Degradado de Oro */
    color: #333333;
    border: 4px solid #FFF8DC; /* Borde de brillo */
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.6); /* Sombra intensa dorada */
    transform: scale(1.08); /* Destacamos más al primero */
}

/* 2do Puesto: Plateado (Plata) */
.tarjetas:nth-child(2) {
    background: linear-gradient(135deg, #CFD5E4, #A9A9A9); /* Degradado de Plata */
    color: #333333;
    border: 3px solid #E6E6FA;
    box-shadow: 0 8px 25px rgba(207, 213, 228, 0.5);
    transform: scale(1.04);
}

/* 3er Puesto: Bronce */
.tarjetas:nth-child(3) {
    background: linear-gradient(135deg, #CD7F32, #A0522D); /* Degradado de Bronce */
    color: #333333;
    border: 3px solid #FFE4C4;
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.5);
    transform: scale(1.02);
}

/* Ajuste de hover para que el top 3 mantenga su prominencia */
.tarjetas:nth-child(1):hover,
.tarjetas:nth-child(2):hover,
.tarjetas:nth-child(3):hover {
    transform: scale(1.05); 
    box-shadow: inherit; 
}


/* ===========================
   FOOTER (ambas páginas)
=========================== */
footer {
    width: 100%;
    padding: 1.46% 0; 
    font-size: 0.875em; 
    color: #FFFFFF;
    margin-top: 1.83%; 
}


@media (max-width: 390px) {
    body {
        font-size: 17px; 
    }
    header {
        padding: 4.65%; 
    }
    main.avatares, main.clasificacion, .contenedor-principal {
        width: 80%; /* Se adapta al 80% del ancho del móvil */
        padding: 4%; 
    }
    #avatares img,
    nav img,
    header img.logo-principal {
        width: 6%; 
        height: auto;
    }
    input {
        width: 70%; 
    }
    button{
        width: 30%; 
    }
    .tarjetas, .publico-container, .descripcion-tema {
        width: 80%; 
        padding: 2%; 
    }
    .botonanadir {
        width: 80%;
        padding: 2% 4%;
    }
    /* Ajuste de elementos internos en móvil */
    .puesto {
        font-size: 1.2em;
        width: 10%;
    }
    .nombre {
        font-size: 0.9em;
        width: 50%;
    }
    .puntos {
        font-size: 0.9em;
        float: none;
    }

    header h1{
        font-size: 1.8em; 
    }

}

