/* WORLD ARENA — Tournament Bracket Viewer */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --tb-bg: #030712;
    --tb-glass: rgba(12, 22, 40, 0.65);
    --tb-border: rgba(255, 255, 255, 0.08);
    --tb-orange: #f97316;
    --tb-blue: #3b82f6;
    --tb-green: #22c55e;
    --tb-red: #ef4444;
    --tb-gold: #fbbf24;
    --tb-text: #e2e8f0;
    --tb-muted: #64748b;
    --tb-white: #f8fafc;
    --tb-radius: 16px;
    --tb-radius-sm: 10px;
    --tb-container: min(1200px, 94vw);
    --tb-gap: 2.5rem;
}

html { scroll-behavior: smooth; }

.tb-body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    background: var(--tb-bg);
    color: var(--tb-text);
    -webkit-font-smoothing: antialiased;
}

.tb-page {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 80% 50% at 50% -5%, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(ellipse 50% 35% at 100% 30%, rgba(249, 115, 22, 0.07), transparent),
        var(--tb-bg);
}

/* Header */
.tb-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 7, 18, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--tb-border);
}

.tb-header-inner {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 0.85rem 3vw;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.tb-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}

.tb-brand-tag {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    color: var(--tb-orange);
}

.tb-nav {
    display: flex;
    gap: 0.15rem;
    flex: 1;
    flex-wrap: wrap;
}

.tb-nav a {
    padding: 0.45rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tb-muted);
    text-decoration: none;
    border-radius: 6px;
}

.tb-nav a:hover,
.tb-nav a.is-active {
    color: var(--tb-white);
    background: rgba(255, 255, 255, 0.05);
}

.tb-header-actions { display: flex; gap: 0.5rem; }

.tb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 999px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s;
}

.tb-btn:hover { transform: translateY(-1px); }
.tb-btn.sm { padding: 0.4rem 0.85rem; font-size: 0.72rem; }

.tb-btn--live {
    background: rgba(239, 68, 68, 0.18);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.tb-btn--ghost {
    background: transparent;
    border: 1px solid var(--tb-border);
    color: var(--tb-text);
}

.tb-btn--primary { background: var(--tb-orange); color: #fff; }

.tb-btn--glass {
    background: var(--tb-glass);
    border: 1px solid var(--tb-border);
    color: var(--tb-text);
    backdrop-filter: blur(8px);
}

.tb-btn--outline {
    background: transparent;
    border: 1px solid rgba(249, 115, 22, 0.45);
    color: var(--tb-orange);
}

.tb-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    margin-left: auto;
}

.tb-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--tb-text);
}

/* Main */
.tb-main {
    max-width: var(--tb-container);
    margin: 0 auto;
    padding: 1.75rem 3vw 5rem;
    display: flex;
    flex-direction: column;
    gap: var(--tb-gap);
}

.tb-section-title {
    margin: 0 0 1.25rem;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

.tb-section-title--center { text-align: center; }

/* Hero */
.tb-hero {
    position: relative;
    border-radius: var(--tb-radius);
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.2);
    background: linear-gradient(160deg, rgba(59, 130, 246, 0.1) 0%, var(--tb-glass) 50%, rgba(3, 7, 18, 0.95) 100%);
    box-shadow: 0 0 64px rgba(59, 130, 246, 0.06);
}

.tb-hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 70% 20%, rgba(249, 115, 22, 0.1), transparent);
    pointer-events: none;
}

.tb-hero-inner {
    position: relative;
    padding: 2.5rem 2rem;
    text-align: center;
}

.tb-hero-badge {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.85rem;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 999px;
}

.tb-hero-inner h1 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0.04em;
    color: var(--tb-white);
}

.tb-hero-stage {
    margin: 0 0 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-orange);
}

.tb-hero-sub {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    color: var(--tb-muted);
}

.tb-hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tb-hero-stats div {
    text-align: center;
    min-width: 80px;
}

.tb-hero-stats strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--tb-white);
}

.tb-hero-stats span {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

/* Filters */
.tb-filters {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.tb-filter-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.tb-filter-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tb-muted);
    min-width: 3.5rem;
}

.tb-filter-tabs {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
    overflow-x: auto;
    scrollbar-width: none;
}

.tb-filter-tabs::-webkit-scrollbar { display: none; }

.tb-filter-tab {
    flex-shrink: 0;
    padding: 0.45rem 0.85rem;
    font-size: 0.72rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--tb-muted);
    background: var(--tb-glass);
    border: 1px solid var(--tb-border);
    border-radius: 999px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.tb-filter-tab:hover,
.tb-filter-tab.is-active {
    color: var(--tb-white);
    border-color: rgba(249, 115, 22, 0.4);
    background: rgba(249, 115, 22, 0.1);
}

/* Bracket */
.tb-bracket-scroll {
    overflow-x: auto;
    padding-bottom: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, 0.3) transparent;
}

.tb-bracket {
    display: flex;
    gap: 2rem;
    min-width: min-content;
    padding: 0.5rem 0;
}

.tb-bracket-col {
    flex: 0 0 220px;
    display: flex;
    flex-direction: column;
}

.tb-bracket-col.is-hidden { display: none; }

.tb-bracket-round {
    margin: 0 0 1rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tb-orange);
    text-align: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.tb-bracket-matches {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: space-around;
    flex: 1;
}

.tb-match-card {
    position: relative;
    padding: 0.85rem;
    background: var(--tb-glass);
    backdrop-filter: blur(8px);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.tb-match-card.is-live {
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 0 32px rgba(239, 68, 68, 0.1);
}

.tb-match-card.is-done {
    border-color: rgba(34, 197, 94, 0.2);
}

.tb-match-live-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #fca5a5;
}

.tb-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tb-red);
    box-shadow: 0 0 6px var(--tb-red);
    animation: tb-pulse 1.5s ease infinite;
}

@keyframes tb-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.tb-match-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tb-match-team.is-winner {
    background: rgba(34, 197, 94, 0.12);
    color: #4ade80;
    box-shadow: inset 3px 0 0 var(--tb-green);
}

.tb-match-team.is-loser {
    opacity: 0.55;
}

.tb-match-team strong {
    font-size: 0.9rem;
    font-weight: 800;
}

.tb-match-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--tb-border);
}

.tb-match-status.done {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #4ade80;
}

.tb-match-time {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--tb-orange);
}

.tb-match-action {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--tb-blue);
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}

.tb-match-action.primary { color: #fca5a5; }
.tb-match-action.reminder { color: var(--tb-muted); }

.tb-match-action:hover { color: var(--tb-white); }

/* Featured live */
.tb-featured-live {
    position: relative;
    border-radius: var(--tb-radius);
    overflow: hidden;
    border: 1px solid rgba(239, 68, 68, 0.35);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), var(--tb-glass));
}

.tb-featured-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(239, 68, 68, 0.15), transparent);
    pointer-events: none;
}

.tb-featured-inner {
    position: relative;
    padding: 2rem;
    text-align: center;
}

.tb-featured-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #fca5a5;
    margin-bottom: 0.75rem;
}

.tb-featured-inner h2 {
    margin: 0 0 0.35rem;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 800;
    color: var(--tb-white);
}

.tb-featured-inner h2 span {
    margin: 0 0.4rem;
    font-weight: 600;
    color: var(--tb-muted);
    font-size: 0.85em;
}

.tb-featured-inner > p {
    margin: 0 0 1rem;
    font-size: 0.82rem;
    color: var(--tb-muted);
}

.tb-featured-score {
    margin-bottom: 1.25rem;
}

.tb-featured-score span {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    color: var(--tb-white);
    letter-spacing: 0.06em;
}

.tb-featured-score time {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--tb-orange);
}

.tb-featured-actions {
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

/* Split sections */
.tb-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--tb-gap);
}

.tb-upcoming-list,
.tb-results-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tb-upcoming-card,
.tb-result-card {
    padding: 1.1rem 1.25rem;
    background: var(--tb-glass);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
}

.tb-upcoming-card.is-next {
    border-color: rgba(249, 115, 22, 0.35);
}

.tb-upcoming-tag {
    display: block;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-orange);
    margin-bottom: 0.35rem;
}

.tb-upcoming-card strong,
.tb-result-card strong {
    display: block;
    font-size: 0.9rem;
    color: var(--tb-white);
    margin-bottom: 0.25rem;
}

.tb-upcoming-card strong span {
    margin: 0 0.35rem;
    color: var(--tb-muted);
    font-weight: 600;
}

.tb-upcoming-card > span {
    display: block;
    font-size: 0.72rem;
    color: var(--tb-muted);
    margin-bottom: 0.25rem;
}

.tb-upcoming-card time {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--tb-orange);
}

.tb-result-mvp {
    display: block;
    font-size: 0.78rem;
    color: var(--tb-gold);
    font-weight: 600;
    margin-bottom: 0.65rem;
}

.tb-result-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Info grid */
.tb-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
}

.tb-info-card {
    padding: 1.25rem;
    background: var(--tb-glass);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius-sm);
}

.tb-info-card.wide {
    grid-column: span 3;
}

.tb-info-card span {
    display: block;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-muted);
    margin-bottom: 0.35rem;
}

.tb-info-card strong {
    font-size: 0.9rem;
    color: var(--tb-white);
}

/* Sponsors */
.tb-sponsor-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.tb-sponsor-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: var(--tb-glass);
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
}

.tb-sponsor-icon {
    display: block;
    font-size: 1.15rem;
    color: var(--tb-orange);
    margin-bottom: 0.45rem;
}

.tb-sponsor-logo {
    display: block;
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.45rem;
    object-fit: contain;
}

.tb-sponsor-role {
    display: block;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--tb-muted);
    margin-bottom: 0.35rem;
}

.tb-sponsor-card strong {
    font-size: 0.92rem;
    color: var(--tb-white);
}

/* Share */
.tb-share {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.06), rgba(59, 130, 246, 0.06));
    border: 1px solid var(--tb-border);
    border-radius: var(--tb-radius);
}

.tb-share h2 {
    margin: 0 0 1.25rem;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--tb-white);
}

.tb-share-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

/* Responsive */
@media (max-width: 900px) {
    .tb-split,
    .tb-info-grid,
    .tb-sponsor-row {
        grid-template-columns: 1fr;
    }

    .tb-info-card.wide { grid-column: span 1; }
}

@media (max-width: 768px) {
    .tb-nav,
    .tb-header-actions { display: none; }

    .tb-menu-toggle { display: flex; }

    .tb-header-inner.is-open .tb-nav,
    .tb-header-inner.is-open .tb-header-actions {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(3, 7, 18, 0.98);
        padding: 1rem 3vw;
        border-bottom: 1px solid var(--tb-border);
    }

    .tb-header-inner { position: relative; flex-wrap: wrap; }

    .tb-bracket-col { flex: 0 0 200px; }
}
