/* =========================================
   Back 2 HoK — Paleta: Negro / Verde Esmeralda
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat:wght@400;500;600;700;800&family=Rajdhani:wght@400;500;600;700&display=swap');
/* Font fallback chain ensures styles never break without Google Fonts */

:root {
    --bg-dark:     #0a0f0d;
    --bg-card:     #0f1612;
    --bg-elevated: #141b19;
    --green:       #00e676;
    --green-light: #1de9b6;
    --green-dim:   #00b852;
    --green-glow:  rgba(0, 230, 118, 0.35);
    --green-deep:  #004d40;
    --danger:      #ff4757;
    --warning:     #ff9800;
    --text:        #e0f2f1;
    --text-muted:  #80cbc4;
    --border:      rgba(0, 230, 118, 0.18);
    --border-bold: rgba(0, 230, 118, 0.45);
    /* Compatibilidad con código existente */
    --accent:      #00e676;
    --accent-dim:  #00b852;
    --accent-glow: rgba(0, 230, 118, 0.35);
    --font-ui:     'Rajdhani', 'Montserrat', sans-serif;
    --font-body:   'Montserrat', sans-serif;
    --font-brand:  'Bebas Neue', sans-serif;
}

* { box-sizing: border-box; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 0.02em;
}

h1 { font-size: 2.5rem; color: var(--green-light); }
h2 { font-size: 2rem; color: var(--green-light); }
h3 { font-size: 1.5rem; color: var(--green-light); }
h4 { font-size: 1.25rem; color: var(--green-light); }
h5 { font-size: 1.1rem; color: var(--green-light); }
h6 { font-size: 1rem; color: var(--green-light); }

body {
    font-family: 'Montserrat', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    line-height: 1.6;
    background-image:
        radial-gradient(ellipse 80% 40% at 50% 0%,  rgba(0,230,118,.07) 0%, transparent 70%),
        radial-gradient(ellipse 60% 30% at 80% 100%, rgba(0,230,118,.05) 0%, transparent 60%);
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-light); text-decoration: underline; }

/* ─── Navbar ─── */
.navbar {
    background: rgba(10, 15, 13, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-bold);
    box-shadow: 0 2px 24px rgba(0,230,118,.12);
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none !important;
    flex-shrink: 0;
}
.navbar-brand img {
    height: 56px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0,230,118,.5));
    transition: filter .3s, transform .3s;
}
.navbar-brand img:hover {
    filter: drop-shadow(0 0 16px rgba(0,230,118,.7)) drop-shadow(0 0 6px rgba(29,233,182,.4));
    transform: scale(1.05);
}
.navbar-brand span {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: 1.15rem;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 50%, var(--green-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.05em;
    display: none;
}
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.navbar-nav a { color: var(--text-muted); font-weight: 600; letter-spacing: .06em; transition: color .2s; font-family: 'Rajdhani', 'Montserrat', sans-serif; font-size: .92rem; text-transform: uppercase; }
.navbar-nav a:hover { color: var(--green-light); text-decoration: none; }

/* ─── Botones ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-family: 'Rajdhani', 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: .92rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    line-height: 1.2;
}
.btn-primary {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-light) 100%);
    color: var(--bg-dark);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--green-light), var(--green));
    box-shadow: 0 0 22px var(--green-glow);
    text-decoration: none;
    color: var(--bg-dark);
}
.btn-outline {
    background: transparent;
    border: 2px solid var(--green);
    color: var(--green);
}
.btn-outline:hover { background: var(--green); color: var(--bg-dark); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { box-shadow: 0 0 16px rgba(255,71,87,.4); }

/* ─── Container ─── */
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }

/* ─── Cards ─── */
.card {
    background: var(--bg-card);
    border-radius: 10px;
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0,230,118,.04) 0%, transparent 60%);
    pointer-events: none;
}
.card-title {
    font-family: 'Rajdhani', 'Montserrat', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--green-light);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* ─── Formularios ─── */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    margin-bottom: .3rem;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: .08em;
    font-size: .8rem;
    text-transform: uppercase;
    font-family: 'Rajdhani', 'Montserrat', sans-serif;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: .65rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border-bold);
    background: var(--bg-dark);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px var(--green-glow);
}

/* ─── Hero ─── */
.hero { text-align: center; padding: 5rem 2rem 4rem; }
.hero h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3.2rem;
    margin-bottom: .5rem;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 40%, var(--green-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p { color: var(--text-muted); font-size: 1.2rem; max-width: 600px; margin: 0 auto 2rem; }

/* ─── Grids ─── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .navbar { padding: .5rem 1rem; }
    .navbar-brand span { display: none; }
}

/* ─── Login box ─── */
.login-box {
    max-width: 420px;
    margin: 3rem auto;
    border: 1px solid var(--border-bold);
    box-shadow: 0 0 40px rgba(0,230,118,.10), 0 0 80px rgba(0,230,118,.05);
}

/* ─── Alertas ─── */
.alert { padding: .9rem 1.1rem; border-radius: 6px; margin-bottom: 1rem; font-weight: 600; }
.alert-error   { background: rgba(255,71,87,.15);  border: 1px solid var(--danger);  color: #ff6b7a; }
.alert-success { background: rgba(0,230,118,.12);  border: 1px solid var(--green);   color: var(--green); }
.alert-warning { background: rgba(255,165,2,.12);  border: 1px solid var(--warning); color: var(--warning); }

/* ─── Brackets ─── */
.bracket { overflow-x: auto; padding: 1rem; }
.bracket-round { display: inline-flex; flex-direction: column; gap: 2rem; padding: 0 2rem; min-width: 200px; }
.match-box {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: .75rem 1rem;
    min-width: 180px;
    transition: border-color .2s;
}
.match-box.winner { border-color: var(--green); box-shadow: 0 0 10px var(--green-glow); }
.match-box:hover  { border-color: var(--border-bold); }

/* ─── Tablas ─── */
table { width: 100%; border-collapse: collapse; }
th {
    background: var(--bg-elevated);
    color: var(--green);
    font-family: 'Rajdhani', 'Montserrat', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: .8rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-bold);
}
td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
tr:hover td { background: rgba(0,230,118,.04); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--green-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ─── Admin Layout ─── */
body.admin-layout {
    display: flex;
    flex-direction: column;
}

.admin-wrapper {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 64px);
}

.admin-sidebar {
    width: 250px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-bold);
    padding: 1.5rem 0;
    position: fixed;
    height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 99;
}

.admin-sidebar h3 {
    padding: 0 1.5rem;
    margin: 1rem 0 0.5rem 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.88rem;
    font-weight: 500;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(0, 230, 118, 0.1);
    border-left-color: var(--green);
    color: var(--green-light);
}

.admin-sidebar .icon {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.admin-content {
    flex: 1;
    margin-left: 250px;
    padding: 2rem;
}

.admin-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,230,118,.05) 0%, transparent 60%);
    pointer-events: none;
}

.dashboard-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0,230,118,.2);
    transform: translateY(-5px);
}

.dashboard-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.dashboard-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-family: 'Montserrat', sans-serif;
}

.dashboard-value {
    font-size: 2.5rem;
    color: var(--green-light);
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-bottom: 1px solid var(--border-bold);
        border-right: none;
        display: flex;
        flex-wrap: wrap;
        padding: 0;
    }
    
    .admin-sidebar h3 {
        flex-basis: 100%;
    }
    
    .admin-sidebar a {
        flex: 1;
        min-width: 120px;
        padding: 1rem 0.5rem;
    }
    
    .admin-content {
        margin-left: 0;
        padding: 1rem;
    }
}

/* ─── Botón flotante idioma ─── */
.translate-btn { position: fixed; bottom: 20px; right: 20px; z-index: 1000; padding: .5rem 1rem; }

/* ─── Footer ─── */
.footer {
    width: 100%;
    background: var(--bg-card);
    border-top: 1px solid var(--border-bold);
    margin-top: 4rem;
    padding-top: 3rem;
    box-shadow: 0 -2px 24px rgba(0,230,118,.08);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto 2rem;
    padding: 0 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--green-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    position: relative;
    display: inline-block;
}

.footer-section h3::after,
.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(135deg, var(--green), var(--green-light));
}

.footer-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.footer-section h4 {
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-links a:before {
    content: '→';
    opacity: 0;
    margin-right: -0.5rem;
    transition: all 0.2s;
}

.footer-links a:hover {
    color: var(--green-light);
    text-decoration: none;
    padding-left: 0.5rem;
}

.footer-links a:hover:before {
    opacity: 1;
    margin-right: 0;
}

.footer-socials {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 230, 118, 0.08);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--green);
    transition: all 0.3s;
}

.social-link:hover {
    background: var(--green);
    color: var(--bg-dark);
    border-color: var(--green);
    box-shadow: 0 0 16px rgba(0,230,118,.3);
    transform: translateY(-3px);
}

.footer-bottom {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
    padding: 1.5rem 2rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: 'Montserrat', sans-serif;
}

.footer-bottom strong {
    color: var(--green-light);
    font-weight: 600;
}

.language-toggle {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-switch {
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: all 0.2s;
    border: 1px solid transparent;
}

.lang-switch:hover {
    color: var(--green-light);
    border-color: var(--border);
}

.lang-switch.active {
    background: rgba(0, 230, 118, 0.15);
    color: var(--green);
    border-color: var(--green);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }
    
    .footer-section h3::after,
    .footer-section h4::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer {
        margin-top: 2rem;
        padding-top: 2rem;
    }
}

/* ─── Welcome Section ─── */
.welcome-section {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-bottom: 3rem;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, rgba(29, 233, 182, 0.02) 100%);
    border-bottom: 1px solid var(--border-bold);
    box-shadow: inset 0 1px 0 rgba(0, 230, 118, 0.1);
}

.welcome-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.welcome-canvas-wrapper {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-bold);
    background: rgba(10, 15, 13, 0.8);
    box-shadow: 0 0 40px rgba(0, 230, 118, 0.1);
}

.logo-canvas {
    display: block;
    width: 100%;
    height: 400px;
}

.welcome-text {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.welcome-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 50%, var(--green-dim) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.welcome-cta {
    display: flex;
    gap: 1rem;
}

.feature-card {
    position: relative;
    transition: all 0.3s;
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.feature-card:nth-child(1) .card-icon {
    animation-delay: 0s;
}

.feature-card:nth-child(2) .card-icon {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) .card-icon {
    animation-delay: 0.4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--green);
    box-shadow: 0 12px 24px rgba(0, 230, 118, 0.15);
}

/* ─── Sponsors Section ─── */
.sponsors-section {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.sponsors-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.sponsors-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.sponsors-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.sponsors-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.sponsors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.sponsor-card {
    background: rgba(20, 27, 25, 0.6);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sponsor-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.sponsor-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
    background: rgba(20, 27, 25, 1);
    transform: translateY(-5px);
}

.sponsor-placeholder {
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.sponsor-card:hover .sponsor-placeholder {
    opacity: 1;
}

.sponsor-placeholder svg {
    filter: drop-shadow(0 0 8px rgba(0, 230, 118, 0.2));
    transition: filter 0.3s;
}

.sponsor-card:hover .sponsor-placeholder svg {
    filter: drop-shadow(0 0 16px rgba(0, 230, 118, 0.4));
}

/* make sure sponsor logo images fit inside their cards */
.sponsor-card img {
    max-width: 80px;
    height: auto;
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .welcome-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .logo-canvas {
        height: 300px;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-subtitle {
        font-size: 1rem;
    }
    
    .welcome-cta {
        flex-direction: column;
    }
    
    .welcome-section {
        margin: -1rem -1rem 2rem -1rem;
        padding: 2rem 1rem;
    }
    
    .sponsors-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .welcome-cta {
        gap: 0.5rem;
    }
    
    .welcome-cta .btn {
        flex: 1;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .logo-canvas {
        height: 250px;
    }
    
    .sponsors-section {
        padding: 2rem 1rem;
    }
}

/* ─── Upcoming Tournaments Section ─── */
.upcoming-tournaments-section {
    margin: 3rem 0;
    padding: 3rem 2rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.upcoming-tournaments-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.03) 0%, transparent 60%);
    pointer-events: none;
}

.tournaments-header {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.tournaments-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tournaments-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.tournaments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 1;
    margin-bottom: 2rem;
}

.tournament-card {
    background: rgba(10, 15, 13, 0.8);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.tournament-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.tournament-card:hover {
    border-color: var(--green);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.2);
    transform: translateY(-5px);
}

.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.tournament-header h3 {
    margin: 0;
    flex: 1;
    font-size: 1.1rem;
    color: var(--green-light);
}

.tournament-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tournament-status.status-open {
    background: rgba(0, 230, 118, 0.15);
    color: var(--green);
    border: 1px solid var(--green);
}

.tournament-status.status-locked {
    background: rgba(255, 152, 0, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.tournament-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    background: rgba(0, 230, 118, 0.04);
    border-radius: 6px;
    border-left: 3px solid var(--green);
}

.info-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.info-value {
    font-size: 0.95rem;
    color: var(--text);
    font-weight: 600;
}

.info-countdown {
    font-size: 0.8rem;
    color: var(--green);
    font-weight: 700;
}

.tournament-card .btn {
    margin-top: auto;
    position: relative;
    z-index: 1;
}

.tournaments-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
    position: relative;
    z-index: 1;
}

.tournaments-empty p {
    margin: 0;
    font-size: 1.1rem;
}

.tournaments-empty p:first-child {
    color: var(--text);
    font-weight: 600;
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .upcoming-tournaments-section {
        padding: 2rem 1rem;
    }
    
    .tournaments-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.5rem;
    }
    
    .tournament-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tournament-status {
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .tournaments-grid {
        grid-template-columns: 1fr;
    }
    
    .upcoming-tournaments-section {
        padding: 1.5rem 1rem;
    }
    
    .tournaments-header h2 {
        font-size: 1.5rem;
    }
}

/* ─── Tournament Page Styles ─── */
.tournament-header-section {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, rgba(29, 233, 182, 0.02) 100%);
    border: 1px solid var(--border-bold);
    padding: 2.5rem !important;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.tournament-header-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 230, 118, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.tournament-header-section > * {
    position: relative;
    z-index: 1;
}

.tournament-teams-grid {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tournament-teams-grid > div:hover {
    border-color: var(--green) !important;
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2) !important;
    transform: translateY(-4px);
}

@media (max-width: 768px) {
    .tournament-header-section {
        padding: 2rem !important;
    }
    
    .tournament-info-grid {
        grid-template-columns: 1fr !important;
    }
    
    .tournament-teams-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ─── Regulations Page ─── */
.regulations-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
    border-bottom: 2px solid var(--border-bold);
}

.regulations-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.regulations-header p {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.regulations-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: flex-start;
}

.regulations-toc {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1.5rem;
    position: sticky;
    top: 80px;
    z-index: 10;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,230,118,.3) transparent;
}
.regulations-toc::-webkit-scrollbar { width: 4px; }
.regulations-toc::-webkit-scrollbar-track { background: transparent; }
.regulations-toc::-webkit-scrollbar-thumb { background: rgba(0,230,118,.3); border-radius: 2px; }

.regulations-toc h3 {
    color: var(--green-light);
    margin: 0 0 1.5rem 0;
    font-size: 1.2rem;
}

.regulations-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.regulations-toc li {
    margin-bottom: 0.75rem;
}

.regulations-toc a {
    color: var(--text-muted);
    display: block;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    border-radius: 4px;
    font-weight: 500;
}

.regulations-toc a:hover {
    color: var(--green-light);
    border-left-color: var(--green);
    text-decoration: none;
    background: rgba(0, 230, 118, 0.05);
}

.regulations-toc a.active {
    color: var(--green);
    border-left-color: var(--green);
    background: rgba(0, 230, 118, 0.1);
}

.regulations-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.regulation-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    scroll-margin-top: 100px;
}

.regulation-section:last-of-type {
    border-bottom: none;
}

.regulation-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--green-light);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.regulation-section h3 {
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--green);
}

.regulation-section p {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.regulation-section ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    color: var(--text);
}

.regulation-section ul li {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    position: relative;
    line-height: 1.6;
}

.regulation-section ul li:before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: bold;
}

.regulation-body {
    color: var(--text-muted);
    line-height: 1.8;
}

.regulation-body p {
    margin-bottom: 1.2rem;
}

.regulations-contact {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.05) 0%, rgba(29, 233, 182, 0.02) 100%);
    border: 1px solid var(--border-bold);
    border-radius: 10px;
    padding: 2.5rem;
    margin-top: 3rem;
    text-align: center;
    border-top: 3px solid var(--green);
}

.regulations-contact h2 {
    color: var(--green-light);
    margin-bottom: 1rem;
}

.regulations-contact p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.regulations-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.regulations-contact li {
    color: var(--text);
    font-weight: 500;
}

.regulations-contact strong {
    color: var(--green);
}

@media (max-width: 768px) {
    .regulations-toc {
        position: relative;
        top: auto;
        margin-bottom: 2rem;
    }
    
    .regulation-section {
        padding: 1.5rem;
    }
    
    .regulation-section h2 {
        font-size: 1.4rem;
    }
    
    .regulations-contact {
        padding: 1.5rem;
    }
    
    .regulations-contact ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .regulations-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .regulations-toc {
        position: relative !important;
        top: auto !important;
        max-height: none;
    }
}

@media (max-width: 480px) {
    .regulations-header h1 {
        font-size: 1.8rem;
    }
    
    .regulations-toc h3 {
        font-size: 1rem;
    }
    
    .regulations-toc a {
        font-size: 0.9rem;
    }
    
    .regulation-section {
        padding: 1rem;
    }
    
    .regulation-section h2 {
        font-size: 1.2rem;
    }
    
    .regulation-section h3 {
        font-size: 1rem;
    }
}


/* ═══════════════════════════════════════════════
   GLOBAL FIXES + FULL RESPONSIVE SYSTEM
   ═══════════════════════════════════════════════ */

/* ── Ensure consistent btn alignment across all contexts ── */
.btn, a.btn, button.btn {
    font-family: 'Rajdhani', 'Montserrat', sans-serif;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    line-height: 1.2;
    vertical-align: middle;
}

/* ── Container ── */
@media (max-width: 768px)  { .container { padding: 1rem 1.1rem; } }
@media (max-width: 480px)  { .container { padding: .75rem .9rem; } }

/* ════════════ INDEX / HERO ════════════ */
@media (max-width: 960px) {
    .hero { min-height: auto !important; padding: 3.5rem 0 2.5rem !important; }
    .hero-visual { display: none !important; }
    .hero-content { max-width: 100% !important; }
}
@media (max-width: 600px) {
    .hero { padding: 2.5rem 0 2rem !important; }
    .hero-title { font-size: 2.5rem !important; }
    .hero-sub { font-size: .95rem !important; }
    .hero-cta { gap: .65rem !important; }
    .hero-cta .btn-hero-primary,
    .hero-cta .btn-hero-outline { width: 100% !important; }
}
@media (max-width: 600px) {
    .stats-inner { grid-template-columns: repeat(2,1fr) !important; }
    .stat-item:nth-child(2) { border-right: none !important; }
    .stat-num { font-size: 1.8rem !important; }
}
/* Two-col section grid */
.two-col-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 860px) { .two-col-grid { grid-template-columns: 1fr !important; gap: 2.5rem !important; } }

/* Cards grids */
@media (max-width: 640px) {
    .tourn-grid  { grid-template-columns: 1fr !important; }
    .results-grid{ grid-template-columns: 1fr !important; }
    .news-grid   { grid-template-columns: 1fr !important; gap: 1rem !important; }
}
/* CTA banner */
@media (max-width: 600px) {
    .cta-banner { padding: 2.5rem 1.25rem !important; }
    .cta-banner h2 { font-size: 1.45rem !important; }
    .cta-banner div[style*="flex"] { flex-direction: column !important; }
    .cta-banner div[style*="flex"] a { width: 100% !important; }
}
/* Download */
@media (max-width: 700px) {
    .download-section { grid-template-columns: 1fr !important; text-align: center; padding: 2rem 1.25rem !important; }
    .download-section > div:last-child { flex-direction: row !important; justify-content: center !important; flex-wrap: wrap !important; }
}
/* Home section spacing */
@media (max-width: 600px) {
    .home-section { padding: 2.5rem 0 !important; }
    .section-title { font-size: 1.5rem !important; }
}

/* ════════════ FOOTER ════════════ */
.footer { margin-top: 3rem; }
.footer-content {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
/* Tablet */
@media (max-width: 900px) {
    .footer-content { grid-template-columns: repeat(2, 1fr) !important; gap: 1.5rem !important; padding: 0 1.25rem !important; }
}
/* Mobile */
@media (max-width: 560px) {
    .footer { margin-top: 2rem; padding-top: 2rem !important; }
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.25rem !important;
        padding: 0 1rem !important;
    }
    .footer-section p { display: none; } /* hide description on mobile to save space */
    .footer-socials { margin-top: 1rem; }
    .footer-bottom {
        flex-direction: column !important;
        text-align: center !important;
        padding: 1rem !important;
        gap: .5rem !important;
    }
    .footer-section h3::after, .footer-section h4::after { display: none; }
}
@media (max-width: 360px) {
    .footer-content { grid-template-columns: 1fr !important; }
}

/* ════════════ ADMIN PANEL ════════════ */
/* Sidebar is hidden on mobile via admin-layout.php inline styles */
/* Only content adjustments here */
@media (max-width: 960px) {
    .admin-wrapper  { flex-direction: column !important; }
    .admin-content  { margin-left: 0 !important; padding: 1rem !important; }
}
@media (max-width: 600px) {
    .admin-content  { padding: .85rem !important; }
}
/* Admin tables scroll */
@media (max-width: 960px) {
    .admin-content > div { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .admin-content table { min-width: 520px; }
}

/* ════════════ CAPTAIN PANEL ════════════ */
@media (max-width: 768px) {
    .cap-hero { padding: 1.5rem !important; gap: 1rem !important; flex-wrap: wrap !important; }
    .cap-avatar { width: 64px !important; height: 64px !important; font-size: 1.6rem !important; flex-shrink: 0; }
    .cap-hero-info h1 { font-size: 1.4rem !important; }
    .cap-hero-actions { margin-left: 0 !important; width: 100% !important; }
    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; gap: .85rem !important; }
    .qa-grid  { grid-template-columns: repeat(3, 1fr) !important; gap: .6rem !important; }
    .qa-btn   { padding: 1rem .6rem !important; font-size: .75rem !important; }
    .qa-btn .qa-icon { font-size: 1.4rem !important; }
}
@media (max-width: 480px) {
    .cap-hero { text-align: center; flex-direction: column; align-items: center; }
    .qa-grid  { grid-template-columns: repeat(2, 1fr) !important; }
    .cap-hero-actions { justify-content: center !important; }
    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 380px) {
    .qa-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .stat-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ════════════ PLAYER PANEL ════════════ */
@media (max-width: 768px) {
    .pl-hero { padding: 1.5rem !important; gap: 1rem !important; flex-wrap: wrap !important; }
    .pl-avatar { width: 64px !important; height: 64px !important; font-size: 1.6rem !important; }
    .pl-hero-info h1 { font-size: 1.4rem !important; }
    .pl-hero-actions { margin-left: 0 !important; width: 100% !important; }
}
@media (max-width: 480px) {
    .pl-hero { text-align: center; flex-direction: column; align-items: center; }
    .pl-hero-actions { justify-content: center !important; }
}

/* ════════════ TOURNAMENT PAGE ════════════ */
@media (max-width: 700px) {
    .tournament-teams-grid { grid-template-columns: 1fr !important; }
    /* bracket horizontal scroll */
    .bracket { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .bracket-round { min-width: 180px; padding: 0 1rem; }
}

/* ════════════ REPORT MATCH PAGE ════════════ */
@media (max-width: 600px) {
    .result-type-btn { padding: .75rem .65rem !important; font-size: .82rem !important; }
    #sectionNormal .grid-2, #sectionFF .grid-2 { grid-template-columns: 1fr !important; }
}

/* ════════════ TEAM PUBLIC PAGE ════════════ */
@media (max-width: 640px) {
    /* player cards grid */
    div[style*="minmax(250px"] { grid-template-columns: 1fr !important; }
}

/* ════════════ RANKING PAGE ════════════ */
@media (max-width: 600px) {
    table th:nth-child(4), table td:nth-child(4) { font-size: .78rem; }
    table th, table td { padding: .55rem .6rem !important; font-size: .82rem !important; }
}

/* ════════════ REGULATIONS ════════════ */
@media (max-width: 768px) {
    .regulations-wrapper { display: block !important; }
    .regulations-toc  { position: relative !important; top: 0 !important; margin-bottom: 1.5rem !important; }
    .regulation-section { padding: 1.25rem !important; }
}

/* ════════════ SEARCH PAGE ════════════ */
@media (max-width: 600px) {
    .search-input-big { font-size: .92rem !important; padding: .75rem 1rem !important; }
    .result-card { flex-direction: row !important; }
}

/* ════════════ NEWS PAGE ════════════ */
@media (max-width: 600px) {
    .news-grid { grid-template-columns: 1fr !important; }
}

/* ════════════ LEGAL PAGES ════════════ */
@media (max-width: 600px) {
    .legal-wrapper { padding: 1.5rem 0 3rem !important; }
    .legal-header h1 { font-size: 1.8rem !important; }
    .data-table { display: block; overflow-x: auto; }
    .legal-toc { padding: 1rem !important; }
}

/* ════════════ FORMS (login, register) ════════════ */
@media (max-width: 500px) {
    .login-box { margin: 1rem auto; }
    .form-group input, .form-group select, .form-group textarea { font-size: .92rem !important; }
}

/* ════════════ GLOBAL TOUCH + TYPOGRAPHY ════════════ */
@media (max-width: 768px) {
    /* Minimum touch target */
    .btn, .nav-btn, .btn-hero-primary, .btn-hero-outline,
    .qa-btn, .rank-row, .tour-row, .nav-link { min-height: 40px; }
    /* No text overflow */
    h1, h2, h3, h4 { word-break: break-word; }
    /* Readable body */
    body { font-size: 15px; }
}

/* Thin scrollbar on mobile */
@media (max-width: 768px) {
    ::-webkit-scrollbar { width: 3px; height: 3px; }
}

/* Print */
@media print {
    .navbar, .translate-btn, footer, .hero-visual { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .container { max-width: 100% !important; padding: 0 !important; }
}

/* ═══ QA-BTN TEXT OVERFLOW FIX (all panels) ═══ */
.qa-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    padding: 1rem .65rem !important;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
    hyphens: auto;
    line-height: 1.2;
}
.qa-btn span, .qa-btn .qa-label {
    font-size: .72rem !important;
    line-height: 1.25;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal !important;
    max-width: 100%;
    display: block;
}
.qa-btn .qa-icon {
    font-size: 1.5rem !important;
    line-height: 1;
    display: block;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .qa-btn { padding: .75rem .5rem !important; }
    .qa-btn .qa-icon { font-size: 1.3rem !important; }
    .qa-btn .qa-label, .qa-btn span { font-size: .67rem !important; }
}
