/* ========================================
   Polla Mundial 2026 - Premium Dark Theme
   ======================================== */

/* Google Fonts - Astones Kit */
@import url('https://fonts.googleapis.com/css2?family=Jockey+One&family=Inter:wght@400;500;600;700;800&family=Roboto+Mono:wght@500;700&display=swap');

/* CSS Variables */
:root {
    /* Paleta Astones */
    --bg-primary: #101010;
    --bg-secondary: #1B1B1D;
    --bg-card: #222327;
    --bg-surface: #2A2B2F;
    --bg-surface-alt: #353538;

    --primary: #C60000;
    --primary-hover: #FD0000;
    --primary-dark: #9C0000;
    --accent: #FD0000;
    --accent-blue: #002DC5;

    --text-primary: #F4F4F4;
    --text-secondary: #CFCFCF;
    --text-muted: #5D5D5D;
    --text-overlay: rgba(244, 244, 244, 0.36);
    --border-subtle: rgba(255, 255, 255, 0.2);

    --success: #22C55E;
    --warning: #EAB308;
    --error: #EF4444;
    --gold: #FFD700;

    --border: rgba(255, 255, 255, 0.05);
    --border-glow: rgba(198, 0, 0, 0.3);

    /* Tipografía Astones */
    --font-heading: 'Jockey One', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;

    --radius-sm: 4px;
    --radius-md: 5px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    /* Dashboard: panel de validación (9 cols × 25px + gaps + padding ≈ 320px mín.) */
    --validation-panel-width: 340px;

    /* Controles nativos (select, etc.) coherentes con tema oscuro */
    color-scheme: dark;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pie al fondo del viewport cuando el contenido es corto (sin hueco debajo) */
body > footer {
    margin-top: auto;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-card);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--accent));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-hover), #8C44ED);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #FFFFFF 0%, #A0A0A0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--warning) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 48px;
}

/* Glass Effect */
.glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: var(--primary-hover);
    box-shadow: 0 4px 15px rgba(198, 0, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    filter: grayscale(0.5);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary);
}

.btn-outline {
    background: var(--bg-surface-alt);
    color: var(--text-primary);
    border: 1px solid var(--text-muted);
}

.btn-outline:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: var(--primary);
}

.step-number {
    position: absolute;
    top: 5px;
    right: 15px;
    font-size: 110px;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--text-primary);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
    z-index: 0;
    line-height: 1;
}

.card-hover:hover .step-number {
    opacity: 0.15;
    transform: scale(1.1);
}

/* Match Card */
.match-card {
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: var(--transition);
}

.match-card:hover {
    border-color: rgba(79, 70, 229, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.match-card.completed {
    border-color: var(--success);
}

.match-card.duplicate {
    border-color: var(--error);
}

/* Fila equipos: sin min-width:0 el flex no encoge y .truncate no aplica (nombres largos) */
.match-card .flex-1 {
    min-width: 0;
}

/* Nombres de equipo: hasta 2 líneas, palabras largas o compuestas no se cortan en una sola línea */
.match-card__team-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    max-width: 100%;
    margin-bottom: 8px;
    line-height: 1.35;
    text-align: center;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* VS Badge */
.vs-badge {
    background: var(--bg-surface);
    border: 1px solid var(--primary);
    padding: 6px 12px;
    border-radius: 99px;
    font-weight: 800;
    font-size: 14px;
    color: var(--primary);
    text-shadow: none;
}

/* Flags */
.flag {
    width: 40px;
    height: 30px;
    border-radius: 4px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.flag-rounded {
    border-radius: 50%;
}

/* Inputs */
.input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3), 0 0 20px rgba(79, 70, 229, 0.2);
}

.input::placeholder {
    color: var(--text-muted);
}

/* Hide Spinners (Arrows) */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    appearance: textfield;
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
}

.input-score {
    width: 60px;
    height: 48px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 20px;
    padding: 0;
}

.input-confidence {
    width: 80px;
    height: 48px;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px;
    padding: 0;
}

/* Validation States */
.input-valid {
    border-color: var(--success) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.input-error {
    border-color: var(--error) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: var(--bg-surface);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px rgba(198, 0, 0, 0.4);
}

/* Badge / Chip */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--bg-surface);
    color: var(--text-secondary);
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-error {
    background: var(--error);
    color: white;
}

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
    }

    50% {
        box-shadow: 0 0 40px rgba(79, 70, 229, 0.8);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

.animate-fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

.stagger-1 {
    animation-delay: 100ms;
}

.stagger-2 {
    animation-delay: 200ms;
}

.stagger-3 {
    animation-delay: 300ms;
}

.stagger-4 {
    animation-delay: 400ms;
}

.stagger-5 {
    animation-delay: 500ms;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-surface) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.grid-1 {
    grid-template-columns: repeat(1, 1fr);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {

    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Flex Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 4px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.gap-6 {
    gap: 24px;
}

/* Spacing */
.p-2 {
    padding: 8px;
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-6 {
    margin-top: 24px;
}

.text-center {
    text-align: center;
}

/* Text */
.text-sm {
    font-size: 14px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 32px;
}

.text-4xl {
    font-size: 40px;
}

.text-5xl {
    font-size: 56px;
}

.font-bold {
    font-weight: 400;
}

.font-medium {
    font-weight: 500;
}

.font-mono {
    font-family: var(--font-mono);
}

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

/* Glow Effects */
.glow-primary {
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.5);
}

.glow-gold {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 2px solid var(--primary);
    height: 72px;
    display: flex;
    align-items: center;
    overflow: visible;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
    position: relative;
    z-index: 101;
}

.logo-img {
    height: 120px;
    width: auto;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-20%);
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5));
}

.logo-text {
    margin-left: 80px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

/* Dashboard (y páginas internas): logo completo dentro del header, al lado del texto */
.header--dashboard .logo {
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.header--dashboard .logo-img {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    height: 52px;
    width: auto;
    max-height: 56px;
    flex-shrink: 0;
    object-fit: contain;
}

.header--dashboard .logo-text {
    margin-left: 0;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 102;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link[aria-current="page"] {
    color: var(--primary);
    font-weight: 600;
}

.header-lock-dropdown {
    position: relative;
    flex-shrink: 0;
}

.header-lock-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 4px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    cursor: pointer;
}

.header-lock-toggle:hover,
.header-lock-dropdown.is-open .header-lock-toggle {
    color: var(--primary);
}

.header-lock-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 12rem;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: rgba(22, 22, 22, 0.98);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 120;
}

.header-lock-dropdown.is-open .header-lock-menu {
    display: block;
}

.header-lock-menu__link {
    display: block;
    padding: 10px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.header-lock-menu__link:hover {
    color: var(--primary);
    background: rgba(198, 0, 0, 0.08);
}

.header-user-avatar-wrap {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

/* Mobile Responsive Header */
@media (max-width: 768px) {
    .logo-img {
        height: 70px;
        transform: translateY(-15%);
    }

    .header--dashboard .logo-img {
        height: 42px;
        max-height: 48px;
        transform: none;
    }

    .logo-text {
        margin-left: 50px;
        font-size: 0.85rem;
    }

    .header--dashboard .logo-text {
        margin-left: 0;
        font-size: 0.8rem;
    }

    /* Index / landing: logo + texto en fila (el absolute del desktop rompe el móvil) */
    .header:not(.header--dashboard) .logo {
        flex: 1;
        min-width: 0;
        gap: 8px;
        align-items: center;
    }

    .header:not(.header--dashboard) .logo-img {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        height: 46px;
        width: auto;
        max-height: 50px;
        flex-shrink: 0;
        filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.45));
    }

    .header:not(.header--dashboard) .logo-text {
        margin-left: 0;
        font-size: clamp(0.78rem, 3.6vw, 1.05rem);
        letter-spacing: 0.04em;
        line-height: 1.22;
        white-space: normal;
        min-width: 0;
        max-width: calc(100vw - 7.25rem);
    }

    .menu-toggle {
        display: flex;
        flex-shrink: 0;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(16, 16, 16, 0.98);
        flex-direction: column;
        align-items: stretch;
        padding: 14px 18px 16px;
        gap: 2px;
        border-bottom: 2px solid var(--primary);
        backdrop-filter: blur(10px);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-link {
        font-size: 15px;
        line-height: 1.35;
        padding: 6px 4px;
    }

    /* Botón (p. ej. Iniciar sesión) en la misma columna, sin hueco extra */
    .nav-links .btn {
        margin-top: 4px;
        padding: 10px 16px;
        width: 100%;
        justify-content: center;
    }

    .nav-links .header-user {
        flex-wrap: wrap;
        justify-content: center;
        padding-top: 10px;
        margin-top: 6px;
        border-top: 1px solid var(--border);
        width: 100%;
        gap: 10px;
    }
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 600px;
    overflow: hidden;
}

.slider-container {
    display: flex;
    width: 300%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.slide {
    width: 33.333%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    padding: 0 24px;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease 0.4s;
}

.slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}

.slide-subtitle {
    display: inline-block;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 16px;
    border-left: 3px solid var(--primary);
    padding-left: 12px;
}

.slide-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.slide-description {
    color: var(--text-secondary);
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    border-radius: 5px;
}

.slider-arrow:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.arrow-prev {
    left: 30px;
}

.arrow-next {
    right: 30px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background: var(--primary);
    width: 30px;
}

/* Countdown Timer Bar */
.countdown-bar {
    background: var(--accent-blue);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(1rem, 4vw, 3rem);
    flex-wrap: wrap;
}

.countdown-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.countdown-info img {
    height: 48px;
    width: auto;
}

.countdown-info-text h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.2;
}

.countdown-info-text p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.countdown-timer {
    display: flex;
    gap: 16px;
    align-items: center;
}

.countdown-unit {
    text-align: center;
    min-width: 50px;
}

.countdown-unit .number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: normal;
    color: #fff;
    line-height: 1;
}

.countdown-unit .label {
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
}

.countdown-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: 1px;
}

.countdown-btn:hover {
    background: var(--primary-hover);
}

/* Stats Block Below Countdown */
.stats-section {
    padding: 60px 24px;
    background: #121212;
    border-bottom: 1px solid var(--border);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: clamp(2rem, 10vw, 6rem);
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
    min-width: 150px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--gold);
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Section */
.section {
    padding: 96px 24px;
}

.section-alt {
    background: linear-gradient(180deg, var(--bg-primary), var(--bg-card));
}

/* Index: espacio extra solo encima del botón “Ver el detalle” en Cómo funciona */
.como-funciona-cta {
    margin-top: clamp(1.5rem, 4vw, 2.5rem);
}

/* FAQs — dos columnas, acordeón estilo bloque oscuro + chevron */
.faq-page {
    background: #050505;
    min-height: calc(100vh - 72px);
    padding: 48px 0 88px;
}

.faq-page__inner {
    max-width: 1120px;
}

.faq-page__intro {
    margin-bottom: 2.5rem;
    text-align: center;
}

.faq-page__title {
    font-family: var(--font-heading);
    font-size: clamp(1.65rem, 4vw, 2.1rem);
    margin-bottom: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #f5f5f5;
}

.faq-page__lead {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.55);
}

.faq-page__lead a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.faq-page__lead a:hover {
    color: #fff;
}

.faq-accordion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 28px;
    align-items: start;
}

.faq-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    background: #0c0c0e;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-item:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.faq-item[open] {
    border-color: rgba(198, 0, 0, 0.45);
    box-shadow: 0 0 0 1px rgba(198, 0, 0, 0.12);
}

.faq-item__question {
    cursor: pointer;
    padding: 1.05rem 2.75rem 1.05rem 1.2rem;
    font-weight: 600;
    font-size: 0.94rem;
    line-height: 1.45;
    list-style: none;
    position: relative;
    color: #f0f0f0;
    background: #16161a;
    margin: 0;
    user-select: none;
}

.faq-item__question::-webkit-details-marker {
    display: none;
}

/* Chevron ∨ cerrado → flecha ↑ abierto */
.faq-item__question::after {
    content: '';
    position: absolute;
    right: 1.15rem;
    top: 50%;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(255, 255, 255, 0.85);
    border-bottom: 2px solid rgba(255, 255, 255, 0.85);
    transform: translateY(-65%) rotate(45deg);
    transition: transform 0.25s ease;
}

.faq-item[open] .faq-item__question::after {
    transform: translateY(-35%) rotate(225deg);
}

.faq-item__answer {
    padding: 0 1.2rem 1.15rem;
    background: #0c0c0e;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item__answer p {
    margin: 0;
    padding-top: 0.9rem;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.9rem;
    line-height: 1.68;
}

.faq-item__answer a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.faq-item__answer a:hover {
    color: #fff;
}

.faq-page__cta {
    margin-top: 3rem;
}

/* Términos y condiciones — texto legal legible sobre fondo oscuro */
.legal-doc {
    max-width: 720px;
    margin: 0 auto;
    text-align: left;
}

.legal-doc__meta {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0 0 2rem;
}

.legal-doc__section {
    margin-bottom: 1.75rem;
}

.legal-doc__section:last-of-type {
    margin-bottom: 2.5rem;
}

.legal-doc__h2 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #ececec;
    margin: 0 0 0.65rem;
}

.legal-doc p {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.58);
}

.legal-doc p:last-child {
    margin-bottom: 0;
}

.legal-doc a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.legal-doc a:hover {
    color: #fff;
}

.legal-doc__list {
    margin: 0.35rem 0 0;
    padding-left: 1.25rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.92rem;
    line-height: 1.65;
}

.legal-doc__list li {
    margin-bottom: 0.45rem;
}

.legal-doc__back {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.legal-doc__back .btn {
    display: inline-flex;
}

@media (max-width: 900px) {
    .faq-accordion-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* Página Reglas — icono + título + texto (fuentes Jockey One / Inter del sitio) */
.reglas-page {
    position: relative;
    padding: 3rem 0 5rem;
    min-height: calc(100vh - 72px);
}

.reglas-page__bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/industrial-textures-1.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.22;
    pointer-events: none;
}

.reglas-page__bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(16, 16, 16, 0.88) 0%, rgba(16, 16, 16, 0.94) 50%, #101010 100%);
}

.reglas-page__inner {
    position: relative;
    z-index: 1;
    max-width: 960px;
}

.reglas-hero {
    text-align: center;
    margin-bottom: 2.75rem;
}

.reglas-hero__eyebrow {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.reglas-hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 1rem;
}

.reglas-hero__lead {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.65;
    max-width: 520px;
    margin: 0 auto;
}

.reglas-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .reglas-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.15rem 1.25rem;
    }
}

.reglas-card {
    display: flex;
    gap: 1.15rem;
    align-items: flex-start;
    padding: 1.35rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(27, 27, 29, 0.72);
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.reglas-card:hover {
    border-color: rgba(198, 0, 0, 0.35);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(198, 0, 0, 0.08);
    transform: translateY(-2px);
}

.reglas-card__icon {
    flex-shrink: 0;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    background: linear-gradient(160deg, rgba(198, 0, 0, 0.22), rgba(198, 0, 0, 0.04));
    border: 1px solid rgba(198, 0, 0, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.reglas-card__body {
    min-width: 0;
}

.reglas-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    line-height: 1.25;
}

.reglas-card__text {
    font-family: var(--font-body);
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
}

.reglas-highlight {
    margin: 2.5rem auto 0;
    max-width: 320px;
    text-align: center;
    padding: 1.75rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(198, 0, 0, 0.35);
    background: rgba(16, 16, 16, 0.6);
    box-shadow: 0 0 28px rgba(198, 0, 0, 0.12);
}

.reglas-highlight__label {
    font-family: var(--font-body);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 0.35rem;
}

.reglas-highlight__number {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 6vw, 2.75rem);
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin: 0.25rem 0;
}

.reglas-highlight__unit {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.reglas-page__cta {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

@media (max-width: 480px) {
    .reglas-page__cta .btn {
        width: 100%;
        margin-left: 0 !important;
        justify-content: center;
    }
}

/* Rules Section with Industrial Texture */
.section-rules {
    background-image: url('../images/industrial-textures-1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.section-rules::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(16, 16, 16, 0.85);
}

.section-rules>.container {
    position: relative;
    z-index: 1;
}

/* Footer */
.footer {
    padding: 48px 24px;
    border-top: 1px solid var(--border);
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary-hover);
}

.footer a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary-hover);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Validation Panel */
.validation-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 4px;
}

.validation-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-family: var(--font-mono);
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.validation-cell.used {
    background: var(--success);
    color: white;
}

.validation-cell.available {
    background: var(--bg-surface);
    color: var(--text-muted);
}

.validation-cell.duplicate {
    background: var(--error);
    color: white;
}

.validation-cell:hover {
    transform: scale(1.1);
}

/* Form Group */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-secondary);
}

.form-error {
    color: var(--error);
    font-size: 12px;
    margin-top: 4px;
}

/* Registro: celular con bandera + prefijo */
.register-phone-row {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.register-phone-country {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    padding: 0 0 0 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    color-scheme: dark;
}

.register-phone-country:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3), 0 0 20px rgba(79, 70, 229, 0.2);
}

.register-phone-flag {
    width: 28px;
    height: auto;
    max-height: 20px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.register-phone-select {
    width: auto;
    min-width: 4.75rem;
    max-width: 6.5rem;
    padding: 12px 10px 12px 4px;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    padding-right: 22px;
}

/* Lista desplegable: fondo oscuro y texto claro (Chrome/Edge/Firefox; soporte parcial en Safari) */
.register-phone-select option {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.register-phone-select:focus {
    outline: none;
}

.register-phone-input {
    flex: 1;
    min-width: 0;
}

/* Floating Action — esquina inferior derecha; por encima del scroll del main, por debajo del header/modal */
.fab-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 85;
}

@media (min-width: 769px) {
    #validation-panel:not(.hidden) ~ .fab-container {
        right: calc(var(--validation-panel-width) + 16px);
    }
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.fab-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
}

.fab-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.fab:hover {
    transform: scale(1.1);
}

.fab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Sticky Progress */
.sticky-progress {
    position: sticky;
    top: 64px;
    z-index: 40;
    background: rgba(10, 10, 15, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    padding: 16px 0;
    margin-bottom: 24px;
}

/* Escritorio: puntos (ancho natural) | bloque derecho crece: la barra llega hasta cerca de Puntos Equipos */
.sticky-progress-layout {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
}

.sticky-progress-points {
    flex: 0 1 auto;
    min-width: 0;
}

.sticky-progress-bar-with-badge {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
    flex: 1 1 auto;
    min-width: 0;
}

.sticky-progress-meter {
    flex: 1 1 auto;
    min-width: 120px;
    width: auto;
    max-width: none;
}

.sticky-progress-stats {
    flex-shrink: 0;
}

.sticky-progress-team-box {
    border-left: 1px solid var(--border);
    padding-left: 20px;
    margin-left: 10px;
}

.sticky-progress-match-badge {
    gap: 3px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sticky-progress-match-badge svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

@media (min-width: 769px) {
    .sticky-progress-bar-with-badge {
        gap: 10px;
    }
}

/* Filter Chips */
.filter-chips {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding: 4px 4px 12px 4px;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-surface);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--text-primary);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Chips de grupo A–L: texto “Grupo X” con tipografía compacta */
.filter-chip-group {
    padding: 5px 8px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Search Input */
.search-input {
    position: relative;
}

.search-input input {
    padding-left: 40px;
}

.search-input svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.filters-search-input {
    flex: 1;
    max-width: 300px;
}

/* Match Info */
.match-datetime {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.match-venue {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Prediction Row */
.prediction-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.prediction-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal {
        margin: 16px;
    }

    /* Mobile Header Adjustments */
    .header {
        height: auto;
        padding: 8px 0;
        min-height: 64px;
    }

    .header-content {
        padding: 0 16px;
        gap: 8px;
    }

    .logo-text {
        font-size: 13px;
        margin-left: 0;
        line-height: 1.1;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
        flex-shrink: 0;
    }

    .logo {
        gap: 6px;
        max-width: 60%;
    }

    /* Mobile Sticky Progress */
    .sticky-progress {
        top: 64px; /* Matches mobile header min-height */
        padding: 10px 0;
    }

    .sticky-progress .container {
        padding: 0 16px;
    }

    .sticky-progress .flex {
        gap: 8px;
        justify-content: space-between;
    }

    /* Fila 1: puntos; fila 2: barra + badge en la misma línea */
    .sticky-progress-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .sticky-progress-points {
        flex-wrap: wrap;
        min-width: 0;
        gap: 10px 14px !important;
    }

    .sticky-progress-bar-with-badge {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        justify-content: flex-start;
        gap: 10px;
        padding-top: 8px;
        margin-top: 2px;
        border-top: 1px solid var(--border);
    }

    .sticky-progress-meter {
        flex: 1 1 auto;
        min-width: 0;
        width: auto !important;
        max-width: none !important;
    }

    .sticky-progress-stats {
        flex-shrink: 0;
    }

    .sticky-progress-team-box {
        border-left: 1px solid var(--border);
        padding-left: 12px;
        margin-left: 6px;
    }

    .sticky-progress .text-2xl {
        font-size: 16px;
    }

    .sticky-progress .text-xl {
        font-size: 14px;
    }

    .sticky-progress .text-sm {
        font-size: 10px;
    }

    /* Hide redundant elements on mobile if needed or stack them */
    .progress-stats-group {
        display: none; /* Hide complex stats on very small screens */
    }

    /* Filters Sticky Mobile */
    .filters-sticky {
        top: 140px; /* Adjusted for smaller header/progress */
        padding: 12px 0;
    }

    .filters-sticky .container {
        padding: 0 16px;
    }

    .filters-sticky .container > .flex {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .search-input {
        max-width: 100% !important;
        width: 100%;
        order: 1;
    }

    .filter-chips {
        order: 2;
        width: 100%;
        margin: 0 -16px; /* Break out of container padding for full-width scroll */
        padding-left: 16px;
        padding-right: 16px;
    }

    #toggle-validation {
        order: 3;
        width: 100%;
        padding: 10px;
        font-size: 13px;
    }

    /* Match Cards Mobile */
    .match-card {
        padding: 16px;
    }

    .match-team-input {
        width: 50px !important;
        height: 32px !important;
        font-size: 16px !important;
    }

    .flag {
        width: 32px;
        height: 24px;
    }

    .grid {
        gap: 12px;
    }

    .container {
        padding: 0 16px;
    }
}

/* Utility Classes */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.cursor-pointer {
    cursor: pointer;
}

.select-none {
    user-select: none;
}

.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.transition {
    transition: var(--transition);
}

.rounded {
    border-radius: var(--radius-sm);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: 9999px;
}

.border {
    border: 1px solid var(--border);
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/* Match Team Inputs */
.match-team-input {
    width: 60px !important;
    height: 36px !important;
    padding: 0 8px !important;
    text-align: center;
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 18px !important;
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--border-subtle) !important;
    border-radius: 6px !important;
    color: var(--primary) !important;
    margin: 0 auto;
    display: block;
}

.match-team-input:focus {
    background: rgba(198, 0, 0, 0.1) !important;
    border-color: var(--primary) !important;
    outline: none;
    box-shadow: 0 0 10px rgba(198, 0, 0, 0.2);
}

/* Enviado: mismo resalte que al editar; los navegadores suelen apagar color/opacity en disabled */
.match-team-input:disabled {
    background: rgba(0, 0, 0, 0.3) !important;
    color: var(--primary) !important;
    -webkit-text-fill-color: var(--primary);
    opacity: 1;
    cursor: not-allowed;
    border: 1px solid var(--border-subtle) !important;
}

.match-team-input.input-valid:disabled {
    border-color: var(--success) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.match-team-input.input-error:disabled {
    border-color: var(--error) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.25);
}

/* Sticky Headers Hierarchy */
.header {
    position: sticky;
    top: 0;
    z-index: 100 !important;
    background: var(--bg-primary) !important;
}

.sticky-progress {
    position: sticky;
    top: 72px; /* Header height */
    z-index: 90 !important;
    background: rgba(16, 16, 16, 0.95) !important;
    backdrop-filter: blur(10px);
}

.filters-sticky {
    position: sticky;
    top: 169px; /* 72px (header) + 97px (progress) */
    z-index: 80 !important;
    background: rgba(16, 16, 16, 0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary);
    padding-bottom: 12px;
}

/* Escritorio: chips ocupan el hueco hasta Validación; “Grupo A”…L compactos */
@media (min-width: 769px) {
    .filters-sticky .container > .flex {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        gap: 12px;
        width: 100%;
    }

    .filters-search-input {
        flex: 0 0 auto;
        min-width: 160px;
        max-width: 260px;
        width: clamp(160px, 18vw, 260px);
    }

    .filters-sticky .filter-chips {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-content: center;
        align-items: center;
        row-gap: 6px;
        column-gap: 6px;
        overflow-x: visible;
        padding: 4px 0 8px 0;
    }

    .filters-sticky .filter-chip:not(.filter-chip-group) {
        padding: 6px 10px;
        font-size: 12px;
    }

    .filters-sticky .filter-chip-group {
        padding: 4px 7px;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: -0.03em;
        line-height: 1.2;
        white-space: nowrap;
    }

    .filters-sticky #toggle-validation {
        flex: 0 0 auto;
        padding: 8px 12px;
        font-size: 12px;
    }
}

.main-content-wrapper {
    padding-top: 32px;
    padding-bottom: 80px;
}

/* Dashboard: margen inferior extra para que al hacer scroll las cards no queden bajo los FAB (2×56 + gap + base) */
.page-dashboard main.main-content-wrapper.container {
    padding-bottom: 180px;
}

/* Panel lateral: altura = viewport real (top+bottom); el scroll va en .validation-panel__inner */
#validation-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--validation-panel-width);
    max-height: 100vh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    /* Por encima del header (100) y del menú móvil (.menu-toggle 102 dentro del header) */
    z-index: 250;
    overflow: hidden;
    padding: 0;
    box-sizing: border-box;
}

/* Debe ganar a #validation-panel { display: flex }, si no .hidden no oculta el panel */
#validation-panel.hidden {
    display: none;
}

#validation-panel .validation-panel__inner {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 24px;
    padding-bottom: max(24px, env(safe-area-inset-bottom, 0px));
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    position: relative;
    z-index: 0;
}

#validation-panel-close {
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    touch-action: manipulation;
    cursor: pointer;
}

/* Leyenda Usado / Disponible: swatches visibles + texto centrado en la pastilla */
.validation-legend .validation-legend__badge {
    flex: 0 0 auto;
    justify-content: center;
    gap: 8px;
    padding-left: 14px;
    padding-right: 14px;
}

.validation-legend__swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Sobre fondo verde: punto claro (antes era verde sobre verde = invisible) */
.badge-success .validation-legend__swatch--used {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

/* Sobre fondo gris: borde para distinguir del fondo del badge */
.validation-legend__badge:not(.badge-success) .validation-legend__swatch--free {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
}

/*
 * Panel abierto: reservar ancho con padding en body (no forzar .container al 100%).
 * Así max-width: 1400px + margin auto del .container se comportan como con el panel cerrado,
 * solo que el área útil es (viewport − panel).
 */
@media (min-width: 769px) {
    body.page-dashboard.dashboard-panel-open {
        overflow-x: hidden;
        padding-right: var(--validation-panel-width);
        box-sizing: border-box;
    }

    body.page-dashboard.dashboard-panel-open #matches-grid {
        min-width: 0;
    }
}

/* Rejilla de partidos: evita que el contenido fuerce ancho mínimo y desborde */
#matches-grid > .match-card {
    min-width: 0;
}

/* Página Cómo funciona: bloques imagen/texto alternados */
.cf-page {
    padding: 32px 16px 80px;
    max-width: 1100px;
}

.cf-page__intro {
    margin-bottom: 2.5rem;
    text-align: center;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.cf-page__title {
    font-family: var(--font-heading);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cf-page__lead {
    font-size: 1.05rem;
    line-height: 1.55;
}

.cf-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.25rem, 4vw, 2.5rem);
    align-items: center;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.cf-block__media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.cf-block__media img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.cf-block__heading {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.cf-block__text p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin: 0;
    font-size: 0.95rem;
}

.cf-block__text p + p {
    margin-top: 0.85rem;
}

.cf-block--full {
    grid-template-columns: 1fr;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.cf-block--pago {
    padding: clamp(1.25rem, 3vw, 1.75rem);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--bg-surface);
}

.cf-block--pago .cf-pay-valor {
    margin: 0.5rem 0 0.85rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.5;
}

.cf-block__subheading {
    font-size: 1.05rem;
    font-weight: 400;
    margin-top: 1.35rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.cf-block__subheading:first-of-type {
    margin-top: 0.35rem;
}

.cf-pay-flag-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.cf-pay-col-flag-img {
    width: 40px;
    height: auto;
    max-height: 28px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    display: block;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.cf-pay-methods {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.cf-pay-methods--single {
    max-width: 100%;
}

.cf-pay-methods--single .cf-pay-logo-link {
    max-width: min(100%, 260px);
}

.cf-pay-method {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.cf-pay-logo-link {
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    border-radius: 10px;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.cf-pay-logo-link:hover,
.cf-pay-logo-link:focus-visible {
    box-shadow: 0 0 0 2px var(--primary);
    outline: none;
}

.cf-pay-logo-link:focus-visible {
    box-shadow: 0 0 0 3px var(--primary);
}

.cf-pay-method .cf-pay-logo {
    max-width: min(100%, 240px);
    height: auto;
    display: block;
    border-radius: 10px;
}

.cf-pay-caption {
    margin: 0;
    max-width: 100%;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    text-wrap: balance;
}

.cf-pay-col-payments-intro {
    margin: 1rem 0 0.35rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.cf-pay-col-methods {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem 1.25rem;
}

.cf-pay-col-methods .cf-pay-method .cf-pay-logo {
    max-width: min(100%, 240px);
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

a.cf-pay-tel {
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

/* Nequi: mismo rojo del tema (--primary); antes se usaba fucsia solo por la marca Nequi */
.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi,
.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi:link,
.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi:visited {
    color: var(--primary);
    -webkit-text-fill-color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration-color 0.2s ease, -webkit-text-fill-color 0.2s ease;
}

.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi:hover {
    color: var(--primary-hover);
    -webkit-text-fill-color: var(--primary-hover);
    text-decoration: underline;
    text-decoration-color: rgba(253, 0, 0, 0.75);
}

.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi:active {
    color: var(--primary-dark);
    -webkit-text-fill-color: var(--primary-dark);
}

.cf-block--pago .cf-pay-caption a.cf-pay-tel--nequi:focus-visible {
    color: var(--primary-hover);
    -webkit-text-fill-color: var(--primary-hover);
    text-decoration: underline;
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 3px;
}

.cf-pay-method p {
    margin: 0;
}

@media (min-width: 520px) {
    .cf-pay-methods:not(.cf-pay-col-methods) {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .cf-pay-methods:not(.cf-pay-col-methods) .cf-pay-method {
        flex: 1 1 200px;
        min-width: 180px;
    }
}

.cf-page__cta {
    margin-top: 2rem;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .cf-page {
        padding-top: 24px;
        padding-bottom: 64px;
    }

    .cf-block {
        grid-template-columns: 1fr;
    }

    /* Mismo orden que en escritorio: primero imagen o primero texto según bloque */
    .cf-block--text-left .cf-block__text {
        order: 1;
    }

    .cf-block--text-left .cf-block__media {
        order: 2;
    }
}

/* ========== Clasificación (tabla ancha estilo hoja de cálculo) ========== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clasificacion-page {
    padding: 32px 0 80px;
    max-width: 100%;
}

.clasificacion-page__intro {
    margin-bottom: 1.25rem;
}

.clasificacion-page__title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.clasificacion-page__lead {
    font-size: 0.95rem;
    line-height: 1.55;
}

.clasificacion-page__cta {
    margin-top: 2rem;
}

.clasificacion-block {
    max-width: 100%;
}

.clasificacion-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 0 4px;
}

.clasificacion-toolbar__label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    font-family: var(--font-body);
    min-width: 12em;
    text-align: center;
}

.clasificacion-toolbar__hint {
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0 0 0.75rem;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.clasificacion-toolbar__hint--desktop {
    display: none;
}

.clasificacion-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.clasificacion-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--primary);
    color: var(--primary);
}

.clasificacion-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* Móvil / pantallas estrechas: una sola fila (sin wrap), botones compactos — debe ir después de .clasificacion-nav-btn */
@media (max-width: 991px) {
    .clasificacion-toolbar {
        flex-wrap: nowrap;
        gap: 4px;
        justify-content: center;
        margin-bottom: 0.75rem;
    }

    .clasificacion-toolbar .clasificacion-nav-btn {
        width: 36px;
        height: 36px;
        flex-shrink: 0;
        border-radius: 6px;
    }

    .clasificacion-toolbar .clasificacion-nav-btn svg {
        width: 18px;
        height: 18px;
    }

    .clasificacion-toolbar__label {
        min-width: 0;
        flex: 1 1 auto;
        max-width: none;
        font-size: clamp(0.62rem, 2.8vw, 0.8rem);
        font-weight: 600;
        line-height: 1.2;
        padding: 0 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        letter-spacing: -0.02em;
    }
}

@media (max-width: 380px) {
    .clasificacion-toolbar {
        gap: 2px;
    }

    .clasificacion-toolbar .clasificacion-nav-btn {
        width: 32px;
        height: 32px;
    }

    .clasificacion-toolbar .clasificacion-nav-btn svg {
        width: 16px;
        height: 16px;
    }
}

.clasificacion__col-hidden {
    display: none !important;
}

/* Bloque tabla: # / nombre / Pts fijos | solo partidos con scroll horizontal | Σ fijo */
.clasificacion-table-outer {
    margin-top: 2rem;
    width: 100%;
    min-width: 0;
}

.clasificacion-split {
    display: flex;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    overflow: hidden; /* en móvil se sobrescribe para no recortar Σ y permitir scroll */
    /* Altura de la subfila de equipos (debe coincidir con .clasificacion__head-code en partidos) */
    --clasificacion-code-line: 1.25;
    --clasificacion-code-fs: 12px;
    --clasificacion-code-pad-y: 6px;
    --clasificacion-code-pad-x: 8px;
}

.clasificacion-split__pane--left,
.clasificacion-split__pane--right {
    flex: 0 0 auto;
    min-width: 0;
}

.clasificacion-split__scroll {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    background: var(--bg-secondary);
}

.clasificacion-table--fixed-left,
.clasificacion-table--fixed-right {
    width: max-content;
}

.clasificacion-table--matches {
    width: max-content;
    min-width: 100%;
}

.clasificacion-table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
    font-family: var(--font-mono);
}

/* Vista paginada: menos columnas visibles, texto más grande */
.clasificacion-table--paged {
    font-size: 14px;
}

.clasificacion-table--paged th,
.clasificacion-table--paged td {
    padding: 10px 12px;
}

.clasificacion-table--paged .clasificacion__head-code {
    font-size: 12px;
    max-width: 72px;
    min-width: 56px;
    padding: 6px 8px;
}

.clasificacion-table--paged .clasificacion__head-match-num {
    min-width: 72px;
}

.clasificacion-table--paged .clasificacion__cell-pt {
    min-width: 40px;
}

.clasificacion__pane-rank {
    width: 48px;
    min-width: 48px;
}

.clasificacion__pane-name {
    min-width: 180px;
    max-width: 260px;
    text-align: left !important;
}

.clasificacion__pane-pts {
    width: 72px;
    min-width: 72px;
}

.clasificacion-table--fixed-right .clasificacion__head-final,
.clasificacion-table--fixed-right .clasificacion__cell-final {
    min-width: 3.25rem;
}

.clasificacion-table thead {
    position: sticky;
    top: 0;
    z-index: 6;
}

.clasificacion-table th,
.clasificacion-table td {
    border: 1px solid rgba(255, 255, 255, 0.12);
    padding: 4px 5px;
    text-align: center;
    vertical-align: middle;
    background: var(--bg-card);
}

.clasificacion-table--fixed-left tbody tr:nth-child(even) td,
.clasificacion-table--fixed-right tbody tr:nth-child(even) td {
    background: #1e1f24;
}

.clasificacion-table--fixed-left tbody tr:nth-child(odd) td,
.clasificacion-table--fixed-right tbody tr:nth-child(odd) td {
    background: #222327;
}

/* Cabecera: fila 1 alineada abajo (como nº de partido); fila 2 = misma altura que códigos de equipos */
.clasificacion-table--fixed-left .clasificacion__head-row-labels th,
.clasificacion-table--fixed-right .clasificacion__head-row-labels th {
    vertical-align: bottom;
    padding-top: 4px;
    padding-bottom: 2px;
}

.clasificacion-table--matches thead tr:first-child th {
    vertical-align: bottom;
    padding-top: 4px;
    padding-bottom: 2px;
}

.clasificacion__thead-spacer {
    padding: var(--clasificacion-code-pad-y) var(--clasificacion-code-pad-x) !important;
    font-size: var(--clasificacion-code-fs);
    line-height: var(--clasificacion-code-line);
    /* Una línea de texto como los códigos MEX/CAN + padding vertical (igual que .clasificacion__head-code) */
    min-height: calc(var(--clasificacion-code-fs) * var(--clasificacion-code-line) + 2 * var(--clasificacion-code-pad-y));
    box-sizing: border-box;
    vertical-align: middle;
    font-weight: 600;
    color: transparent;
    user-select: none;
}

/* Cuerpo: celdas a altura completa de fila (el nombre va en un span; no aplicar -webkit-box al td) */
.clasificacion-split .clasificacion-table tbody td {
    vertical-align: middle;
    line-height: 1.35;
}

/* td real a altura de fila; el recorte a 2 líneas solo en el span interior */
.clasificacion-table--fixed-left td.clasificacion__pane-cell-name {
    text-align: left;
}

.clasificacion-table--fixed-left .clasificacion__player-name {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    line-height: 1.35;
    max-height: calc(1.35em * 2);
    word-break: break-word;
    text-align: left;
    font-size: 13px;
}

.clasificacion__head-total,
.clasificacion__head-final {
    background: rgba(34, 197, 94, 0.22) !important;
    color: #bbf7d0;
    font-weight: 700;
}

.clasificacion__head-match-num {
    font-weight: 700;
    color: var(--text-primary);
    min-width: 52px;
}

.clasificacion__head-code {
    font-weight: 600;
    font-size: 10px;
    line-height: 1.25;
    max-width: 56px;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
    padding: 3px 2px;
}

.clasificacion__band--0 {
    background: rgba(255, 255, 255, 0.04) !important;
}

.clasificacion__band--1 {
    background: rgba(234, 88, 12, 0.12) !important;
}

.clasificacion__thead-sub {
    padding: 2px;
}

.clasificacion__cell-pt {
    font-variant-numeric: tabular-nums;
    min-width: 28px;
}

.clasificacion__cell-total,
.clasificacion__cell-final {
    background: rgba(34, 197, 94, 0.18) !important;
    color: #bbf7d0;
    font-weight: 700;
}

.clasificacion__cell-num {
    font-weight: 600;
    color: var(--text-secondary);
}

/* (Layout antiguo con sticky en una sola tabla: ya no se usa en clasificacion.php) */
.clasificacion__sticky--rank {
    position: sticky;
    left: 0;
    z-index: 8;
    width: 40px;
    min-width: 40px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.25);
}

.clasificacion__sticky--name {
    position: sticky;
    left: 40px;
    z-index: 8;
    min-width: 148px;
    max-width: 200px;
    text-align: left !important;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.25);
}

.clasificacion__sticky--total {
    position: sticky;
    left: 188px;
    z-index: 8;
    width: 64px;
    min-width: 64px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.25);
}

.clasificacion-table thead .clasificacion__sticky {
    z-index: 10;
    background: #26272c !important;
}

.clasificacion-table--fixed-left thead th,
.clasificacion-table--fixed-right thead th {
    background: #26272c !important;
}

.clasificacion-table--fixed-left .clasificacion__cell-total,
.clasificacion-table--fixed-left .clasificacion__head-total {
    background: rgba(34, 197, 94, 0.22) !important;
}

/* Por defecto (otras páginas si reutilizan la clase en td): solo en span dentro de clasificación fija usamos caja multip línea */
.clasificacion__player-name {
    font-family: var(--font-body);
    font-weight: 500;
    hyphens: auto;
    white-space: normal;
}

@media (max-width: 768px) {
    .clasificacion-table {
        font-size: 10px;
    }

    .clasificacion-table--paged {
        font-size: 12px;
    }

    .clasificacion-table--paged th,
    .clasificacion-table--paged td {
        padding: 8px 8px;
    }

    .clasificacion__sticky--rank {
        width: 32px;
        min-width: 32px;
    }

    .clasificacion__sticky--name {
        min-width: 120px;
        max-width: 140px;
        left: 32px;
    }

    .clasificacion__sticky--total {
        left: 152px;
    }

    .clasificacion__pane-rank {
        width: 40px;
        min-width: 40px;
    }

    .clasificacion__pane-name {
        min-width: 130px;
        max-width: 160px;
    }

    .clasificacion__pane-pts {
        width: 64px;
        min-width: 64px;
    }
}

/* Móvil / tablet: ocultar Σ; scroll horizontal en partidos con ancho real de columnas */
@media (max-width: 991px) {
    .clasificacion-split {
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-gutter: stable;
    }

    .clasificacion-split__pane--left {
        flex-shrink: 0;
    }

    /* Columna Σ solo en escritorio; en móvil el total ya está en Pts */
    .clasificacion-split__pane--right {
        display: none !important;
    }

    .clasificacion-split__scroll {
        flex: 1 1 auto;
        min-width: 0;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
    }

    /* Tabla de partidos: ancho según contenido para poder desplazar entre partidos (no forzar 100% del hueco) */
    .clasificacion-split__scroll .clasificacion-table--matches {
        width: max-content;
        min-width: max-content;
        max-width: none;
        table-layout: auto;
    }

    .clasificacion-split__scroll .clasificacion-table--matches .clasificacion__head-match-num {
        min-width: 56px;
    }

    .clasificacion-split__scroll .clasificacion-table--matches .clasificacion__head-code {
        min-width: 44px;
        max-width: 64px;
    }

    .clasificacion-split__scroll .clasificacion-table--matches .clasificacion__cell-pt {
        min-width: 32px;
    }
}

/* Escritorio: scroll horizontal solo en el bloque de partidos (entre Pts y Σ) */
@media (min-width: 992px) {
    .clasificacion-page {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .clasificacion-block {
        min-width: 0;
    }

    .clasificacion-toolbar__hint--desktop {
        display: block;
    }

    .clasificacion-split__scroll {
        overflow-x: auto;
        max-width: 100%;
        scrollbar-gutter: stable;
    }

    /*
     * Los 4 partidos visibles deben caber en el ancho del bloque (sin forzar +140px que cortaba el partido 4).
     * table-layout: fixed reparte el espacio entre las columnas visibles.
     */
    .clasificacion-table.clasificacion-table--matches.clasificacion-table--paged {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        table-layout: fixed;
    }

    .clasificacion-table--matches.clasificacion-table--paged .clasificacion__head-match-num {
        min-width: 0;
    }

    .clasificacion-table--matches.clasificacion-table--paged .clasificacion__head-code {
        min-width: 0;
        max-width: none;
        overflow-wrap: anywhere;
    }

    .clasificacion-table--matches.clasificacion-table--paged .clasificacion__cell-pt {
        min-width: 0;
    }
}