﻿@font-face {
    font-family: 'Space Grotesk';
    src: url('Tipografias/SpaceGrotesk-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('Tipografias/SpaceGrotesk-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('Tipografias/SpaceGrotesk-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('Tipografias/SpaceGrotesk-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Space Grotesk';
    src: url('Tipografias/SpaceGrotesk-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
/* VARIABLES Y SISTEMA DE DISEÃ‘O */
:root {
    /* Fondos */
    --bg-primary: #000000;
    --bg-secondary: #09090B;
    --bg-tertiary: #18181B;

    /* Acento Verde Xcalion */
    --primary-50: #ECFFF4;
    --primary-100: #D7FFE8;
    --primary-200: #B4FCD1;
    --primary-300: #95F6BE;
    --primary-400: #76F0AB;
    --primary-500: #53D98D;
    --primary-600: #3DBE75;
    --primary-700: #2E945A;
    --primary-800: #237044;
    --primary-900: #184B2E;
    --primary-rgb: 118, 240, 171;

    /* Textos */
    --text-primary: #FFFFFF;
    --text-secondary: #E4E4E7;
    --text-tertiary: #A1A1AA;
    --text-quaternary: #71717A;

    /* Acentos Secundarios */
    --success: #22C55E;
    --info: #76F0AB;
    --warning: #F59E0B;

    /* Fuentes */
    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Space Grotesk', sans-serif;
}

/* RESET GENERAL */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.78;
    overflow-x: hidden;
}

/* TIPOGRAFÃA */
h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
    font-family: var(--font-display);
}

h1 {
    font-size: clamp(2.7rem, 4.2vw + 0.9rem, 4.2rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 28px;
}

h2 {
    font-size: clamp(1.85rem, 2.25vw + 0.95rem, 2.7rem);
    font-weight: 700;
    line-height: 1.16;
    margin-bottom: 22px;
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.35;
}

.text-large {
    font-size: 1.1rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--text-secondary);
}

/* UTILIDADES NAVBAR */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.14);
    /* Primary RGB */
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 12px 0;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 88px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.96rem;
    letter-spacing: 0.01em;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-500);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.5rem;
}

.mobile-inscription-cta {
    display: none;
    background: var(--primary-400);
    color: #04120b;
    font-weight: 600;
    text-decoration: none;
    padding: 9px 16px;
    line-height: 1;
}

/* COMPONENTES */
.btn-primary {
    background: var(--primary-400);
    color: #04120b;
    font-weight: 600;
    padding: 15px 28px;
    border-radius: 0;
    border: none;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.02);
    box-shadow: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    font-weight: 600;
    padding: 15px 28px;
    border-radius: 0;
    border: 1px solid var(--primary-500);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-secondary:hover {
    background: rgba(var(--primary-rgb), 0.1);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.2);
}

.glass-card {
    background: linear-gradient(135deg,
            rgba(var(--primary-rgb), 0.08) 0%,
            rgba(var(--primary-rgb), 0.04) 50%,
            rgba(var(--primary-rgb), 0.08) 100%);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 24px;
    padding: 32px;
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.3),
        0 2px 4px -2px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 0 rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 25px 50px -12px rgba(var(--primary-rgb), 0.35);
    transform: translateY(-4px);
}

/* EFECTOS ESPECIALES */
.glow-primary {
    filter: drop-shadow(0 0 20px rgba(var(--primary-rgb), 0.6)) drop-shadow(0 0 40px rgba(var(--primary-rgb), 0.4)) drop-shadow(0 0 60px rgba(var(--primary-rgb), 0.3));
}

.glow-text {
    text-shadow:
        0 0 10px rgba(var(--primary-rgb), 0.8),
        0 0 20px rgba(var(--primary-rgb), 0.6),
        0 0 40px rgba(var(--primary-rgb), 0.4);
    color: var(--primary-400);
}

/* HERO SECTION */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 152px 32px 96px;
    overflow: hidden;
    background: #000000;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 78% 42%, rgba(var(--primary-rgb), 0.22), transparent 18%),
        radial-gradient(circle at 26% 20%, rgba(255, 255, 255, 0.06), transparent 22%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.65));
    z-index: 0;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-500);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-400);
    animation: float-particle ease-in-out infinite;
    opacity: 0.6;
}

.hero-container {
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, 620px) minmax(300px, 1fr);
    gap: 96px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 620px;
}

.hero-label {
    display: inline-block;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    margin-bottom: 20px;
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-title {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    position: relative;
    font-size: clamp(3.2rem, 6.2vw, 5.6rem);
    line-height: 0.96;
    letter-spacing: -0.05em;
    font-weight: 700;
    color: #f3f3f3;
    margin-bottom: 28px;
}

.hero-title span {
    background: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    display: inline-block;
}

.hero-title .hero-title-by {
    font-size: 0.62em;
    font-weight: 500;
    margin-right: 0.12em;
    vertical-align: baseline;
}

.hero-subtitle {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    font-size: clamp(1rem, 1.4vw + 0.7rem, 1.7rem);
    font-weight: 400;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.hero-subtitle::after {
    content: '';
    display: block;
    width: 100%;
    max-width: 280px;
    height: 3px;
    background: #ffffff;
    margin-top: 16px;
}

.hero-copy {
    opacity: 0;
    animation: fade-in-up 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.28s forwards;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.04rem;
    font-weight: 300;
    line-height: 1.82;
    max-width: 520px;
    margin-bottom: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 14px;
    opacity: 0;
    animation: scale-in 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.4s forwards;
}

.hero-btn-primary {
    background: #76f0ab;
    color: #04120b;
    animation: none;
    box-shadow: none;
    border-radius: 0;
    padding: 16px 28px;
}

.hero-btn-primary:hover {
    transform: translateY(-2px);
    filter: brightness(1.02);
    box-shadow: none;
}

.hero-btn-secondary {
    background: #efefef;
    color: #050505;
    border: 0;
    border-radius: 0;
    padding: 16px 28px;
}

.hero-btn-secondary:hover {
    background: #ffffff;
    box-shadow: none;
}

.hero-visual {
    position: relative;
    opacity: 0;
    animation: fade-in-rotate 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-media-frame {
    width: min(100%, 680px);
    aspect-ratio: 1 / 0.92;
    overflow: hidden;
    background: #050505;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: float 8s ease-in-out infinite;
    filter: brightness(0.7) contrast(1.05);
}

/* SECCIONES GENERALES */
.section {
    padding: 136px 32px;
    position: relative;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 88px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-header.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.section-label {
    color: var(--primary-400);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
    display: block;
}

/* RANKING SECTION (SHOWCASE) */
.ranking-container {
    max-width: 1080px;
    margin: 0 auto;
}

.ranking-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-bottom: 60px;
}

.stat-card {
    flex: 0 1 260px;
    text-align: center;
}

.stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    font-family: var(--font-display);
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff 0%, var(--primary-200) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.leaderboard {
    margin-top: 48px;
}

/* EDICIONES (selector de ranking) */
.ranking-edition-bar{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.ranking-edition-current{
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.ranking-edition-links{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-edition{
    padding: 10px 16px;
    border-radius: 0;
    font-size: 0.95rem;
}

.btn-edition.active{
    background: rgba(var(--primary-rgb), 0.16);
    box-shadow: 0 0 20px rgba(var(--primary-rgb), 0.18);
}

/* RANKING META (actualizaciÃ³n / refresco) */
.ranking-meta{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap:16px;
    margin-top: 28px;
    flex-wrap: wrap;
}
.ranking-updated{
    color: var(--text-tertiary);
    font-size: 0.875rem;
}
.ranking-refresh{
    padding: 11px 18px;
}

.ranking-search {
    margin-top: 18px;
}

.ranking-search-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(9, 9, 11, 0.78);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ranking-search-input::placeholder {
    color: rgba(161, 161, 170, 0.85);
}

.ranking-search-input:focus {
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}


/* Estado de carga */
.leaderboard-skeleton{
    opacity: 1 !important;
    transform: none !important;
    background: rgba(24, 24, 27, 0.35);
    border-style: dashed;
    border-color: rgba(255,255,255,0.08);
}
.leaderboard-skeleton .points-value{
    color: var(--text-tertiary);
}
.ranking-error{
    margin-top: 12px;
    color: #fca5a5; /* rojo suave */
    font-size: 0.95rem;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    padding: 22px 28px;
    margin-bottom: 18px;
    border-radius: 16px;
    background: rgba(24, 24, 27, 0.5);
    /* bg-tertiary */
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.leaderboard-row.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.leaderboard-row:hover {
    background: rgba(var(--primary-rgb), 0.05);
    border-color: rgba(var(--primary-rgb), 0.2);
    transform: scale(1.01);
}

.rank-pos {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-400);
    width: 60px;
    font-family: var(--font-display);
}

.player-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
}

.player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--primary-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--primary-200);
}

.player-details h4 {
    font-size: 1.02rem;
    color: var(--text-primary);
    margin-bottom: 5px;
    overflow-wrap: anywhere;
}

.player-details span {
    font-size: 0.84rem;
    color: var(--text-tertiary);
    overflow-wrap: anywhere;
}

.points-info {
    text-align: right;
}

.points-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-300);
}

.matches-value {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}

/* SERVICIOS / FLIP CARDS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    max-width: 1440px;
    margin: 0 auto;
}

.service-card-flip {
    perspective: 1000px;
    height: 400px;
    opacity: 0;
    transform: translateY(30px);
}

.service-card-flip.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Hover trigger for desktop */
@media (hover: hover) {
    .service-card-flip:hover .service-card-inner {
        transform: rotateY(180deg);
    }
}

/* Class for JS click trigger on mobile */
.service-card-inner.flipped {
    transform: rotateY(180deg);
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.service-card-front {
    background-color: var(--bg-tertiary);
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card-flip:hover .service-image {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px 24px 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
    text-align: left;
}

.service-title-front {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
}

.service-card-back {
    background-color: var(--bg-secondary);
    transform: rotateY(180deg);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

.service-title-back {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--primary-300);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-tag {
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-200);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
}

/* SECCIÃ“N SOBRE NOSOTROS (ABOUT) */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 84px;
    max-width: 1120px;
    margin: 0 auto;
    align-items: center;
}

.about-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 24px;
    filter: drop-shadow(0 0 30px rgba(var(--primary-rgb), 0.2));
}

.about-text {
    opacity: 0;
    transform: translateX(30px);
    max-width: 560px;
}

.about-grid-reverse .about-text {
    order: 1;
}

.about-grid-reverse .about-image {
    order: 2;
}

.tournament-section-header {
    margin-bottom: 56px;
}

.tournament-panel {
    max-width: 1080px;
    margin: 0 auto;
}

.tournament-panel-two-cols {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tournament-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tournament-card {
    background: rgba(24, 24, 27, 0.55);
    border: 1px solid rgba(var(--primary-rgb), 0.14);
    border-radius: 20px;
    padding: 28px 30px;
}

.tournament-card-wide {
    padding: 40px 44px;
}

.tournament-card h3 {
    margin-bottom: 22px;
}

.tournament-list {
    list-style: none;
    padding: 0;
}

.tournament-list li {
    display: flex;
    gap: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.75;
}

.tournament-item-content {
    flex: 1;
    min-width: 0;
}

.tournament-list li:last-child {
    margin-bottom: 0;
}

.tournament-bullet {
    color: var(--success);
    flex: 0 0 auto;
}

.tournament-sublist {
    margin-top: 14px;
    margin-left: 20px;
    padding-left: 18px;
}

.tournament-sublist li {
    display: list-item;
    list-style: disc;
    margin-bottom: 10px;
    color: var(--text-tertiary);
}

.tournament-sublist li:last-child {
    margin-bottom: 0;
}

.about-image.animate-in,
.about-text.animate-in {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* TESTIMONIOS/CLIENTES SOCIAL PROOF */
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    opacity: 0;
    transform: translateY(20px);
}

.clients-grid.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

.client-logo {
    height: 48px;
    opacity: 0.5;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.client-logo:hover {
    opacity: 1;
    filter: grayscale(0%);
    transform: translateY(-5px);
}

/* CTA FINAL */
.cta-section {
    position: relative;
    padding: 136px 32px;
    background: radial-gradient(ellipse at center, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    text-align: center;
    overflow: hidden;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 720px;
    margin: 0 auto;
    background: rgba(9, 9, 11, 0.6);
    padding: 72px 64px;
    border-radius: 32px;
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.cta-logo {
    width: min(100%, 360px);
    height: auto;
    display: block;
    margin: 0 auto 0;
}

.cta-tagline {
    color: var(--primary-300);
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

/* FOOTER */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 88px 32px 44px;
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 72px;
    margin-bottom: 64px;
}

.footer-brand p {
    color: var(--text-tertiary);
    margin-top: 18px;
    max-width: 320px;
}

.footer-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 14px;
}

.footer-links a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-400);
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding-top: 36px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-quaternary);
}


/* ANIMACIONES PRINCIPALES */
@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fade-in-rotate {
    0% {
        opacity: 0;
        transform: scale(0.9) rotate(-10deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    25% {
        transform: translateY(-20px) rotate(2deg);
    }

    50% {
        transform: translateY(-10px) rotate(-2deg);
    }

    75% {
        transform: translateY(-30px) rotate(1deg);
    }
}

@keyframes float-particle {

    0%,
    100% {
        transform: translate(0, 0);
        opacity: 0.4;
    }

    25% {
        transform: translate(100px, -100px);
        opacity: 0.8;
    }

    50% {
        transform: translate(-50px, -200px);
        opacity: 0.6;
    }

    75% {
        transform: translate(-100px, -100px);
        opacity: 0.8;
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow:
            0 0 0 1px rgba(var(--primary-rgb), 0.5),
            0 4px 24px rgba(var(--primary-rgb), 0.4),
            0 0 60px rgba(var(--primary-rgb), 0.3);
    }

    50% {
        box-shadow:
            0 0 0 2px rgba(var(--primary-rgb), 0.8),
            0 8px 40px rgba(var(--primary-rgb), 0.6),
            0 0 80px rgba(var(--primary-rgb), 0.5);
    }
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}


/* RESPONSIVE */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 56px;
    }

    .hero-content {
        margin: 0 auto;
        max-width: 620px;
    }

    .hero-actions {
        justify-content: flex-start;
    }

    .ranking-stats {
        gap: 20px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-grid-reverse .about-text,
    .about-grid-reverse .about-image {
        order: initial;
    }

    .tournament-split {
        grid-template-columns: 1fr;
    }

    .tournament-panel-two-cols {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 767px) {
    .nav-links {
        display: none;
        /* En este demo se oculta pero el JS podrÃ­a abrirlo */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 28px 24px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: block;
        width: 42px;
        height: 42px;
        border: 1px solid rgba(255, 255, 255, 0.35);
        font-size: 1.35rem;
        line-height: 1;
    }

    .mobile-inscription-cta {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        margin-right: 10px;
        min-height: 42px;
        font-size: 0.9rem;
    }

    .logo img {
        height: 68px;
    }

    .hero {
        padding: 136px 20px 72px;
    }

    .hero-title {
        font-size: 2.85rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-copy {
        font-size: 0.98rem;
        line-height: 1.75;
    }

    .hero-media-frame {
        aspect-ratio: 1 / 0.85;
    }

    .hero-actions {
        flex-direction: column;
    }

    .ranking-stats {
        gap: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .ranking-meta {
        align-items: stretch;
    }

    .ranking-refresh,
    .ranking-container > div .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .leaderboard {
        margin-top: 28px;
    }

    .leaderboard-row {
        padding: 18px 16px;
        gap: 12px;
        align-items: center;
    }

    .rank-pos {
        width: 44px;
        flex: 0 0 44px;
        font-size: 1.2rem;
    }

    .player-info {
        min-width: 0;
        gap: 12px;
        flex: 1;
    }

    .player-avatar {
        width: 42px;
        height: 42px;
        flex: 0 0 42px;
        font-size: 0.95rem;
    }

    .player-details {
        min-width: 0;
        flex: 1;
    }

    .player-details h4 {
        font-size: 1rem;
        margin-bottom: 2px;
    }

    .player-details span {
        font-size: 0.8rem;
    }

    .points-info {
        flex: 0 0 auto;
        text-align: right;
        min-width: 72px;
    }

    .points-value {
        font-size: 1.05rem;
        line-height: 1.1;
    }

    .matches-value {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    .section {
        padding: 96px 20px;
    }

    .section-header {
        margin-bottom: 56px;
    }

    .tournament-card-wide,
    .tournament-card {
        padding: 28px 22px;
    }

    .cta-section {
        padding: 96px 20px;
    }

    .cta-content {
        padding: 44px 24px;
    }

    .footer {
        padding: 72px 20px 36px;
    }
}

@media (max-width: 480px) {
    .leaderboard-row {
        padding: 14px 12px;
    }

    .rank-pos {
        width: 38px;
        flex-basis: 38px;
        font-size: 1.05rem;
    }

    .player-info {
        gap: 10px;
    }

    .player-avatar {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        font-size: 0.85rem;
    }

    .player-details h4 {
        font-size: 0.95rem;
    }

    .player-details span {
        font-size: 0.76rem;
    }

    .points-info {
        min-width: 64px;
    }

    .points-value {
        font-size: 0.98rem;
    }

    .matches-value {
        font-size: 0.7rem;
    }
}

/* =========================================================
   PÃGINAS DE FORMULARIO (InscripciÃ³n / Admin)
   ========================================================= */
.form-page {
    min-height: 100vh;
}

.form-main .container {
    width: min(1100px, 92vw);
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 28px;
}

.form-card {
    max-width: 980px;
    margin: 0 auto;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-field-full {
    grid-column: 1 / -1;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 14px 14px;
    border-radius: 12px;
    border: 1px solid rgba(var(--primary-rgb), 0.18);
    background: rgba(9, 9, 11, 0.75);
    color: var(--text-primary);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field textarea {
    resize: vertical;
    min-height: 120px;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: rgba(161, 161, 170, 0.85);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: rgba(var(--primary-rgb), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.12);
}

.form-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.form-note {
    margin-top: 14px;
    color: var(--text-tertiary);
    font-size: 0.95rem;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.footer-admin-link {
    color: var(--text-tertiary);
    text-decoration: none;
}
.footer-admin-link:hover {
    color: var(--text-secondary);
}


.legal-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(var(--primary-rgb), 0.18), transparent 24%),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.04), transparent 18%),
        linear-gradient(180deg, #000000 0%, #05070d 100%);
    color: var(--text-secondary);
}

.legal-layout {
    width: min(1180px, calc(100% - 42px));
    margin: 0 auto;
    padding: 140px 0 64px;
}

.legal-back {
    display: inline-flex;
    align-items: center;
    color: var(--text-tertiary);
    text-decoration: none;
    margin-bottom: 28px;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.legal-back:hover {
    color: var(--text-primary);
}

.legal-hero {
    margin-bottom: 26px;
    padding: 42px;
    background: rgba(9, 9, 11, 0.68);
    border: 1px solid rgba(var(--primary-rgb), 0.16);
    border-radius: 28px;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.legal-page .section-badge {
    display: inline-block;
    margin-bottom: 18px;
}

.legal-hero h1 {
    color: var(--text-primary);
    text-align: left;
    font-size: clamp(2.4rem, 4vw, 3.3rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 32px;
}

.legal-page .text-large,
.legal-hero .text-large {
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.6;
    font-weight: 400;
}

.legal-hero p + p {
    margin-top: 22px;
}

.legal-card {
    background: rgba(24, 24, 27, 0.5);
    border: 1px solid rgba(var(--primary-rgb), 0.12);
    border-radius: 22px;
    padding: 26px 28px;
    margin-bottom: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.legal-card h2 {
    color: var(--primary-300);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: 10px;
}

.legal-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 0;
}

.legal-card p + p {
    margin-top: 22px;
}

.legal-list {
    color: var(--text-secondary);
    margin: 18px 0 0 24px;
    padding: 0;
}

.legal-list li {
    margin-bottom: 12px;
    line-height: 1.65;
}

.legal-page .footer {
    margin-top: 32px;
}


.admin-status {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.admin-table-wrap {
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(var(--primary-rgb), 0.15);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
    background: rgba(9, 9, 11, 0.65);
}

.admin-table th,
.admin-table td {
    padding: 12px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(var(--primary-rgb), 0.10);
    vertical-align: top;
}

.admin-table th {
    position: sticky;
    top: 0;
    background: rgba(0, 0, 0, 0.75);
    font-weight: 700;
    color: var(--text-secondary);
}

.admin-table tr:hover td {
    background: rgba(var(--primary-rgb), 0.06);
}

/* Responsive form grid */
@media (max-width: 820px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-field-full {
        grid-column: auto;
    }

    .legal-layout {
        padding-top: 118px;
    }

    .legal-hero {
        padding: 28px 22px;
    }

    .legal-card {
        padding: 22px 20px;
    }
}





