@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700;900&display=swap');

@font-face {
    font-family: 'Bebas Neue Cyrillic';
    src: url('https://cdn.jsdelivr.net/gh/Scrum/font-bebas-neue@master/fonts/BebasNeue.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/Scrum/font-bebas-neue@master/fonts/BebasNeue.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* ── Base: browser default font-size (16px) is the best mobile baseline.
   Custom px values caused Tailwind rem units to drift on Android. ── */
html {
    /* No font-size override — let the browser/user decide (accessibility) */
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    /* Smooth momentum scrolling on iOS/Android */
    -webkit-overflow-scrolling: touch;
    /* Prevent elastic over-scroll bounce from causing layout jumps */
    overscroll-behavior-y: none;
}

body {
    /* Prevent the page itself from bouncing / rubber-banding on mobile */
    overscroll-behavior-y: none;
    /* Clip any stray elements that would cause horizontal scroll */
    overflow-x: hidden;
}

html, body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    letter-spacing: 0.015em !important;
    word-spacing: normal !important;
    line-height: 1.5 !important;
}

/* Headings and Bebas-theme elements adjustment */
h1, h2, h3, h4, h5, h6, button, a, .category-tab, .ticker-content {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.06em !important;
    line-height: 1.2 !important;
}

.font-bebas {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.05em !important;
}

/* Secondary subtext visibility and scaling adjustments */
p, .text-gray-400, .text-slate-400, .text-slate-550, .text-slate-500 {
    font-family: 'Inter', system-ui, -apple-system, sans-serif !important;
    letter-spacing: 0.015em !important;
    word-spacing: normal !important;
}

/* Prevent Font Awesome icons from being overridden by generic styling */
i[class^="fa-"], i[class*=" fa-"], .fa-solid, .fa-regular, .fa-brands, .fa, .fas, .far, .fab {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", sans-serif !important;
}

/* Responsive adjustments for mobile touch-targets and readability */
@media (max-width: 640px) {
    h1 {
        font-size: clamp(3.8rem, 14vw, 6rem) !important;
        line-height: 1.05 !important;
        letter-spacing: 0.02em !important;
    }
    p {
        line-height: 1.5 !important;
    }
    button, a {
        min-height: 44px; /* Decent mobile touch target size */
    }
}

/* Custom Theme for the Plyr Video Player Interface */
:root {
    --plyr-color-main: #8b5cf6; /* Premium Violet Theme */
    --plyr-video-background: #000000;
    --plyr-menu-background: #262626; /* Matches sumpPanel (#262626) */
    --plyr-menu-color: #e5e7eb;
    --plyr-menu-radius: 12px;
    --plyr-control-radius: 8px;
}

/* Smooth UI Transitions */
.fade-enter {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.fade-enter-active {
    opacity: 1;
    transform: translateY(0);
}

/* Force 16:9 aspect ratio wrapper for Plyr */
.player-wrapper {
    aspect-ratio: 16 / 9;
    position: relative;
    width: 100%;
}

/* Fix Plyr positioning and size inside parent wrapper */
.plyr {
    height: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
}

.plyr__video-wrapper {
    height: 100% !important;
    width: 100% !important;
}

.plyr video {
    height: 100% !important;
    width: 100% !important;
    object-fit: contain !important;
}

/* Keyboard Navigation Accessibility */
button:focus-visible, 
a:focus-visible {
    outline: 2px solid #8b5cf6 !important;
    outline-offset: 2px !important;
}

/* ========== Theme scrollbars (site-wide) ========== */
/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #7c3aed #121212;
}

/* WebKit / Blink (Chrome, Edge, Safari, Android) */
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
*::-webkit-scrollbar-track {
    background: #0d0d0d;
    border-radius: 8px;
}
*::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6 0%, #6d28d9 100%);
    border-radius: 8px;
    border: 2px solid #0d0d0d;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a78bfa 0%, #8b5cf6 100%);
    border: 2px solid #0d0d0d;
    background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:active {
    background: #c4b5fd;
}
*::-webkit-scrollbar-corner {
    background: #0d0d0d;
}

/* Named utility (same theme, slightly tighter) */
.custom-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #121212;
}
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: #0d0d0d;
    border-radius: 6px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #8b5cf6, #6d28d9);
    border-radius: 6px;
    border: 1px solid #0d0d0d;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #a78bfa;
}

/* Hide scrollbar class */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ticker Text Animation for TV layouts */
@keyframes ticker-slide {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-wrap {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker-slide 18s linear infinite;
}

/* Premium Glassmorphism Wrappers */
.glass-premium {
    position: relative;
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transform: translateZ(0); /* GPU acceleration */
}

.glow-ambient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateZ(0);
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
    will-change: transform, opacity;
}

/* Flag Icon Container Helpers */
.flag-icon {
    display: inline-block;
    width: 28px;
    height: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Live dot animation */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #ef4444; /* Red by default */
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

/* Green and glowing when streaming */
.live-dot.streaming {
    background-color: #22c55e; /* Green */
    animation: pulse-dot-green 1.5s infinite;
}

@keyframes pulse-dot-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* Responsive Font Sizes for TV Screen Viewports */
@media (min-width: 1920px) {
    body {
        font-size: 18px;
    }
    .tv-scale {
        transform: scale(1.05);
        transform-origin: top left;
    }
}

/* Category Tab Selector Styling */
.category-tab {
    position: relative;
    cursor: pointer;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 11px !important;
    letter-spacing: 0.05em !important;
    background-color: #1c1917 !important; /* bg-stone-900 */
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #94a3b8 !important; /* text-slate-400 */
    padding: 4px 8px !important;
    border-radius: 7px !important;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: bold;
}
.category-tab.active {
    border-color: rgba(139, 92, 246, 0.4) !important;
    background-color: rgba(139, 92, 246, 0.15) !important;
    color: #c084fc !important;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.1);
}
.category-tab:not(.active):hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Favorites Button Toggle State styling */
.btn-fav-active {
    background-color: rgba(244, 63, 94, 0.1) !important;
    border-color: rgba(244, 63, 94, 0.3) !important;
    color: #fda4af !important;
    box-shadow: 0 0 15px rgba(244, 63, 94, 0.15);
}

/* Framer Motion style animation and glow rules */
@keyframes framer-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.framer-entry {
    animation: framer-slide-up 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Card hover glow and scale enhancements */
.schedule-card {
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

.schedule-card,
.schedule-card *:not(i):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.05em !important;
}

@media (hover: hover) {
    .schedule-card:hover {
        transform: translateY(-4px) scale(1.01) translateZ(0);
        border-color: rgba(139, 92, 246, 0.35) !important;
        box-shadow: 0 12px 30px rgba(139, 92, 246, 0.12), 0 0 1px 1px rgba(139, 92, 246, 0.2) inset !important;
    }
}

/* ========================================== */
/* LANDING PAGE SPECIFIC TYPOGRAPHY */
/* ========================================== */
.landing-page,
.landing-page *:not(i):not([class^="fa-"]):not([class*=" fa-"]) {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.06em !important;
}

/* Adjust paragraph readability for Bebas Neue on the landing page */
.landing-page p {
    font-size: 1.2rem !important;
    letter-spacing: 0.08em !important;
    word-spacing: 0.03em !important;
    line-height: 1.5 !important;
    color: #d1d5db !important; /* Lighter shade for contrast */
}

/* Enhance scale and spacing of TV Remote instructions */
.landing-page .text-slate-500 {
    font-size: 0.9rem !important;
    letter-spacing: 0.08em !important;
    color: #9ca3af !important;
}

/* ========================================== */
/* WATERY INTERACTIVE NEON GLOW EFFECTS */
/* ========================================== */
.glow-blob {
    position: absolute;
    top: 0;
    left: 0;
    width: 750px;
    height: 750px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(217, 70, 239, 0.04) 40%, rgba(139, 92, 246, 0.01) 70%, transparent 100%);
    filter: blur(100px);
    pointer-events: none;
    will-change: transform;
    z-index: 0;
    transform: translate3d(-375px, -375px, 0);
}

.glow-blob-secondary {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, rgba(139, 92, 246, 0.02) 50%, transparent 100%);
    filter: blur(120px);
    top: 25%;
    left: 75%;
    animation: float-slow 20s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes float-slow {
    0% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(-60px, 40px) scale(1.08);
    }
    100% {
        transform: translate(40px, -60px) scale(0.95);
    }
}

/* Custom responsive scaling and tracking for nav logo brand text */
.logo-text {
    letter-spacing: 0.02em !important;
    font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
}

/* Live Match Schedule Queue Styles */
.hero-match-card {
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.4) 0%, rgba(26, 26, 26, 0.65) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 16px 48px 0 rgba(0, 0, 0, 0.5), 0 0 2px 1px rgba(139, 92, 246, 0.2) inset;
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

@media (hover: hover) {
    .hero-match-card:hover {
        transform: translateY(-4px) scale(1.005) translateZ(0);
        border-color: rgba(139, 92, 246, 0.45) !important;
        box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15), 0 0 2px 2px rgba(139, 92, 246, 0.3) inset !important;
    }
}

.hero-countdown-wrapper {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.1em !important;
    text-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
}

.sub-match-card {
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    will-change: transform;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
}

@media (hover: hover) {
    .sub-match-card:hover {
        transform: translateY(-4px) scale(1.01) translateZ(0);
        border-color: rgba(139, 92, 246, 0.3) !important;
        box-shadow: 0 12px 30px rgba(139, 92, 246, 0.1), 0 0 1px 1px rgba(139, 92, 246, 0.15) inset !important;
    }
}

/* Ensure consistent Bebas Neue font for active and inactive tabs, and scale to fit */
#tabChannels, #tabChat {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.08em !important;
}

/* ========================================== */
/* BESPOKE NON-AI AESTHETIC & PERFORMANCE RULES */
/* ========================================== */

/* Digital tech-grid background overlay — desktop only to save paint on mobile */
@media (min-width: 768px) {
    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-image: 
            linear-gradient(rgba(255, 255, 255, 0.007) 1px, transparent 1px),
            linear-gradient(90deg, rgba(255, 255, 255, 0.007) 1px, transparent 1px);
        background-size: 30px 30px;
        pointer-events: none;
        z-index: 1;
    }
}

/* Monospaced digital telemetry for a custom developer/engineered look */
#diagResolution, 
#diagFpsBuffer, 
#diagBandwidth, 
#diagEngine,
#syncTime,
.font-mono-telemetry {
    font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
    font-size: 0.9em;
    letter-spacing: 0.02em !important;
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* CSS Containment to isolate high-frequency DOM repaints for 60FPS scrolling on Android */
#channelList, 
#messageLog {
    contain: content;
    will-change: transform;
}

/* Improved Touch targets and alignment for Mobile Viewports */
@media (max-width: 768px) {
    .glass-premium {
        padding: 4px !important;
    }
    input, button, select, textarea {
        font-size: 14px !important; /* Prevents auto-zoom on iOS/Android */
    }
}

/* Scoreboard specific typography using Bebas Neue */
.hero-match-card .grid span,
.sub-match-card .grid span {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.08em !important;
}

/* Adjust size for hero scoreboard */
.hero-match-card .col-span-3 span {
    font-size: clamp(1.2rem, 3vw, 1.8rem) !important;
    line-height: 1.1 !important;
}
.hero-match-card .col-span-1 span {
    font-size: clamp(1.5rem, 4vw, 2.2rem) !important;
    padding: 8px 20px !important;
    letter-spacing: 0.05em !important;
}

/* Adjust size for sub matches scoreboard */
.sub-match-card .col-span-3 span {
    font-size: clamp(0.85rem, 1.8vw, 1.05rem) !important;
    line-height: 1.1 !important;
}
.sub-match-card .col-span-1 span {
    font-size: clamp(1.2rem, 2vw, 1.5rem) !important;
    letter-spacing: 0.05em !important;
}/* ========================================== */
/* PREDICTIONS & STANDINGS WIDGET STYLING     */
/* ========================================== */

/* Prediction Widget */
.predict-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(26, 26, 26, 0.5);
    border: 1px solid rgba(139, 92, 246, 0.2);
}
.predict-btn:hover {
    background: rgba(139, 92, 246, 0.15);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}
.predict-btn.active-vote {
    background: rgba(139, 92, 246, 0.35) !important;
    border-color: #a78bfa !important;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

.predict-bar-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    overflow: hidden;
    height: 38px;
    border-radius: 12px;
}

.predict-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Standings Tabs & Table */
.group-tab-btn {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.05em !important;
    font-size: 0.9rem !important;
    transition: all 0.2s ease;
}
.group-tab-btn.active {
    background: rgba(139, 92, 246, 0.2) !important;
    border-color: rgba(139, 92, 246, 0.5) !important;
    color: #c084fc !important;
}

.standings-table-container {
    background: rgba(26, 26, 26, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.standings-table th {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    letter-spacing: 0.08em !important;
    color: #94a3b8;
    font-size: 0.95rem;
}

.standings-row {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background-color 0.2s ease;
}
.standings-row:last-child {
    border-bottom: none;
}
.standings-row:hover {
    background: rgba(255, 255, 255, 0.02);
}
.standings-row.highlight-team {
    background: rgba(139, 92, 246, 0.05);
    border-left: 3px solid #8b5cf6;
}





/* site header readability */
.logo-text {
    font-size: clamp(1.15rem, 4vw, 1.75rem) !important;
    line-height: 1.1 !important;
}

/* Optimize images & paint */
img {
    max-width: 100%;
    height: auto;
}

/* ── Ad containers: prevent 728×90 fixed-width iframes from causing
   horizontal overflow on phones. The inner div scales down via max-width. ── */
.ad-banner-728 {
    width: 728px;
    max-width: 100%;
    height: 90px;
    overflow: hidden;
}
.ad-banner-728 iframe,
.ad-banner-728 > * {
    max-width: 100%;
}

/* ── channels.html: control button row wraps on narrow screens ── */
.stream-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.stream-controls button {
    flex-shrink: 0;
    min-height: 36px;
    white-space: nowrap;
}

/* ── channels.html sidebar: channel list is always single-column inside
   the narrow sidebar, regardless of viewport width ── */
#channelList {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px;
}


/* Stable Bebas on interactive UI - prevents layout shift on click/active */
button, .nav-btn, .site-nav a, .site-nav button,
.filter-chip, .cat-chip, .sub-chip, .genre-btn, .special-btn, .nav-cat, .nav-sub,
.category-tab, a.movie-card, .movie-card__title {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    letter-spacing: 0.06em !important;
    -webkit-tap-highlight-color: transparent;
}

button:active, button:focus, a:active, a:focus,
.filter-chip:active, .cat-chip:active, .sub-chip:active {
    font-family: 'Bebas Neue', 'Bebas Neue Cyrillic', sans-serif !important;
    font-weight: 400 !important;
    font-style: normal !important;
    outline: none;
}

/* Smooth momentum scrolling on all scrollable containers (Android / iOS) */
.custom-scrollbar, #featuredMovies, #moviesGrid, #channelList, #messageLog {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

/* Honour reduced-motion preference — only disable decorative animations,
   NOT scroll-behavior (smooth scroll is not animation in the WCAG sense) */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    /* keep smooth scroll working even with reduced-motion */
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}
