/* ==========================================================================
   Sportsurge Exact Theme Design System
   ========================================================================== */

:root {
    /* Sportsurge Dark Palette */
    --bg-dark: #1a1a1a;
    --bg-card: #282828;
    --bg-card-hover: #323232;
    --bg-header: #141414;
    --bg-table-head: #1e1e1e;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    
    /* Sportsurge Banner Colors */
    --banner-bg: #d8f3dc;
    --banner-title-color: #1b4332;
    --banner-text-color: #2b533a;

    /* Status Colors */
    --status-live: #ff3b30;
    --status-upcoming: #ff9500;
    --status-finished: #8e8e93;

    /* Borders & Fonts */
    --border-main: #333333;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;

    --transition-fast: all 0.15s ease;
}

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 15px;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

/* ==========================================================================
   Header & Sports Navigation Bar
   ========================================================================== */
.site-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-main);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 60px;
    display: flex;
    align-items: center;
}

.header-container {
    max-width: 1140px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 100%;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo-icon-box {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background-color: #28a745;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 13px;
}

.logo-text {
    color: #ffffff;
}

.logo-highlight {
    color: #28a745;
}

/* Inline Sports Categories Navigation */
.header-sports-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    margin-left: 20px;
    margin-right: 16px;
}

.header-sports-nav::-webkit-scrollbar {
    display: none;
}

.sports-cat-item {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    height: 32px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 700;
    color: #a0a0ba;
    white-space: nowrap;
    transition: var(--transition-fast);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    flex-shrink: 0;
}

.sports-cat-item:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sports-cat-item.active {
    color: #ffffff;
    background-color: rgba(40, 167, 69, 0.25);
    border-color: rgba(40, 167, 69, 0.5);
    font-weight: 800;
}

/* Desktop Auth Actions */
.desktop-auth-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-shrink: 0;
}

.btn-head-action {
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.btn-head-action.secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-head-action.secondary:hover {
    background-color: rgba(255, 255, 255, 0.18);
}

.btn-head-action.logout {
    background-color: rgba(255, 59, 48, 0.15);
    color: #ff453a;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* Mobile Toggle */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border: 1px solid var(--border-main);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    font-size: 16px;
    align-items: center;
    justify-content: center;
}

/* Mobile Drawer */
.mobile-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #141414;
    border-bottom: 2px solid #28a745;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
    z-index: 999;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.mobile-drawer.open {
    display: block;
}

.mobile-drawer-inner {
    padding: 20px;
}

.mobile-auth-box {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-main);
}

.mobile-category-title {
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    margin-bottom: 12px;
}

.mobile-category-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-cat-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.mobile-cat-link.active {
    background-color: rgba(40, 167, 69, 0.2);
    color: #28a745;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
    flex: 1;
    padding: 24px 20px 60px;
}

.content-container {
    max-width: 1140px;
    margin: 0 auto;
}

/* ==========================================================================
   Sportsurge Mint Green Banner (Exact Match to Screenshot)
   ========================================================================== */
.sportsurge-banner {
    background-color: #d8f3dc;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 20px;
    border: 1px solid #b7e4c7;
}

.banner-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #1b4332 !important;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.banner-text {
    font-size: 14px;
    font-weight: 500;
    color: #2b533a !important;
    line-height: 1.5;
    opacity: 0.98;
}

/* ==========================================================================
   Search Input (Exact Match to Screenshot)
   ========================================================================== */
.controls-section {
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    height: 48px;
    background-color: #2b2b2b;
    border: 1px solid #363636;
    border-radius: 4px;
    padding: 0 40px 0 16px;
    color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition-fast);
}

.search-box input::placeholder {
    color: #757575;
}

.search-box input:focus {
    background-color: #303030;
    border-color: #4a4a4a;
    outline: none;
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #ccc;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
}

/* ==========================================================================
   Schedule Table Layout (Exact Match to Screenshot)
   ========================================================================== */
.schedule-section {
    background-color: var(--bg-card);
    border-radius: 4px;
    border: 1px solid var(--border-main);
    overflow: hidden;
}

.schedule-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.schedule-table th {
    background-color: var(--bg-table-head);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-main);
}

.col-teams { width: 42%; }
.col-category { width: 26%; }
.col-time { width: 16%; }
.col-sites { width: 8%; text-align: center; }
.col-watch { width: 8%; text-align: right; }

.game-row {
    border-bottom: 1px solid var(--border-main);
    transition: var(--transition-fast);
    cursor: pointer;
}

.game-row:last-child {
    border-bottom: none;
}

.game-row:hover {
    background-color: var(--bg-card-hover);
}

.game-row td {
    padding: 16px 20px;
    vertical-align: middle;
}

/* Teams Column Format */
.teams-cell {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.team-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team-logo {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.team-name {
    font-size: 13px;
    font-weight: 700;
    color: #e5e5e5;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.event-title-single {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #e5e5e5;
    text-transform: uppercase;
}

/* Category Badge Cell */
.category-cell-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.category-cell {
    font-size: 12px;
    font-weight: 700;
    color: #d0d0d0;
    text-transform: uppercase;
    display: block;
}

.league-cell {
    font-size: 11px;
    font-weight: 500;
    color: #888888;
    text-transform: uppercase;
    display: block;
}

/* Time Cell */
.time-cell {
    font-size: 13px;
    font-weight: 600;
    color: #cccccc;
}

.time-badge-live {
    color: #ff453a;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.time-badge-ft {
    color: var(--text-muted);
    font-size: 12px;
}

.live-pulse {
    width: 8px;
    height: 8px;
    background-color: var(--status-live);
    border-radius: 50%;
    display: inline-block;
}

/* Sites Cell */
.col-sites {
    text-align: center;
}

.sites-count {
    font-size: 13px;
    font-weight: 600;
    color: #cccccc;
}

/* Watch Column (Chevron) */
.col-watch {
    text-align: right;
}

.watch-chevron {
    color: #888888;
    font-size: 12px;
    transition: var(--transition-fast);
}

.game-row:hover .watch-chevron {
    color: #ffffff;
}

/* Empty State */
.no-events-box {
    padding: 40px 20px;
    text-align: center;
}

.no-events-box i {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.no-events-box h3 {
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 4px;
}

.no-events-box p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.reset-btn {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* ==========================================================================
   Stream Links Table (Watch.php & Dashboard - Matching Screenshot)
   ========================================================================== */
.watch-page-title-box {
    text-align: center;
    margin-bottom: 20px;
}

.watch-page-heading {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.watch-alert-banner {
    background-color: var(--banner-bg);
    border-radius: 4px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.stream-links-card {
    background-color: var(--bg-card);
    border-radius: 4px;
    border: 1px solid var(--border-main);
    overflow: visible;
    margin-bottom: 24px;
}

.stream-links-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.stream-links-table th {
    background-color: var(--bg-table-head);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-main);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stream-row {
    border-bottom: 1px solid var(--border-main);
    cursor: pointer;
    transition: var(--transition-fast);
}

.stream-row:last-child {
    border-bottom: none;
}

.stream-row:hover {
    background-color: var(--bg-card-hover);
}

.stream-row td {
    padding: 16px 20px;
    vertical-align: middle;
    font-size: 13px;
    color: #cccccc;
}

.site-cell a {
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.site-cell a:hover {
    color: #28a745;
}

.vote-cell {
    text-align: right;
}

.vote-actions {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #888888;
    font-size: 13px;
}

.vote-actions i:hover {
    color: #ffffff;
    cursor: pointer;
}

.streamer-username {
    font-weight: 700;
    color: var(--text-primary);
}

.badge-channel {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
    border: 1px solid var(--border-main);
}

.badge-reputation {
    background: linear-gradient(135deg, #7928ca, #8a2be2);
    color: #ffffff;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-lang {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    display: inline-block;
}

.badge-ads {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-watch-link {
    background-color: #007aff;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 16px;
    border-radius: 4px;
    display: inline-block;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: var(--bg-header);
    border-top: 1px solid var(--border-main);
    padding: 24px 20px;
    margin-top: auto;
}

.footer-container {
    max-width: 1140px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.footer-copy p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */
@media (max-width: 860px) {
    .header-sports-nav {
        display: none !important;
    }

    .desktop-auth-actions {
        display: none !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-container {
        padding: 0 16px;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 16px 12px 40px;
    }

    .col-teams { width: 55%; }
    .col-category { display: none; }
    .col-time { width: 25%; }
    .col-sites { width: 10%; }
    .col-watch { width: 10%; }
}
