/* =========================================================
   ESTILOS GLOBALES - BODA ELBERT & VALENTINA
   Optimizado para móvil pantalla completa
   ========================================================= */

*, *::before, *::after {
    box-sizing: border-box;
}

html, html body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================
   FONDO GENERAL
   ========================= */
body.pantalla-bienvenida,
body.pantalla-juego {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 18% 20%, rgba(40, 78, 170, 0.20), transparent 26%),
        radial-gradient(circle at 75% 80%, rgba(214, 183, 101, 0.10), transparent 22%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 30%),
        #020817;
    overflow-x: hidden;
}

/* =========================
   FONDO DECORATIVO
   ========================= */
.fondo-boda {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.halo {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
}

.halo-uno {
    width: 240px;
    height: 240px;
    top: 8%;
    left: 8%;
    background: rgba(39, 92, 220, 0.24);
}

.halo-dos {
    width: 260px;
    height: 260px;
    bottom: 10%;
    right: 8%;
    background: rgba(214, 176, 81, 0.16);
}

.halo-tres {
    width: 180px;
    height: 180px;
    top: 35%;
    right: 20%;
    background: rgba(255, 255, 255, 0.08);
}

.particulas {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255,255,255,0.10) 1px, transparent 1px),
        radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 34px 34px, 68px 68px;
    background-position: 0 0, 12px 12px;
    opacity: 0.28;
}

/* =========================
   PANTALLA BIENVENIDA
   ========================= */
.contenedor-pantalla {
    position: relative;
    z-index: 10;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 16px 12px 30px;
}

.contenedor-cristal {
    position: relative;
    z-index: 20;
    width: 100%;
    max-width: 430px;
    padding: 26px 20px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.10);
    color: #ffffff;
}

/* Tipografía bienvenida */
.insignia-fecha {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255,255,255,0.14);
    font-size: 0.85rem;
    color: rgba(255,255,255,0.90);
}

.sobre-titulo {
    margin: 0 0 8px;
    font-size: 1rem;
    color: rgba(255,255,255,0.78);
}

.titulo-principal {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #ffffff;
}

.texto-secundario {
    margin: 14px 0 24px;
    color: rgba(255,255,255,0.78);
    line-height: 1.72;
    font-size: 1.03rem;
}

.nota-inferior {
    margin-top: 10px;
    font-size: 0.88rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.62);
}

/* =========================
   FORMULARIO
   ========================= */
.formulario-bienvenida {
    display: grid;
    gap: 16px;
    width: 100%;
}

.field-group {
    display: grid;
    gap: 8px;
}

.field-label {
    display: block;
    font-size: 0.96rem;
    font-weight: 700;
    color: rgba(255,255,255,0.94);
    margin-bottom: 6px;
}

.campo-formulario,
.field-input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="file"],
textarea,
select {
    width: 100%;
    min-height: 54px;
    padding: 14px 14px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.12);
    color: #fff;
    outline: none;
    font-size: 16px;
    line-height: 1.4;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.campo-formulario::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(255,255,255,0.52);
}

.campo-formulario:focus,
.field-input:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(240, 210, 125, 0.95);
    background: rgba(255,255,255,0.15);
    box-shadow: 0 0 0 4px rgba(240, 210, 125, 0.14);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.boton-principal,
.field-button {
    display: block;
    width: 100%;
    min-height: 54px;
    padding: 15px 18px;
    border: none;
    border-radius: 18px;
    background: linear-gradient(135deg, #d7b768 0%, #f1d88e 100%);
    color: #1d1d1d;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(215, 183, 104, 0.22);
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.boton-principal:hover,
.field-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(215, 183, 104, 0.28);
    filter: brightness(1.02);
}

/* =========================
   MENSAJES
   ========================= */
.mensaje-formulario {
    min-height: 20px;
    margin: 2px 0 0;
    font-size: 0.92rem;
    font-weight: 600;
}

/* =========================
   RANKING
   ========================= */
.ranking-panel {
    width: 100%;
    max-width: 520px;
    padding: 22px;
    border-radius: 28px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 70px rgba(0,0,0,0.34);
    color: #fff;
}

.podium-grid {
    display: grid;
    grid-template-columns: 1fr 1.08fr 1fr;
    align-items: end;
    gap: 12px;
    margin-bottom: 20px;
}

.podium-card {
    border-radius: 22px;
    padding: 14px 12px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-shadow: 0 12px 30px rgba(0,0,0,0.14);
}

.podium-card.first {
    min-height: 196px;
    background: linear-gradient(180deg, rgba(228,198,111,0.24), rgba(255,255,255,0.08));
    border-color: rgba(228,198,111,0.34);
}

.podium-card.second { min-height: 176px; }
.podium-card.third { min-height: 168px; }

.podium-place {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.64);
    margin-bottom: 8px;
}

.podium-name {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
    word-break: break-word;
}

.podium-meta {
    font-size: 0.90rem;
    color: rgba(255,255,255,0.74);
    line-height: 1.5;
}

.podium-points {
    margin-top: 8px;
    font-size: 1rem;
    font-weight: 800;
    color: #f0d88f;
}

.ranking-list-title {
    margin: 0 0 12px;
    font-size: 1.02rem;
    color: rgba(255,255,255,0.90);
}

.ranking-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.ranking-item {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.10);
}

.ranking-position {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(228,198,111,0.14);
    color: #f0d88f;
    font-weight: 800;
    font-size: 0.95rem;
}

.ranking-person {
    min-width: 0;
}

.ranking-name {
    display: block;
    color: #fff;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.98rem;
}

.ranking-table {
    display: block;
    color: rgba(255,255,255,0.68);
    font-size: 0.90rem;
    margin-top: 2px;
}

.ranking-score {
    color: #fff;
    font-weight: 800;
    white-space: nowrap;
    font-size: 0.98rem;
}

.ranking-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.72);
}

/* =========================
   MEDIA QUERIES MÓ