/* =========================================================
   ENPORRADOS 2.0
   Identidad visual común
   ========================================================= */


/* ---------------------------------------------------------
   1. Variables
   --------------------------------------------------------- */

:root {
    --enp-bg: #f3f0e9;
    --enp-surface: #ffffff;
    --enp-surface-soft: #f8f6f1;

    --enp-text: #1f252b;
    --enp-text-soft: #687078;
    --enp-text-faint: #90979e;

    --enp-border: #ded9cf;

    --enp-primary: #7d3527;
    --enp-primary-dark: #642a20;
    --enp-primary-soft: #f4e8e3;

    --enp-gold: #b48435;
    --enp-gold-soft: #f7f0df;

    --enp-green: #426956;
    --enp-green-soft: #e8f0eb;

    --enp-blue: #48657d;
    --enp-blue-soft: #eaf0f4;

    --enp-purple: #68547a;
    --enp-purple-soft: #eee9f2;

    --enp-radius-sm: 10px;
    --enp-radius-md: 16px;
    --enp-radius-lg: 22px;

    --enp-shadow:
        0 1px 2px rgba(30, 25, 20, 0.04),
        0 10px 28px rgba(30, 25, 20, 0.06);

    --enp-shell-width: 820px;
}


/* ---------------------------------------------------------
   2. Base
   --------------------------------------------------------- */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--enp-bg);
}

body.enp-page {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(
            180deg,
            #f8f5ef 0,
            var(--enp-bg) 260px
        );
    color: var(--enp-text);
    font-family:
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
}


/* ---------------------------------------------------------
   3. Estructura
   --------------------------------------------------------- */

.enp-shell {
    width: min(
        calc(100% - 32px),
        var(--enp-shell-width)
    );
    margin: 0 auto;
    padding: 32px 0 40px;
}


/* ---------------------------------------------------------
   4. Hero / identidad
   --------------------------------------------------------- */

.enp-hero {
    margin-bottom: 32px;
}

.enp-kicker {
    display: block;
    margin-bottom: 8px;
    color: var(--enp-primary);
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.enp-hero h1 {
    margin: 0;
    color: var(--enp-text);
    font-size: clamp(2.25rem, 8vw, 3.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.enp-welcome {
    margin: 16px 0 0;
    color: var(--enp-text-soft);
    font-size: 1rem;
}

.enp-welcome strong {
    color: var(--enp-text);
}

.enp-nie {
    display: inline-flex;
    margin-top: 9px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--enp-primary-soft);
    color: var(--enp-primary);
    font-size: 0.72rem;
    font-weight: 800;
}


/* ---------------------------------------------------------
   5. Secciones
   --------------------------------------------------------- */

.enp-section__heading {
    margin-bottom: 14px;
}

.enp-section__heading h2 {
    margin: 0;
    font-size: 1.15rem;
}

.enp-section__heading p {
    margin: 4px 0 0;
    color: var(--enp-text-soft);
    font-size: 0.9rem;
}


/* ---------------------------------------------------------
   6. Navegación principal
   --------------------------------------------------------- */

.enp-main-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.enp-nav-card {
    display: block;
    min-height: 164px;
    padding: 18px;
    border: 1px solid var(--enp-border);
    border-top: 4px solid var(--enp-primary);
    border-radius: var(--enp-radius-md);
    background: var(--enp-surface);
    box-shadow: var(--enp-shadow);
    color: var(--enp-text);
    text-decoration: none;
    transition:
        transform 110ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease;
}

.enp-nav-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 2px 4px rgba(30, 25, 20, 0.05),
        0 14px 32px rgba(30, 25, 20, 0.08);
}

.enp-nav-card:active {
    transform: translateY(1px);
}

.enp-nav-card__eyebrow {
    display: block;
    margin-bottom: 8px;
    color: var(--enp-text-soft);
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.065em;
    text-transform: uppercase;
}

.enp-nav-card strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.15;
}

.enp-nav-card p {
    margin: 9px 0 0;
    color: var(--enp-text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}


/* ---------------------------------------------------------
   7. Identidad funcional de secciones
   --------------------------------------------------------- */

.enp-nav-card--competitions {
    border-top-color: var(--enp-primary);
}

.enp-nav-card--stats {
    border-top-color: var(--enp-gold);
}

.enp-nav-card--history {
    border-top-color: var(--enp-green);
}

.enp-nav-card--profile {
    border-top-color: var(--enp-blue);
}


/* ---------------------------------------------------------
   8. Zona admin dentro del Hall
   --------------------------------------------------------- */

.enp-admin-zone {
    margin-top: 34px;
    padding: 18px;
    border: 1px dashed #c8cdd2;
    border-radius: var(--enp-radius-md);
    background: rgba(255, 255, 255, 0.55);
}

.enp-admin-zone__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.enp-admin-zone__badge {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef1f4;
    color: #687481;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.enp-admin-zone__heading h2 {
    margin: 0;
    font-size: 1rem;
}

.enp-admin-zone__heading p {
    margin: 3px 0 0;
    color: var(--enp-text-soft);
    font-size: 0.82rem;
}

.enp-admin-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.enp-admin-link {
    display: block;
    padding: 12px 14px;
    border: 1px solid #d9dee3;
    border-radius: var(--enp-radius-sm);
    background: #ffffff;
    text-decoration: none;
}

.enp-admin-link span,
.enp-admin-link strong {
    display: block;
}

.enp-admin-link span {
    margin-bottom: 2px;
    color: #7a838c;
    font-size: 0.7rem;
    font-weight: 750;
}

.enp-admin-link strong {
    color: #44515d;
    font-size: 0.88rem;
}

.enp-admin-link:hover {
    border-color: #b9c1c9;
}


/* ---------------------------------------------------------
   9. Footer
   --------------------------------------------------------- */

.enp-footer {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid var(--enp-border);
    text-align: center;
}

.enp-footer a {
    color: var(--enp-text-soft);
    font-size: 0.86rem;
    font-weight: 650;
    text-decoration: none;
}

.enp-footer a:hover {
    color: var(--enp-primary);
}


/* ---------------------------------------------------------
   10. Responsive
   --------------------------------------------------------- */

@media (max-width: 620px) {

    .enp-shell {
        width: min(
            calc(100% - 24px),
            var(--enp-shell-width)
        );
        padding-top: 24px;
    }

    .enp-hero {
        margin-bottom: 28px;
    }

    .enp-main-nav {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .enp-nav-card {
        min-height: 0;
        padding: 16px;
    }

    .enp-nav-card p {
        margin-top: 6px;
    }

    .enp-admin-zone {
        margin-top: 28px;
        padding: 14px;
    }

    .enp-admin-zone__heading {
        display: block;
    }

    .enp-admin-zone__badge {
        margin-bottom: 8px;
    }

    .enp-admin-links {
        grid-template-columns: 1fr;
    }
}


/* ---------------------------------------------------------
   11. Movimiento reducido
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================
   12. PÁGINAS EN ESPERA
   ========================================================= */

.enp-wait-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.enp-wait {
    flex: 1;
    display: flex;
    max-width: 620px;
    flex-direction: column;
    justify-content: center;
    padding: 48px 0 64px;
}

.enp-wait__eyebrow {
    display: inline-block;
    width: fit-content;
    margin-bottom: 14px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--enp-primary-soft);
    color: var(--enp-primary);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.enp-wait h1 {
    margin: 0;
    color: var(--enp-text);
    font-size: clamp(2.7rem, 10vw, 4.8rem);
    line-height: 0.95;
    letter-spacing: -0.06em;
}

.enp-wait__message {
    max-width: 520px;
    margin: 22px 0 0;
    color: var(--enp-text);
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
}

.enp-wait__note {
    max-width: 470px;
    margin: 9px 0 0;
    color: var(--enp-text-soft);
    font-size: 0.92rem;
}

.enp-wait__back {
    display: inline-flex;
    width: fit-content;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    margin-top: 28px;
    padding: 10px 16px;
    border-radius: var(--enp-radius-sm);
    background: var(--enp-primary);
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    transition:
        background-color 140ms ease,
        transform 100ms ease;
}

.enp-wait__back:hover {
    background: var(--enp-primary-dark);
}

.enp-wait__back:active {
    transform: translateY(1px);
}


/* ---------------------------------------------------------
   Móvil
   --------------------------------------------------------- */

@media (max-width: 620px) {

    .enp-wait {
        padding: 34px 4px 50px;
    }

    .enp-wait__back {
        width: 100%;
        margin-top: 24px;
    }
}

/* =========================================================
   13. ZONA DE JUEGO · ELECCIÓN DE COMPETICIÓN
   ========================================================= */


/* ---------------------------------------------------------
   Cabecera
   --------------------------------------------------------- */

.enp-play-header {
    margin-bottom: 24px;
}

.enp-play-header h1 {
    margin: 0;
    color: var(--enp-text);
    font-size: clamp(2.35rem, 8vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.enp-play-header > p {
    max-width: 560px;
    margin: 14px 0 0;
    color: var(--enp-text-soft);
    font-size: 1rem;
}

.enp-play-user {
    display: inline-flex;
    margin-top: 11px;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--enp-primary-soft);
    color: var(--enp-primary);
    font-size: 0.72rem;
    font-weight: 800;
}


/* ---------------------------------------------------------
   Competiciones
   --------------------------------------------------------- */

.enp-play-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.enp-game-card {
    position: relative;
    display: flex;
    min-height: 270px;
    flex-direction: column;
    padding: 20px;
    overflow: hidden;
    border: 1px solid var(--enp-border);
    border-top: 5px solid var(--enp-primary);
    border-radius: var(--enp-radius-lg);
    background: var(--enp-surface);
    box-shadow: var(--enp-shadow);
    color: var(--enp-text);
    text-decoration: none;
    transition:
        transform 110ms ease,
        box-shadow 150ms ease,
        border-color 150ms ease;
}

.enp-game-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 3px 7px rgba(30, 25, 20, 0.05),
        0 16px 38px rgba(30, 25, 20, 0.09);
}

.enp-game-card:active {
    transform: translateY(1px);
}


/* ---------------------------------------------------------
   Código
   --------------------------------------------------------- */

.enp-game-card__code {
    display: inline-flex;
    width: fit-content;
    min-height: 28px;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}


/* ---------------------------------------------------------
   Contenido
   --------------------------------------------------------- */

.enp-game-card__body {
    margin-top: auto;
    padding-top: 36px;
}

.enp-game-card__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--enp-text-soft);
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.enp-game-card h2 {
    margin: 0;
    font-size: 1.55rem;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.enp-game-card p {
    margin: 9px 0 0;
    color: var(--enp-text-soft);
    font-size: 0.88rem;
    line-height: 1.45;
}

.enp-game-card__action {
    display: block;
    margin-top: 22px;
    font-size: 0.82rem;
    font-weight: 850;
}


/* ---------------------------------------------------------
   El Porrón
   --------------------------------------------------------- */

.enp-game-card--porron {
    border-top-color: #c8771b;
}

.enp-game-card--porron .enp-game-card__code {
    background: #fff2df;
    color: #9a4f08;
}

.enp-game-card--porron .enp-game-card__action {
    color: #9a4f08;
}


/* ---------------------------------------------------------
   Copa de Balón
   --------------------------------------------------------- */

.enp-game-card--cb {
    border-top-color: #6e56cf;
}

.enp-game-card--cb .enp-game-card__code {
    background: #eeeafe;
    color: #6047b5;
}

.enp-game-card--cb .enp-game-card__action {
    color: #6047b5;
}


/* ---------------------------------------------------------
   Footer dividido
   --------------------------------------------------------- */

.enp-footer--split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}


/* ---------------------------------------------------------
   Móvil
   --------------------------------------------------------- */

@media (max-width: 620px) {

    .enp-play-header {
        margin-bottom: 20px;
    }

    .enp-play-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .enp-game-card {
        min-height: 190px;
        padding: 17px;
    }

    .enp-game-card__body {
        padding-top: 26px;
    }

    .enp-game-card__action {
        margin-top: 16px;
    }

    .enp-footer--split {
        flex-direction: column;
        gap: 10px;
    }
}