@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400&family=Jost:wght@300;400;500;600;700&display=swap');

/* Enforce the exact gap on the bracket container to align with lines */
#bracket-container {
    gap: 180px !important;
}

body {
    /* Beautiful AI background with dark overlay for Dark Mode */
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(0, 0, 0, 0.9)), url('bg.png') no-repeat center center fixed;
    background-size: cover;
    color: #f8fafc;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Light Mode Overrides */
body.light-mode {
    background: transparent !important;
    color: #0f172a;
}

/* Base Light Gradient (Bottom Layer) */
body.light-mode::after {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    z-index: -2;
    pointer-events: none;
}

/* Inverted Court Texture (Middle Layer - turns white lines to dark slate for high contrast) */
body.light-mode::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    filter: invert(1) opacity(0.28) !important; /* Invert white lines to dark gray, 28% opacity */
    z-index: -1;
    pointer-events: none;
}

/* Premium Light Mode Glassmorphism Overrides */
/* Panels (Admin & TV Bracket) */
body.light-mode .bg-black\/40,
body.light-mode .bg-black\/60,
body.light-mode .bg-gray-900,
body.light-mode .bg-hotel-dark {
    background-color: rgba(255, 255, 255, 0.75) !important;
    backdrop-filter: blur(25px) !important;
    border: 1px solid rgba(212, 175, 55, 0.4) !important; /* Gold tint border */
    box-shadow: 0 15px 35px rgba(0,0,0,0.06) !important;
}

/* Modal Inner Cards (Team 1 & Team 2 Cards) */
body.light-mode .bg-black\/30 {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04) !important;
}

/* Inner scoring wrapper (Game 1-3 box) */
body.light-mode .bg-black\/20 {
    background-color: rgba(0, 0, 0, 0.02) !important;
    border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

/* Modal Overlay (Should remain dark to dim the background) */
body.light-mode .bg-black\/80 {
    background-color: rgba(15, 23, 42, 0.65) !important; /* Slate dark */
    backdrop-filter: blur(10px) !important;
}

/* Input Fields & Inner Cards */
body.light-mode .bg-black\/50 {
    background-color: rgba(255, 255, 255, 1) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #0f172a !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02) !important;
}

body.light-mode .bg-black\/50:focus {
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

body.light-mode .border-white\/10,
body.light-mode .border-white\/20,
body.light-mode .border-white\/5 {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Text Colors */
body.light-mode .text-white {
    color: #0f172a !important;
}

body.light-mode .text-gray-400,
body.light-mode .text-gray-300,
body.light-mode .text-gray-500 {
    color: #334155 !important; /* Darker slate for high contrast */
}

/* Icons & Buttons */
body.light-mode .bg-white\/10 {
    background-color: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    color: #0f172a !important;
}

body.light-mode .hover\:bg-white\/20:hover {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

body.light-mode .text-blue-400 {
    color: #1d4ed8 !important; /* Darker blue for contrast */
}

body.light-mode .text-hotel-gold {
    color: #b89018 !important; /* Darker gold for contrast */
}

/* Save / Update Button in Light Mode (High Contrast Gold) */
body.light-mode .bg-hotel-gold\/20 {
    background-color: #b89018 !important; /* Solid dark gold */
    color: #ffffff !important; /* White text for perfect contrast */
    border: none !important;
    box-shadow: 0 4px 12px rgba(184, 144, 24, 0.3) !important;
}

body.light-mode .bg-hotel-gold\/20:hover {
    background-color: #9a7610 !important;
    box-shadow: 0 6px 16px rgba(184, 144, 24, 0.4) !important;
}

/* Cancel Button in Light Mode */
body.light-mode #btn-cancel-modal {
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #334155 !important;
}

body.light-mode #btn-cancel-modal:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* Remove keyframes since we use static image now */

.custom-scrollbar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.2);
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(212, 175, 55, 0.8);
}

/* Glassmorphism Bracket */
.bracket-wrapper {
    display: flex;
    gap: 3rem;
    height: 100%;
}

.bracket-round {
    display: flex;
    flex-direction: column;
    min-width: 320px;
    position: relative;
    height: auto;
}

.round-header {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.round-matches-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 920px;
    position: relative;
    padding: 0.5rem 0;
}

/* Card Container */
.bracket-match {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-left: 4px solid rgba(255, 255, 255, 0.15);
    border-radius: 0.85rem;
    width: 320px;
    position: relative;
    box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.bracket-match:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 40px -15px rgba(0, 0, 0, 0.75), 0 0 25px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.45);
}

body.light-mode .bracket-match {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(212, 175, 55, 0.35);
    border-left: 4px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06);
}

body.light-mode .bracket-match:hover {
    transform: translateY(-4px);
    box-shadow: 0 25px 40px -15px rgba(0, 0, 0, 0.12), 0 0 25px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.75);
}

.bracket-match.completed {
    border-left-color: rgba(212, 175, 55, 0.5);
    opacity: 0.95;
}

body.light-mode .bracket-match.completed {
    border-left-color: rgba(212, 175, 55, 0.5);
}

.bracket-match.completed.has-winner {
    border-left-color: #D4AF37;
}

body.light-mode .bracket-match.completed.has-winner {
    border-left-color: #b89018;
}

/* Waiting / Placeholder match cards */
.bracket-match.waiting-match {
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.25);
    opacity: 0.7;
    box-shadow: none;
    border-left-style: solid;
}

body.light-mode .bracket-match.waiting-match {
    border-color: rgba(0, 0, 0, 0.18);
    background: rgba(255, 255, 255, 0.5);
}

.bracket-match.waiting-match:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(212, 175, 55, 0.25) !important;
}

/* Team Rows */
.bracket-team {
    padding: 0.65rem 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.2s;
}

body.light-mode .bracket-team {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.bracket-team:last-child {
    border-bottom: none;
}

.bracket-team.winner {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.12) 0%, rgba(212, 175, 55, 0.02) 100%);
    color: #D4AF37;
    font-weight: 700;
}

body.light-mode .bracket-team.winner {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.08) 0%, rgba(212, 175, 55, 0.01) 100%);
    color: #b89018;
}

.bracket-team.winner .bracket-score {
    background: #D4AF37 !important;
    color: #0f172a !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

body.light-mode .bracket-team.winner .bracket-score {
    background: #b89018 !important;
    color: #ffffff !important;
    box-shadow: 0 0 8px rgba(184, 144, 24, 0.3);
}

.bracket-team.loser {
    opacity: 0.45;
}

/* Score Badge */
.bracket-score {
    font-family: 'Jost', sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    min-width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 4px;
    transition: all 0.2s;
    margin-left: 12px;
}

body.light-mode .bracket-score {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(15, 23, 42, 0.7);
}

/* Team Name Formatting */
.team-name {
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    letter-spacing: 0.02em;
    font-family: 'Jost', sans-serif;
}

.bracket-match.champion-match {
    box-shadow: 0 0 40px rgba(212,175,55,0.8) !important;
    border: 2px solid #D4AF37 !important;
    animation: championPulse 2s infinite;
    transform: scale(1.05);
    z-index: 50;
    background: rgba(212,175,55,0.1);
}

body.light-mode .bracket-match.champion-match {
    box-shadow: 0 10px 40px rgba(184, 144, 24, 0.3) !important;
    border: 2px solid #b89018 !important;
}

@keyframes championPulse {
    0% { box-shadow: 0 0 20px rgba(212,175,55,0.5); }
    50% { box-shadow: 0 0 60px rgba(212,175,55,1); }
    100% { box-shadow: 0 0 20px rgba(212,175,55,0.5); }
}
/* ============================================ */
/* SVG CONNECTOR SYSTEM (replaces broken CSS)   */
/* ============================================ */
/* The SVG overlay is drawn by JavaScript after  */
/* bracket render. No more z-index:-1 issues.    */
#bracket-svg-connectors {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Ensure bracket-match cards are above SVG lines */
.bracket-match {
    z-index: 2;
    position: relative;
}

/* Remove any leftover pseudo-element connectors */
.bracket-match::before,
.bracket-match::after {
    display: none !important;
}

/* SVG line base styling */
.connector-line {
    stroke: rgba(255, 255, 255, 0.12);
    stroke-width: 2.5;
    fill: none;
    transition: stroke 0.3s ease;
}

body.light-mode .connector-line {
    stroke: rgba(15, 23, 42, 0.18);
}

/* Glowing winner connectors */
.connector-line.winner-line {
    stroke: #D4AF37;
    stroke-width: 3.5;
    filter: drop-shadow(0 0 6px rgba(212, 175, 55, 0.6));
}

body.light-mode .connector-line.winner-line {
    stroke: #b89018;
    filter: drop-shadow(0 0 4px rgba(184, 144, 24, 0.4));
}

/* Champion styling */
.champion-box {
    margin-top: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(212,175,55,0.15) 0%, rgba(0,0,0,0.5) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.8);
    border-radius: 1.5rem;
    text-align: center;
    box-shadow: 0 0 30px rgba(212,175,55,0.3);
    animation: pulseGold 3s infinite;
}

body.light-mode .champion-box {
    background: linear-gradient(135deg, rgba(212,175,55,0.2) 0%, rgba(255,255,255,0.8) 100%);
}

.bracket-team.empty {
    color: #475569;
    font-style: italic;
    background: transparent;
    border: 1px dashed rgba(255,255,255,0.1);
}

body.light-mode .bracket-team.empty {
    border: 1px dashed rgba(0,0,0,0.15);
}

/* Light Mode Overrides for text */
body.light-mode .text-white {
    color: #0f172a !important;
}

body.light-mode .text-gray-300 {
    color: #334155 !important;
}

body.light-mode .text-gray-400 {
    color: #475569 !important;
}

body.light-mode .text-gray-500 {
    color: #64748b !important;
}

/* Logo inversion for Light Mode */
body.light-mode .hotel-logo {
    filter: brightness(0); /* Turns white image to black */
}

/* Theme Toggle Button */
.theme-btn-custom {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-family: 'Jost', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.theme-btn-custom:hover {
    background: rgba(212,175,55,0.2);
    border-color: #D4AF37;
}

body.light-mode .theme-toggle {
    background: rgba(0,0,0,0.05);
    border-color: rgba(0,0,0,0.1);
    color: #0f172a;
}

body.light-mode .theme-toggle:hover {
    background: rgba(212,175,55,0.1);
    border-color: #D4AF37;
}

/* Admin Panel Light Mode Overrides */
body.light-mode.bg-hotel-dark {
    background: #f8fafc !important;
}
body.light-mode header.bg-black\/40 {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
body.light-mode header h1 {
    color: #0f172a !important;
    background: none !important;
    -webkit-text-fill-color: initial !important;
}
body.light-mode header .bg-gray-700 {
    background-color: rgba(0,0,0,0.1) !important;
}
body.light-mode .bg-gray-800 {
    background-color: white !important;
    color: #1e293b !important;
    border-color: rgba(0,0,0,0.1) !important;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05) !important;
}
body.light-mode .bg-gray-900,
body.light-mode .bg-gray-900\/50 {
    background-color: #f1f5f9 !important;
}
body.light-mode .text-gray-400 {
    color: #64748b !important;
}
body.light-mode .text-gray-300 {
    color: #475569 !important;
}
body.light-mode .text-white {
    color: #0f172a !important;
}
body.light-mode input.bg-gray-700, 
body.light-mode select.bg-gray-700 {
    background-color: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
}
body.light-mode input:focus, 
body.light-mode select:focus {
    background-color: white !important;
    border-color: #D4AF37 !important;
    box-shadow: 0 0 0 2px rgba(212,175,55,0.2) !important;
}
body.light-mode .border-gray-700,
body.light-mode .border-gray-800 {
    border-color: #e2e8f0 !important;
}
body.light-mode .divide-gray-800 > :not([hidden]) ~ :not([hidden]) {
    border-color: #e2e8f0 !important;
}
body.light-mode .text-blue-400 {
    color: #2563eb !important;
}
body.light-mode .hover\:bg-gray-700:hover {
    background-color: #f1f5f9 !important;
}
body.light-mode .text-green-400 {
    color: #059669 !important;
}
body.light-mode .text-red-400 {
    color: #dc2626 !important;
}
body.light-mode .bracket-score.text-hotel-gold {
    color: #a17a00 !important;
}
body.light-mode .bracket-score.text-blue-400 {
    color: #2563eb !important;
}

/* Light Mode Waiting Room UI Enhancements - Premium Edition */
body.light-mode .title-ri {
    background-image: linear-gradient(to right, #b91c1c, #dc2626, #b91c1c) !important;
    filter: drop-shadow(0 4px 6px rgba(220, 38, 38, 0.3)) !important;
}

body.light-mode .subtitle-ri {
    color: #334155 !important;
    font-weight: 500;
}

body.light-mode .badge-ri {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(220, 38, 38, 0.4) !important;
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.15), inset 0 0 10px rgba(255,255,255,1) !important;
}

body.light-mode .badge-ri .text-white {
    color: #991b1b !important;
}

body.light-mode .card-empty-ri,
body.light-mode .card-ri {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.85) 100%) !important;
    border: 1px solid rgba(226, 232, 240, 1) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    backdrop-filter: blur(20px) !important;
}

body.light-mode .card-ri:hover {
    box-shadow: 0 25px 50px rgba(220, 38, 38, 0.15), inset 0 1px 0 rgba(255, 255, 255, 1) !important;
    border-color: rgba(220, 38, 38, 0.4) !important;
}

body.light-mode .card-ri-border {
    border-color: rgba(226, 232, 240, 1) !important;
}

body.light-mode .card-ri-bar {
    background: linear-gradient(to right, #dc2626, #fca5a5) !important;
}

body.light-mode .badge-small-ri {
    color: #b91c1c !important;
    background-color: rgba(254, 226, 226, 0.8) !important;
    border-color: rgba(252, 165, 165, 1) !important;
}

body.light-mode .card-empty-ri .text-white,
body.light-mode .card-ri .text-white {
    color: #0f172a !important;
}

body.light-mode .card-empty-ri .text-gray-400,
body.light-mode .card-ri .text-gray-400 {
    color: #475569 !important;
}

/* Ambient Particles */
.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,0.4) 0%, rgba(212,175,55,0) 70%);
    box-shadow: 0 0 20px 10px rgba(212,175,55,0.1);
    animation: drift linear infinite;
    pointer-events: none;
    opacity: 0.5;
}

body.light-mode .particle {
    background: radial-gradient(circle, rgba(212,175,55,0.3) 0%, rgba(212,175,55,0) 70%);
    box-shadow: 0 0 20px 10px rgba(212,175,55,0.2);
}

@keyframes drift {
    0% { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
    10% { opacity: 0.6; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-100vh) translateX(100px) rotate(360deg); opacity: 0; }
}

.p1 { width: 100px; height: 100px; left: 10%; bottom: -100px; animation-duration: 25s; animation-delay: 0s; }
.p2 { width: 150px; height: 150px; left: 30%; bottom: -150px; animation-duration: 35s; animation-delay: 5s; }
.p3 { width: 60px; height: 60px; left: 50%; bottom: -60px; animation-duration: 20s; animation-delay: 2s; }
.p4 { width: 200px; height: 200px; left: 70%; bottom: -200px; animation-duration: 45s; animation-delay: 8s; }
.p5 { width: 80px; height: 80px; left: 85%; bottom: -80px; animation-duration: 28s; animation-delay: 12s; }
.p6 { width: 120px; height: 120px; left: 20%; bottom: -120px; animation-duration: 32s; animation-delay: 15s; }
.p7 { width: 70px; height: 70px; left: 60%; bottom: -70px; animation-duration: 22s; animation-delay: 18s; }
.p8 { width: 180px; height: 180px; left: 40%; bottom: -180px; animation-duration: 40s; animation-delay: 25s; }

/* ==========================================================================
   NEW UI IMPROVEMENTS (#1, #2, #3, #7, #10)
   ========================================================================== */

/* #1: Seed Number Styling */
.seed-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.1);
    padding: 1px 4px;
    border-radius: 3px;
    margin-right: 6px;
    font-family: 'Jost', sans-serif;
    display: inline-block;
    vertical-align: middle;
}

body.light-mode .seed-number {
    color: rgba(15, 23, 42, 0.6);
    background: rgba(0, 0, 0, 0.06);
}

/* #2: Team & Player Info Layout */
.team-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
    min-width: 0; /* allows truncation */
}

.team-name-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.team-players {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 400;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 210px;
    font-family: 'Jost', sans-serif;
}

body.light-mode .team-players {
    color: #475569;
}

/* #3: Live Match Indicator */
.live-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    z-index: 10;
    animation: livePulse 2s infinite;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    animation: blink 1s infinite alternate;
}

@keyframes livePulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes blink {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* #7: Score Detail Line */
.score-detail-line {
    font-size: 0.75rem;
    color: #D4AF37;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
}

body.light-mode .score-detail-line {
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: #b89018;
}

/* #10: Match Detail Modal for TV Portal */
#match-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#match-detail-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(12px);
}

.detail-card {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 500px;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 175, 55, 0.1);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: white;
}

#match-detail-modal.show .detail-card {
    transform: scale(1);
}

body.light-mode .detail-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 0 30px rgba(212, 175, 55, 0.1);
    color: #0f172a;
}

.detail-round-label {
    text-align: center;
    font-size: 0.85rem;
    font-weight: 750;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #D4AF37;
    margin-bottom: 1.5rem;
    font-family: 'Jost', sans-serif;
}

body.light-mode .detail-round-label {
    color: #b89018;
}

.detail-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}

.detail-team {
    flex: 1;
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
}

body.light-mode .detail-team {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.detail-team-name {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Jost', sans-serif;
}

.detail-team-players {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
    font-family: 'Jost', sans-serif;
}

body.light-mode .detail-team-players {
    color: #475569;
}

.detail-winner-team {
    border-color: #D4AF37;
    background: rgba(212, 175, 55, 0.05);
}

body.light-mode .detail-winner-team {
    border-color: #b89018;
    background: rgba(212, 175, 55, 0.08);
}

.detail-vs {
    font-weight: 900;
    font-style: italic;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.2);
    font-family: 'Jost', sans-serif;
}

body.light-mode .detail-vs {
    color: rgba(0, 0, 0, 0.2);
}

.detail-games {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

body.light-mode .detail-games {
    background: rgba(0, 0, 0, 0.03);
}

.detail-game-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Jost', sans-serif;
}

.detail-game-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

body.light-mode .detail-game-label {
    color: #475569;
}

.detail-game-score {
    font-size: 1.15rem;
    font-weight: 500;
    width: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

body.light-mode .detail-game-score {
    color: #64748b;
}

.detail-game-score.score-win {
    color: #D4AF37;
    font-weight: 700;
}

body.light-mode .detail-game-score.score-win {
    color: #b89018;
}

.detail-game-sep {
    color: rgba(255, 255, 255, 0.2);
}

body.light-mode .detail-game-sep {
    color: rgba(0, 0, 0, 0.2);
}

.detail-winner {
    text-align: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #D4AF37;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    font-family: 'Jost', sans-serif;
}

body.light-mode .detail-winner {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.4);
    color: #b89018;
}

.detail-live {
    text-align: center;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    font-family: 'Jost', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.detail-close-btn {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    color: white;
    font-weight: 600;
    font-family: 'Jost', sans-serif;
    transition: all 0.2s;
    cursor: pointer;
}

.detail-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .detail-close-btn {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body.light-mode .detail-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Round Title Glass Badge */
.round-title {
    text-align: center;
    font-family: 'Jost', sans-serif;
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #D4AF37;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 9999px;
    padding: 6px 16px;
    margin-bottom: 24px;
    display: inline-block;
    width: auto;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

body.light-mode .round-title {
    color: #b89018;
    background: rgba(212, 175, 55, 0.06);
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    text-shadow: none;
}

