/* ===================================================================
   TIRB — Torneo Integración Regional de Basquet
   Design System: Vibrant Block-based × Dark OLED × Motion-Driven
   =================================================================== */

/* ── Design Tokens ────────────────────────────────────────────────── */
:root {
    --tirb-orange: #F97316;
    --tirb-orange-light: #FB923C;
    --tirb-orange-deep: #EA580C;
    --tirb-gold: #FBBF24;
    --tirb-gold-light: #FDE68A;
    --tirb-dark: #0F172A;
    --tirb-darker: #020617;
    --tirb-card: #1E293B;
    --tirb-card-hover: #263548;
    --tirb-border: #334155;
    --tirb-border-light: #475569;
    --tirb-text: #F8FAFC;
    --tirb-muted: #94A3B8;
    --tirb-success: #22C55E;
    --tirb-error: #EF4444;
    --tirb-glow-orange: 0 0 40px rgba(249, 115, 22, 0.3), 0 0 80px rgba(249, 115, 22, 0.1);
    --tirb-glow-gold: 0 0 40px rgba(251, 191, 36, 0.3), 0 0 80px rgba(251, 191, 36, 0.1);
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Global ──────────────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    scrollbar-color: var(--tirb-border) var(--tirb-dark);
}

::selection {
    background: rgba(249, 115, 22, 0.35);
    color: #fff;
}

/* Film-grain overlay for atmosphere */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

/* ===================================================================
   ANIMATIONS — Keyframes
   =================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-20px) rotate(3deg); }
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(249,115,22,0.2); }
    50%      { box-shadow: 0 0 40px rgba(249,115,22,0.45), 0 0 80px rgba(249,115,22,0.15); }
}
@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes rotate-slow {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes dash-move {
    to { stroke-dashoffset: -20; }
}
@keyframes count-up {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes hero-text-reveal {
    from { opacity: 0; transform: translateY(30px) skewY(2deg); }
    to   { opacity: 1; transform: translateY(0) skewY(0deg); }
}
@keyframes hero-badge-pop {
    0%   { opacity: 0; transform: scale(0) rotate(-12deg); }
    60%  { transform: scale(1.15) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes border-flow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ── Scroll Reveal Classes ───────────────────────────────────────── */
.reveal-up, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 0;
    will-change: transform, opacity;
}
.reveal-up.revealed    { animation: fadeInUp    0.8s var(--ease-out-expo) forwards; }
.reveal-left.revealed  { animation: fadeInLeft  0.8s var(--ease-out-expo) forwards; }
.reveal-right.revealed { animation: fadeInRight 0.8s var(--ease-out-expo) forwards; }
.reveal-scale.revealed { animation: scaleIn    0.7s var(--ease-out-back) forwards; }

/* ===================================================================
   HERO — Full-screen immersive
   =================================================================== */

/* Basketball court texture background */
.hero-court-bg {
    background-color: #0a0f1d;
    background-image:
        /* Harsh top vignette */
        linear-gradient(180deg,
            rgba(2, 6, 23, 0.95) 0%,
            rgba(15, 23, 42, 0.4) 30%,
            rgba(15, 23, 42, 0.3) 60%,
            rgba(15, 23, 42, 0.95) 100%
        ),
        /* Center court circle */
        radial-gradient(circle at 50% 55%,
            rgba(249, 115, 22, 0.06) 0%,
            rgba(249, 115, 22, 0.03) 15%,
            transparent 35%
        ),
        /* Court sideline glow */
        radial-gradient(ellipse at 50% 90%,
            rgba(249, 115, 22, 0.08) 0%,
            transparent 50%
        ),
        /* Hardwood grain texture */
        repeating-linear-gradient(
            90deg,
            transparent 0px,
            transparent 3px,
            rgba(139, 92, 42, 0.04) 3px,
            rgba(139, 92, 42, 0.04) 4px
        ),
        repeating-linear-gradient(
            0deg,
            transparent 0px,
            transparent 30px,
            rgba(139, 92, 42, 0.02) 30px,
            rgba(139, 92, 42, 0.02) 31px
        );
}

/* Court lines SVG-style overlay */
.court-lines::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        /* Center line */
        linear-gradient(0deg,
            transparent 49.7%,
            rgba(249, 115, 22, 0.08) 49.7%,
            rgba(249, 115, 22, 0.08) 50.3%,
            transparent 50.3%
        ),
        /* Center circle */
        radial-gradient(circle at 50% 50%,
            transparent 12%,
            rgba(249, 115, 22, 0.06) 12%,
            rgba(249, 115, 22, 0.06) 13%,
            transparent 13%
        ),
        /* Three-point arc left */
        radial-gradient(circle at 0% 50%,
            transparent 18%,
            rgba(249, 115, 22, 0.04) 18%,
            rgba(249, 115, 22, 0.04) 19%,
            transparent 19%
        ),
        /* Three-point arc right */
        radial-gradient(circle at 100% 50%,
            transparent 18%,
            rgba(249, 115, 22, 0.04) 18%,
            rgba(249, 115, 22, 0.04) 19%,
            transparent 19%
        );
    pointer-events: none;
}

/* Hero floating basketball */
.hero-basketball {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%,
        rgba(249, 115, 22, 0.12),
        rgba(249, 115, 22, 0.04) 60%,
        transparent 70%
    );
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
    filter: blur(1px);
}

/* Hero animated ring */
.hero-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(249, 115, 22, 0.08);
    animation: rotate-slow 30s linear infinite;
    pointer-events: none;
}
.hero-ring-1 { width: 500px; height: 500px; }
.hero-ring-2 { width: 700px; height: 700px; animation-duration: 45s; animation-direction: reverse; border-color: rgba(251,191,36,0.05); }
.hero-ring-3 { width: 900px; height: 900px; animation-duration: 60s; border-color: rgba(249,115,22,0.04); }

/* Hero text animations */
.hero-title-line {
    overflow: hidden;
}
.hero-title-line > span {
    display: inline-block;
    animation: hero-text-reveal 0.9s var(--ease-out-expo) both;
}
.hero-title-line:nth-child(2) > span { animation-delay: 0.12s; }

.hero-subtitle {
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.3s both;
}
.hero-cta-group {
    animation: fadeInUp 0.8s var(--ease-out-expo) 0.5s both;
}

/* ===================================================================
   GLOW BUTTONS & CTA
   =================================================================== */
.btn-glow, .cta-glow {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.btn-glow::before, .cta-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.15) 50%, transparent 70%);
    background-size: 200% 100%;
    opacity: 0;
    transition: opacity 0.3s;
}
.btn-glow:hover::before, .cta-glow:hover::before {
    opacity: 1;
    animation: shimmer 0.8s ease-out;
}

.btn-glow::after, .cta-glow::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(45deg, var(--tirb-orange), var(--tirb-gold), var(--tirb-orange-deep), var(--tirb-gold));
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s;
    filter: blur(16px);
    animation: border-flow 4s ease infinite;
}
.btn-glow:hover::after, .cta-glow:hover::after {
    opacity: 0.65;
}

/* Gold variant CTA */
.cta-gold {
    background: linear-gradient(135deg, var(--tirb-gold) 0%, #F59E0B 100%);
    color: var(--tirb-darker);
    font-weight: 700;
}
.cta-gold:hover {
    box-shadow: var(--tirb-glow-gold);
    transform: translateY(-2px);
    transition: all 0.3s var(--ease-out-expo);
}

/* ===================================================================
   CARDS — Atmospheric with hover glow
   =================================================================== */
.card-glow {
    position: relative;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    transition: all 0.4s var(--ease-out-expo);
    overflow: hidden;
}
.card-glow::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(249,115,22,0) 0%, rgba(249,115,22,0) 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    transition: background 0.4s;
    pointer-events: none;
}
.card-glow:hover {
    transform: translateY(-6px);
    border-color: rgba(249,115,22,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 30px rgba(249,115,22,0.08);
    background: var(--tirb-card-hover);
}
.card-glow:hover::before {
    background: linear-gradient(135deg, rgba(249,115,22,0.5) 0%, rgba(251,191,36,0.3) 50%, rgba(249,115,22,0) 100%);
}

/* Corner accent for cards */
.card-corner::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(225deg, rgba(249,115,22,0.12) 0%, transparent 60%);
    border-radius: 0 1rem 0 0;
    pointer-events: none;
}

/* ===================================================================
   STAT COUNTER — Animated numbers
   =================================================================== */
.stat-number {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1;
    background: linear-gradient(135deg, var(--tirb-orange) 0%, var(--tirb-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-number.counted {
    animation: count-up 0.6s var(--ease-out-back) forwards;
}

/* ===================================================================
   SECTION DIVIDER — Diagonal slashes
   =================================================================== */
.section-divider {
    position: relative;
}
.section-divider::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom right, transparent 49.5%, var(--tirb-card) 50%);
}
.section-alt::before {
    background: linear-gradient(to bottom right, transparent 49.5%, var(--tirb-dark) 50%);
}

/* ===================================================================
   SECTION HEADER — Styled labels
   =================================================================== */
.section-label {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}
.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: currentColor;
    display: inline-block;
}

/* ===================================================================
   SPORTS TABLE — Reimagined
   =================================================================== */
.sports-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 4px;
}
.sports-table thead th {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    padding: 0.75rem 1rem;
    color: var(--tirb-muted);
    text-align: center;
    border-bottom: none;
    background: transparent;
}
.sports-table thead th:first-child,
.sports-table thead th:nth-child(2) {
    text-align: left;
}
.sports-table tbody tr {
    background: var(--tirb-card);
    transition: all 0.25s;
    border-radius: 0.5rem;
}
.sports-table tbody tr:hover {
    background: var(--tirb-card-hover);
    transform: scale(1.01);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.sports-table tbody td {
    padding: 0.875rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    border: none;
}
.sports-table tbody td:first-child {
    border-radius: 0.5rem 0 0 0.5rem;
    text-align: left;
}
.sports-table tbody td:nth-child(2) {
    text-align: left;
}
.sports-table tbody td:last-child {
    border-radius: 0 0.5rem 0.5rem 0;
}

/* Rank badge for top 4 */
.sports-table tbody tr:nth-child(-n+4) td:first-child {
    color: var(--tirb-gold);
    font-weight: 800;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.1rem;
}
.sports-table tbody tr:first-child {
    background: linear-gradient(90deg, rgba(249,115,22,0.15) 0%, var(--tirb-card) 100%);
    box-shadow: inset 3px 0 0 var(--tirb-orange);
}
.sports-table tbody tr:first-child:hover {
    background: linear-gradient(90deg, rgba(249,115,22,0.22) 0%, var(--tirb-card-hover) 100%);
}
/* PTS column emphasis */
.sports-table tbody td:last-child {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--tirb-text);
}

/* ===================================================================
   PLAYOFF BRACKET
   =================================================================== */
.bracket {
    display: flex;
    gap: 2.5rem;
    align-items: center;
    overflow-x: auto;
    padding: 1.5rem 0;
    scrollbar-width: thin;
}
.bracket-round {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-width: 240px;
}
.bracket-round-title {
    font-family: 'Barlow Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--tirb-muted);
    text-align: center;
    margin-bottom: 0.5rem;
}
.bracket-match {
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 0.75rem;
    overflow: hidden;
    transition: all 0.3s;
}
.bracket-match:hover {
    border-color: rgba(249,115,22,0.3);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.bracket-team {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    font-size: 0.875rem;
    transition: background 0.2s;
}
.bracket-team:first-child {
    border-bottom: 1px solid var(--tirb-border);
}
.bracket-team.winner {
    background: rgba(249,115,22,0.08);
    color: var(--tirb-gold);
    font-weight: 700;
}
.bracket-score {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    min-width: 2.5rem;
    text-align: center;
    color: var(--tirb-text);
}

/* ===================================================================
   CATEGORY BADGES — Pill-style
   =================================================================== */
.badge-cat-a {
    background: linear-gradient(135deg, rgba(249,115,22,0.2) 0%, rgba(249,115,22,0.1) 100%);
    color: var(--tirb-orange);
    border: 1px solid rgba(249,115,22,0.25);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}
.badge-cat-b {
    background: linear-gradient(135deg, rgba(251,191,36,0.2) 0%, rgba(251,191,36,0.1) 100%);
    color: var(--tirb-gold);
    border: 1px solid rgba(251,191,36,0.25);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}
.badge-cat-c {
    background: linear-gradient(135deg, rgba(34,197,94,0.2) 0%, rgba(34,197,94,0.1) 100%);
    color: var(--tirb-success);
    border: 1px solid rgba(34,197,94,0.25);
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.7rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
}

/* ===================================================================
   CATEGORY TABS — Block-based
   =================================================================== */
.category-tab {
    position: relative;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    color: var(--tirb-muted);
    transition: all 0.3s;
}
.category-tab:hover {
    color: var(--tirb-text);
    border-color: var(--tirb-border-light);
    background: var(--tirb-card-hover);
}
.category-tab.active {
    color: var(--tirb-darker);
    background: linear-gradient(135deg, var(--tirb-orange), var(--tirb-orange-deep));
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(249,115,22,0.3);
}

/* Legacy tab-btn support */
.tab-btn {
    position: relative;
    transition: color 0.3s ease;
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--tirb-orange);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}
.tab-btn.active { color: var(--tirb-orange); }
.tab-btn.active::after { transform: scaleX(1); }

/* ===================================================================
   FIXTURE ACCORDION — Enhanced
   =================================================================== */
.fixture-header {
    cursor: pointer;
    user-select: none;
    transition: all 0.25s;
    border-left: 3px solid transparent;
}
.fixture-header:hover {
    background-color: rgba(249, 115, 22, 0.05);
    border-left-color: var(--tirb-orange);
}
.fixture-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s var(--ease-out-expo);
}
.fixture-content.open {
    max-height: 2000px;
}
.fixture-chevron {
    transition: transform 0.35s var(--ease-out-expo);
}
.fixture-content.open ~ .fixture-header .fixture-chevron,
.fixture-header.active .fixture-chevron {
    transform: rotate(180deg);
}

/* ===================================================================
   MATCH CARD — For upcoming matches
   =================================================================== */
.match-card {
    position: relative;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.35s var(--ease-out-expo);
    overflow: hidden;
}
.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--tirb-orange), var(--tirb-gold));
    opacity: 0;
    transition: opacity 0.3s;
}
.match-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249,115,22,0.2);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}
.match-card:hover::before {
    opacity: 1;
}

/* VS badge */
.match-vs {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--tirb-muted);
    position: relative;
}
.match-vs::before,
.match-vs::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 1px;
    background: var(--tirb-border);
}
.match-vs::before { right: 100%; margin-right: 8px; }
.match-vs::after  { left: 100%;  margin-left: 8px; }

/* ===================================================================
   NEWS CARD — Enhanced hover
   =================================================================== */
.news-card {
    position: relative;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.4s var(--ease-out-expo);
}
.news-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249,115,22,0.25);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.news-card .news-image {
    transition: transform 0.6s var(--ease-out-expo);
}
.news-card:hover .news-image {
    transform: scale(1.08);
}
/* Type badge overlay */
.news-type-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 0.375rem;
    background: rgba(15,23,42,0.8);
    backdrop-filter: blur(8px);
    color: var(--tirb-orange);
    border: 1px solid rgba(249,115,22,0.2);
    z-index: 2;
}

/* ===================================================================
   NOTIFICATION TOASTS
   =================================================================== */
.toast {
    animation: slideDown 0.5s var(--ease-out-expo);
    backdrop-filter: blur(8px);
}

/* ===================================================================
   LOGIN PAGE — Atmospheric
   =================================================================== */
.login-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(249,115,22,0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(251,191,36,0.06) 0%, transparent 50%),
        var(--tirb-dark);
}
.login-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, transparent 0px, transparent 3px, rgba(139,92,42,0.03) 3px, rgba(139,92,42,0.03) 4px);
}

.login-card {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid var(--tirb-border);
    border-radius: 1.5rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

.login-input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--tirb-border);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    color: var(--tirb-text);
    transition: all 0.3s;
    font-family: 'Barlow', sans-serif;
}
.login-input::placeholder {
    color: rgba(148, 163, 184, 0.5);
}
.login-input:focus {
    outline: none;
    border-color: var(--tirb-orange);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15), 0 0 20px rgba(249,115,22,0.08);
}

/* ===================================================================
   SCROLLBAR — Minimal
   =================================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--tirb-border);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--tirb-muted);
}

/* ===================================================================
   NAVBAR — Elevated sports-themed header
   =================================================================== */
.navbar-elevated {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}
.navbar-elevated.scrolled {
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(24px) saturate(1.5);
    -webkit-backdrop-filter: blur(24px) saturate(1.5);
    box-shadow: 0 4px 40px rgba(0,0,0,0.4);
}

/* Gradient glow line at bottom of navbar */
.navbar-glow-line {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, var(--tirb-orange) 30%, var(--tirb-gold) 50%, var(--tirb-orange) 70%, transparent 95%);
    opacity: 0.4;
    z-index: 10;
    transition: all 0.5s ease;
}
.navbar-elevated.scrolled .navbar-glow-line {
    opacity: 0.9;
    height: 2px;
    box-shadow: 0 2px 20px rgba(249,115,22,0.25), 0 1px 8px rgba(251,191,36,0.15);
}

/* Vertical accent bar next to logo */
.navbar-accent-bar {
    width: 3px;
    height: 28px;
    background: linear-gradient(to bottom, var(--tirb-orange), var(--tirb-gold));
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 8px rgba(249,115,22,0.3);
    transition: height 0.3s ease;
}
.navbar-elevated.scrolled .navbar-accent-bar {
    height: 24px;
}

/* CTA button — angular/clipped shape */
.navbar-cta {
    clip-path: polygon(8px 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
    border-radius: 0;
}

/* Nav links — subtle hover with bottom dot indicator */
.nav-link-elevated {
    position: relative;
}
.nav-link-elevated::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--tirb-orange), var(--tirb-gold));
    border-radius: 1px;
    transition: all 0.3s var(--ease-out-expo);
    transform: translateX(-50%);
}
.nav-link-elevated:hover::after,
.nav-link-elevated.active::after {
    width: 60%;
}

/* Keep old class for backwards compat */
.nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.25s;
}
.nav-link:hover { color: var(--tirb-orange); }

/* ===================================================================
   FOOTER — Atmospheric
   =================================================================== */
.footer-glow {
    position: relative;
    overflow: hidden;
}
.footer-glow::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--tirb-orange), transparent);
}

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 768px) {
    .bracket { flex-direction: column; }
    .bracket-round { min-width: 100%; }
    .sports-table { font-size: 0.8rem; }
    .sports-table thead th,
    .sports-table tbody td { padding: 0.5rem 0.4rem; }
    .sports-table tbody tr:hover { transform: none; }
    .stat-number { font-size: 2.5rem; }
    .hero-ring { display: none; }
    .hero-basketball { width: 150px; height: 150px; }
}

/* ===================================================================
   ADMIN PANEL ENHANCEMENTS
   =================================================================== */

/* Admin card with subtle glow on hover */
.admin-stat-card {
    position: relative;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.3s var(--ease-out-expo), border-color 0.3s ease, box-shadow 0.3s ease;
}
.admin-stat-card:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 20px rgba(249, 115, 22, 0.05);
}
.admin-stat-card .stat-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s var(--ease-out-expo);
}
.admin-stat-card:hover .stat-icon { transform: scale(1.1); }

/* Admin form inputs enhanced */
.admin-input {
    width: 100%;
    background: var(--tirb-darker);
    border: 1px solid var(--tirb-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--tirb-text);
    font-size: 0.875rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.admin-input:focus {
    outline: none;
    border-color: var(--tirb-orange);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15), 0 0 20px rgba(249, 115, 22, 0.05);
}
.admin-input::placeholder { color: rgba(148, 163, 184, 0.4); }

/* Admin primary button */
.admin-btn-primary {
    background: linear-gradient(135deg, var(--tirb-orange), var(--tirb-orange-deep));
    color: white;
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.2);
    cursor: pointer;
}
.admin-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(249, 115, 22, 0.35);
}

/* Admin secondary button */
.admin-btn-secondary {
    background: transparent;
    border: 1px solid var(--tirb-border);
    color: var(--tirb-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
    cursor: pointer;
}
.admin-btn-secondary:hover {
    border-color: rgba(249, 115, 22, 0.4);
    color: var(--tirb-text);
    background: rgba(249, 115, 22, 0.05);
}

/* Admin danger button */
.admin-btn-danger {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    transition: background 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
}
.admin-btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.25);
}

/* Admin table enhanced */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.admin-table thead tr {
    background: var(--tirb-darker);
}
.admin-table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-family: "Barlow Condensed", sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--tirb-muted);
    border-bottom: 1px solid var(--tirb-border);
}
.admin-table tbody tr {
    transition: background-color 0.2s ease;
}
.admin-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.5);
}
.admin-table tbody td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

/* Admin page header */
.admin-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.admin-page-header h1 {
    font-family: "Barlow Condensed", sans-serif;
    font-weight: 800;
    font-size: 1.875rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Admin list card (for torneos, equipos list items) */
.admin-list-card {
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.admin-list-card:hover {
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Admin form card (form wrapper) */
.admin-form-card {
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    border-radius: 1rem;
    padding: 2rem;
    max-width: 42rem;
    position: relative;
}
.admin-form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 1.5rem;
    right: 1.5rem;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.3), transparent);
}

/* Admin empty state */
.admin-empty-state {
    text-align: center;
    padding: 5rem 1rem;
}
.admin-empty-state .empty-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    border-radius: 1rem;
    background: var(--tirb-card);
    border: 1px solid var(--tirb-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */
@media (prefers-reduced-motion: reduce) {
    .reveal-up, .reveal-left, .reveal-right, .reveal-scale { opacity: 1; }
    .reveal-up.revealed, .reveal-left.revealed,
    .reveal-right.revealed, .reveal-scale.revealed { animation: none; }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .hero-ring, .hero-basketball { display: none; }
    body::after { display: none; }
}
