/* X2Score - Modern Livescore UI */
/* Premium Dark Theme with Glass Morphism */

:root {
    /* Dark Theme Colors - Refined */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-tertiary: #1a1a25;
    --bg-hover: #22222e;
    --bg-card: linear-gradient(145deg, #14141c 0%, #0f0f15 100%);
    --bg-glass: rgba(20, 20, 28, 0.85);

    /* Text Colors */
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #5c5c66;

    /* Accent Colors - Modern Gradient Support */
    --accent-red: #ff3b5c;
    --accent-green: #34d399;
    --accent-blue: #3b82f6;
    --accent-yellow: #fbbf24;
    --accent-orange: #f97316;
    --accent-purple: #a855f7;
    --accent-cyan: #22d3ee;

    /* Gradient Accents */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #34d399 0%, #22d3ee 100%);
    --gradient-danger: linear-gradient(135deg, #ff3b5c 0%, #f97316 100%);
    --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f97316 100%);

    /* Status Colors */
    --live-color: #ff3b5c;
    --finished-color: #5c5c66;
    --scheduled-color: #8e8e93;

    /* Borders & Shadows */
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

    /* Spacing */
    --header-height: 64px;
    --sidebar-width: 260px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

/* =====================
   HEADER - Glass Morphism
   ===================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: var(--radius-md);
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-tab.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.nav-tab .live-dot {
    width: 8px;
    height: 8px;
    background: var(--live-color);
    border-radius: 50%;
    animation: livePulse 1.5s infinite;
    box-shadow: 0 0 8px var(--live-color);
}

.nav-tab .count {
    background: var(--gradient-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(255, 59, 92, 0.4);
}

@keyframes livePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 8px var(--live-color);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.85);
        box-shadow: 0 0 16px var(--live-color);
    }
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    text-decoration: none;
    font-size: 18px;
    transition: var(--transition-fast);
}

.settings-link:hover {
    background: var(--bg-hover);
    transform: rotate(45deg);
}

/* Admin Logout Button */
.btn-admin-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-admin-logout:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.btn-admin-logout.hidden {
    display: none;
}

/* Admin Action Button (Change Passcode) */
.btn-admin-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-admin-action:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
}

.btn-admin-action.hidden {
    display: none;
}

/* Change Passcode Form */
.change-passcode-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.change-passcode-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.change-passcode-form .form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.change-passcode-form .passcode-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 18px;
    letter-spacing: 8px;
    text-align: center;
    font-family: monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.change-passcode-form .passcode-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.change-passcode-form .passcode-input.error {
    border-color: #ef4444;
    animation: shake 0.3s ease-in-out;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
}

.connection-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-orange);
}

.connection-status.connected .status-dot {
    background: var(--accent-green);
}

.connection-status.disconnected .status-dot {
    background: var(--accent-red);
}

.connection-status .status-text {
    color: var(--text-secondary);
}

/* =====================
   MAIN CONTENT
   ===================== */
.main-content {
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 24px;
    padding: 24px;
    overflow-x: hidden;
}

/* =====================
   SIDEBAR
   ===================== */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--header-height) + 24px);
    height: fit-content;
    max-height: calc(100vh - var(--header-height) - 48px);
    overflow-y: auto;
}

.sidebar-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.sidebar-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    padding-bottom: 8px;
    z-index: 1;
}

.league-list {
    list-style: none;
}

.league-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    font-size: 12px;
    position: relative;
}

.league-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: height var(--transition-smooth);
}

.league-item:hover {
    background: var(--bg-tertiary);
    padding-left: 14px;
}

.league-item:hover::before {
    height: 60%;
}

.league-item.active {
    background: var(--accent-color);
    color: white;
}

.league-item .country-flag {
    width: 16px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.league-item .league-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.league-item .league-name {
    flex: 1;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-item .league-count {
    color: var(--text-secondary);
    font-size: 11px;
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 10px;
    flex-shrink: 0;
}

.league-item.active .league-name,
.league-item.active .league-count {
    color: white;
}

.league-item.active .league-count {
    background: rgba(255,255,255,0.2);
}

/* Scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* =====================
   MATCHES WRAPPER
   ===================== */
.matches-wrapper {
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.matches-container {
    width: 100%;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

/* Sticky Filter Bar - Wrapper for date selector and league filter */
.sticky-filter-bar {
    position: sticky;
    top: var(--header-height);
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(10, 10, 15, 0.95) 100%);
    z-index: 100;
    margin-bottom: 20px;
    padding-top: 16px;
}

/* Date Selector - Modern Pills */
.date-selector {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    padding-bottom: 8px;
}

.date-btn {
    padding: 10px 18px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.date-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.date-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.date-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transform: translateY(-1px);
}

.date-btn.date-nav-btn {
    padding: 10px 14px;
    font-size: 16px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.03);
}

.date-btn.date-nav-btn:hover {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
}

.date-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Date Picker */
.date-picker {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.date-picker:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.date-picker:focus {
    outline: none;
    border-color: var(--text-primary);
}

.date-picker::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}

/* =====================
   MOBILE LEAGUE FILTER
   ===================== */
.mobile-league-filter {
    display: none;
    gap: 6px;
    padding: 6px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: var(--bg-primary);
    position: relative;
    z-index: 99;
}

.mobile-league-filter::-webkit-scrollbar {
    display: none;
}

.league-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.league-chip:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.league-chip.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.league-chip .chip-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.league-chip .chip-icon img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.league-chip .chip-text {
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.league-chip .chip-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
}

.league-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 1024px) {
    .mobile-league-filter {
        display: flex;
    }

    .date-selector {
        margin-bottom: 0;
    }

    .sticky-filter-bar {
        padding-top: 10px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .sticky-filter-bar {
        padding-top: 6px;
        margin-bottom: 8px;
    }

    .league-chip {
        padding: 5px 8px;
        font-size: 10px;
        gap: 3px;
    }

    .league-chip .chip-icon {
        width: 12px;
        height: 12px;
        font-size: 10px;
    }

    .league-chip .chip-icon img {
        width: 12px;
        height: 12px;
    }

    .league-chip .chip-text {
        max-width: 55px;
    }
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =====================
   SKELETON LOADING UI
   ===================== */
.skeleton-container {
    padding: 16px;
}

.skeleton-league {
    margin-bottom: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.skeleton-league-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-tertiary);
}

.skeleton-circle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-text.w-20 { width: 20%; }
.skeleton-text.w-30 { width: 30%; }
.skeleton-text.w-40 { width: 40%; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-60 { width: 60%; }
.skeleton-text.w-80 { width: 80%; }

.skeleton-match {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-match:last-child {
    border-bottom: none;
}

.skeleton-time {
    width: 45px;
    height: 20px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    margin-right: 16px;
}

.skeleton-teams {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-team {
    display: flex;
    align-items: center;
    gap: 8px;
}

.skeleton-team-logo {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-team-name {
    height: 12px;
    width: 120px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
}

.skeleton-score {
    width: 50px;
    height: 28px;
    border-radius: 6px;
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-tertiary) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    margin-left: 16px;
}

@keyframes skeletonShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Staggered animation for skeleton items */
.skeleton-league:nth-child(1) { animation-delay: 0s; }
.skeleton-league:nth-child(2) { animation-delay: 0.1s; }
.skeleton-league:nth-child(3) { animation-delay: 0.2s; }

.skeleton-match:nth-child(1) .skeleton-time,
.skeleton-match:nth-child(1) .skeleton-team-logo,
.skeleton-match:nth-child(1) .skeleton-team-name,
.skeleton-match:nth-child(1) .skeleton-score { animation-delay: 0s; }

.skeleton-match:nth-child(2) .skeleton-time,
.skeleton-match:nth-child(2) .skeleton-team-logo,
.skeleton-match:nth-child(2) .skeleton-team-name,
.skeleton-match:nth-child(2) .skeleton-score { animation-delay: 0.1s; }

.skeleton-match:nth-child(3) .skeleton-time,
.skeleton-match:nth-child(3) .skeleton-team-logo,
.skeleton-match:nth-child(3) .skeleton-team-name,
.skeleton-match:nth-child(3) .skeleton-score { animation-delay: 0.2s; }

/* Fade In Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* =====================
   LEAGUE GROUP - Card Style
   ===================== */
.league-group {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-smooth);
    /* Animation disabled to prevent flickering on re-render */
    /* animation: fadeInUp 0.4s ease-out; */
    /* animation-fill-mode: both; */
}

/* Animation delays disabled
.league-group:nth-child(1) { animation-delay: 0.05s; }
.league-group:nth-child(2) { animation-delay: 0.1s; }
.league-group:nth-child(3) { animation-delay: 0.15s; }
.league-group:nth-child(4) { animation-delay: 0.2s; }
.league-group:nth-child(5) { animation-delay: 0.25s; }
*/

.league-group:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}

.league-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-fast);
    background: rgba(255, 255, 255, 0.02);
}

.league-header:hover {
    background: rgba(255, 255, 255, 0.04);
}

.league-header .country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.league-header .league-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.league-header .league-info {
    flex: 1;
}

.league-header .league-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.league-header .country-name {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.league-header .match-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Standings Button in League Header */
.standings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-smooth);
    margin-left: auto;
    margin-right: 8px;
}

.standings-btn:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.standings-btn .standings-icon {
    font-size: 16px;
    line-height: 1;
}

/* =====================
   MATCH ROW - Premium Style
   ===================== */
.match-row {
    display: flex;
    flex-direction: column;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-smooth);
    gap: 8px;
    position: relative;
}

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

.match-row:hover {
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(2px);
}

.match-row.live {
    background: linear-gradient(90deg, rgba(255, 59, 92, 0.08) 0%, transparent 100%);
    border-left: 3px solid var(--live-color);
    margin-left: -1px;
    animation: liveGlow 3s ease-in-out infinite;
}

@keyframes liveGlow {
    0%, 100% {
        background: linear-gradient(90deg, rgba(255, 59, 92, 0.08) 0%, transparent 100%);
    }
    50% {
        background: linear-gradient(90deg, rgba(255, 59, 92, 0.12) 0%, transparent 100%);
    }
}

.match-row.live:hover {
    background: linear-gradient(90deg, rgba(255, 59, 92, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
}

/* Row 1: Teams and Score */
.match-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-main .match-time {
    width: 55px;
    flex-shrink: 0;
}

.match-main .team {
    flex: 1;
    min-width: 0;
}

.match-main .score {
    width: 70px;
    flex-shrink: 0;
}

/* Row 2: HDP and Tips */
.match-info-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Match Time */
.match-time {
    text-align: center;
}

.match-status {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.match-status.live {
    color: var(--live-color);
}

.match-status.finished {
    color: var(--finished-color);
}

.match-minute {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Team */
.team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.team.home {
    justify-content: flex-end;
}

.team.away {
    justify-content: flex-start;
}

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

.team-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.team.home .team-name {
    text-align: right;
}

/* Team Position Badge */
.team-position {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 4px;
    opacity: 0.8;
    vertical-align: middle;
}

.team.home .team-position {
    margin-left: 0;
    margin-right: 4px;
    order: -1;
}

/* Score - Premium Style */
.score {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
}

.score-number {
    font-size: 18px;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.score-separator {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 300;
}

.match-row.live .score {
    background: rgba(255, 59, 92, 0.15);
    box-shadow: 0 0 12px rgba(255, 59, 92, 0.2);
}

.match-row.live .score-number {
    color: var(--live-color);
    text-shadow: 0 0 10px rgba(255, 59, 92, 0.5);
}

/* Score Animation */
.match-row.score-updated .score {
    animation: scoreFlash 0.6s ease;
}

@keyframes scoreFlash {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

.match-row.goal-scored {
    animation: goalHighlight 2s ease;
}

@keyframes goalHighlight {
    0% { background: rgba(52, 211, 153, 0.3); }
    100% { background: transparent; }
}

/* Inline HDP Badge - Glass Style */
.hdp-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    transition: all var(--transition-smooth);
    animation: fadeIn 0.3s ease-out;
}

.hdp-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25);
    border-color: rgba(59, 130, 246, 0.4);
}

.hdp-badge .hdp-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--accent-blue);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hdp-badge .hdp-val {
    font-size: 12px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tip Badge - Gold Gradient */
.tip-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.15), rgba(249, 115, 22, 0.1));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(4px);
    transition: all var(--transition-smooth);
    animation: fadeIn 0.3s ease-out;
}

.tip-badge:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(251, 191, 36, 0.25);
    border-color: rgba(251, 191, 36, 0.4);
}

.tip-icon {
    font-size: 12px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.5));
}

.tip-text {
    font-size: 11px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Prediction result indicator */
.tip-badge.correct {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.2), rgba(34, 211, 238, 0.15));
    border-color: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 12px rgba(52, 211, 153, 0.2);
}

.tip-badge.correct .tip-text {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.tip-badge.correct .tip-icon::after {
    content: ' ✓';
    color: var(--accent-green);
}

.tip-badge.wrong {
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.2), rgba(249, 115, 22, 0.15));
    border-color: rgba(255, 59, 92, 0.35);
    box-shadow: 0 0 12px rgba(255, 59, 92, 0.15);
}

.tip-badge.wrong .tip-text {
    background: var(--gradient-danger);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: line-through;
}

.tip-badge.wrong .tip-icon::after {
    content: ' ✗';
    color: var(--accent-red);
}

/* Edit button - Subtle */
.edit-odds-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    opacity: 0.4;
    transition: all var(--transition-smooth);
}

.edit-odds-btn:hover {
    opacity: 1;
    background: var(--gradient-primary);
    border-color: rgba(59, 130, 246, 0.3);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* =====================
   NOTIFICATION
   ===================== */
.notification {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

.notification.hidden {
    display: none;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: var(--accent-green);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.notification-icon {
    font-size: 24px;
}

.notification-text {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =====================
   MATCH DETAIL MODAL
   ===================== */
.match-detail-modal {
    max-width: 600px;
}

.match-detail-modal .modal-body {
    padding: 0;
}

/* Match Header in Detail Modal */
.detail-header {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.08));
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.detail-league {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 16px;
}

.detail-league .league-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.detail-league .country-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.detail-league .league-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Teams Section */
.detail-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.detail-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 180px;
}

.detail-team-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.detail-team-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    line-height: 1.3;
}

/* Score Section */
.detail-score-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

.detail-score {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: var(--radius-md);
}

.detail-score-num {
    font-size: 36px;
    font-weight: 900;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    min-width: 40px;
    text-align: center;
}

.detail-score-sep {
    font-size: 24px;
    color: var(--text-muted);
}

.detail-score.live .detail-score-num {
    color: var(--live-color);
    text-shadow: 0 0 20px rgba(255, 59, 92, 0.5);
}

.detail-status {
    font-size: 14px;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-status.live {
    background: var(--gradient-danger);
    color: white;
    animation: livePulse 1.5s infinite;
}

.detail-status.finished {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.detail-status.scheduled {
    background: var(--gradient-primary);
    color: white;
}

/* Half Time Score */
.detail-halftime {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Info Sections */
.detail-info-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.detail-info-section:last-child {
    border-bottom: none;
}

.detail-info-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-info-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-info-value.empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Odds Section */
.detail-odds {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.detail-odd-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    transition: all var(--transition-smooth);
}

.detail-odd-item:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

.detail-odd-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 6px;
}

.detail-odd-value {
    font-size: 18px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.detail-odd-value.empty {
    color: var(--text-muted);
    -webkit-text-fill-color: var(--text-muted);
    background: none;
}

/* Handicap Row */
.detail-handicap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    gap: 16px;
}

.detail-hdp-team {
    flex: 1;
    text-align: center;
}

.detail-hdp-name {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.detail-hdp-odds {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.detail-hdp-value {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.detail-hdp-value .label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.detail-hdp-value .value {
    font-size: 20px;
    font-weight: 900;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Tip Section in Detail */
.detail-tip {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(249, 115, 22, 0.08));
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-md);
    padding: 16px;
}

.detail-tip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.detail-tip-icon {
    font-size: 18px;
}

.detail-tip-title {
    font-size: 12px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-tip-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.4;
}

.detail-tip-bet {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(251, 191, 36, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-tip-bet-label {
    font-size: 10px;
    color: var(--text-muted);
}

.detail-tip-bet-value {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.detail-tip-bet-value.win {
    background: rgba(52, 211, 153, 0.2);
    color: var(--accent-green);
}

.detail-tip-bet-value.lose {
    background: rgba(255, 59, 92, 0.2);
    color: var(--accent-red);
}

/* Venue Section - Card Style with Image */
.detail-venue-section {
    margin-top: 8px;
}

.detail-venue-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.detail-venue-image {
    width: 100%;
    height: 120px;
    overflow: hidden;
}

.detail-venue-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detail-venue-card:hover .detail-venue-image img {
    transform: scale(1.05);
}

.detail-venue-content {
    padding: 12px;
}

.detail-venue-header {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-venue-icon {
    font-size: 22px;
    line-height: 1;
}

.detail-venue-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.detail-venue-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-venue-city {
    font-size: 12px;
    color: var(--text-secondary);
}

.detail-venue-meta {
    display: flex;
    gap: 16px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.venue-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
}

.venue-meta-icon {
    font-size: 14px;
}

/* Detail Tabs */
.detail-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.detail-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.detail-tab:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.detail-tab.active {
    background: var(--gradient-primary);
    color: white;
}

.detail-tab-content {
    max-height: 400px;
    overflow-y: auto;
}

.detail-tab-pane {
    display: none;
}

.detail-tab-pane.active {
    display: block;
}

/* Loading State in Modal */
.detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: var(--text-secondary);
    gap: 12px;
}

.detail-loading .spinner {
    width: 30px;
    height: 30px;
}

.detail-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-size: 14px;
}

/* Events List */
.detail-events {
    padding: 16px;
}

.detail-event {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    transition: background var(--transition-fast);
}

.detail-event:hover {
    background: rgba(255, 255, 255, 0.05);
}

.detail-event.home {
    border-left: 3px solid var(--accent-blue);
}

.detail-event.away {
    border-left: 3px solid var(--accent-purple);
}

.event-time {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 40px;
}

.event-icon {
    font-size: 16px;
    min-width: 24px;
    text-align: center;
}

.event-info {
    flex: 1;
}

.event-player {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.event-detail {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.event-assist {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Statistics */
.detail-statistics {
    padding: 16px;
}

.stat-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 13px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.stat-value.home {
    color: var(--accent-blue);
}

.stat-value.away {
    color: var(--accent-purple);
}

.stat-bar-container {
    flex: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-bar {
    display: flex;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar-home {
    background: var(--gradient-primary);
    transition: width var(--transition-smooth);
}

.stat-bar-away {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-red));
    transition: width var(--transition-smooth);
}

/* H2H Section */
.detail-h2h {
    padding: 16px;
}

.h2h-summary {
    display: flex;
    justify-content: space-around;
    padding: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.h2h-stat {
    text-align: center;
}

.h2h-num {
    display: block;
    font-size: 28px;
    font-weight: 900;
    color: var(--text-primary);
}

.h2h-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.h2h-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.h2h-matches {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.h2h-match {
    padding: 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.h2h-match:hover {
    background: rgba(255, 255, 255, 0.05);
}

.h2h-date {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.h2h-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.h2h-team {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
}

.h2h-team:first-child {
    text-align: right;
}

.h2h-team:last-child {
    text-align: left;
}

.h2h-team.winner {
    color: var(--accent-green);
    font-weight: 700;
}

.h2h-score {
    font-size: 14px;
    font-weight: 800;
    color: var(--text-primary);
    min-width: 50px;
    text-align: center;
}

.h2h-league {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
    text-align: center;
}

/* Lineups Tab - Pitch View */
.detail-lineups {
    padding: 16px 0;
}

/* Football Pitch Container */
.lineup-pitch-container {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.lineup-pitch {
    position: relative;
    width: 100%;
    padding-bottom: 140%;
    background: linear-gradient(to bottom,
        #1a472a 0%,
        #2d5a3e 2%,
        #1a472a 2%,
        #2d5a3e 10%,
        #1a472a 10%,
        #2d5a3e 20%,
        #1a472a 20%,
        #2d5a3e 30%,
        #1a472a 30%,
        #2d5a3e 40%,
        #1a472a 40%,
        #2d5a3e 50%,
        #1a472a 50%,
        #2d5a3e 60%,
        #1a472a 60%,
        #2d5a3e 70%,
        #1a472a 70%,
        #2d5a3e 80%,
        #1a472a 80%,
        #2d5a3e 90%,
        #1a472a 90%,
        #2d5a3e 98%,
        #1a472a 98%,
        #2d5a3e 100%
    );
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Pitch markings */
.pitch-markings {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Center line */
.pitch-center-line {
    position: absolute;
    top: 50%;
    left: 5%;
    right: 5%;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
}

/* Center circle */
.pitch-center-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18%;
    height: 13%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Penalty areas */
.pitch-penalty-area-top {
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 14%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top: none;
}

.pitch-penalty-area-bottom {
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 14%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-bottom: none;
}

/* Goal areas */
.pitch-goal-area-top {
    position: absolute;
    top: 0;
    left: 35%;
    right: 35%;
    height: 5%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top: none;
}

.pitch-goal-area-bottom {
    position: absolute;
    bottom: 0;
    left: 35%;
    right: 35%;
    height: 5%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-bottom: none;
}

/* Team half containers */
.pitch-half {
    position: absolute;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
}

.pitch-half.home {
    top: 0;
    height: 50%;
    padding: 2% 4% 4% 4%;
}

.pitch-half.away {
    bottom: 0;
    height: 50%;
    padding: 4% 4% 2% 4%;
    flex-direction: column-reverse;
}

/* Team Header on Pitch */
.pitch-team-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 20px;
    margin-bottom: 8px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(4px);
}

.pitch-half.away .pitch-team-header {
    margin-bottom: 0;
    margin-top: 8px;
}

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

.pitch-team-name {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pitch-formation {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Formation rows */
.pitch-formation-rows {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}

.pitch-half.away .pitch-formation-rows {
    flex-direction: column-reverse;
}

.pitch-row {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    padding: 0 5%;
}

/* Player on pitch */
.pitch-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 50px;
}

/* Player Avatar Container - Jersey style */
.pitch-player-avatar {
    width: 44px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    position: relative;
}

.pitch-player-avatar:hover {
    transform: scale(1.15);
    z-index: 10;
}

/* Jersey container */
.player-jersey {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Jersey SVG icon */
.jersey-icon {
    width: 44px;
    height: 50px;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.4));
    transition: filter 0.2s;
}

.pitch-player-avatar:hover .jersey-icon {
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6));
}

/* Jersey number on shirt */
.jersey-number {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 13px;
    font-weight: 800;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Home team jersey colors */
.pitch-half.home .jersey-icon {
    color: #e31b23;
}

.pitch-half.home .pitch-player-avatar.goalkeeper .jersey-icon {
    color: #ffc107;
}

.pitch-half.home .pitch-player-avatar.goalkeeper .jersey-number {
    color: #000;
}

/* Away team jersey colors */
.pitch-half.away .jersey-icon {
    color: #2196f3;
}

.pitch-half.away .pitch-player-avatar.goalkeeper .jersey-icon {
    color: #4caf50;
}

.pitch-half.away .pitch-player-avatar.goalkeeper .jersey-number {
    color: #fff;
}

.pitch-player-name {
    font-size: 9px;
    font-weight: 600;
    color: #fff;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
    max-width: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}

/* Substitutes Section */
.lineup-subs-section {
    margin-top: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.lineup-subs-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.lineup-subs-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lineup-subs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.lineup-subs-team {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lineup-subs-team-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.lineup-subs-team-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.lineup-subs-team-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.lineup-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background 0.2s;
}

.lineup-sub:hover {
    background: var(--bg-hover);
}

.lineup-sub .player-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-glass);
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.lineup-sub .player-name {
    font-size: 11px;
    color: var(--text-secondary);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lineup-sub .player-pos {
    font-size: 9px;
    color: var(--text-muted);
    padding: 2px 5px;
    background: var(--bg-secondary);
    border-radius: 4px;
    text-transform: uppercase;
}

/* Coach Section */
.lineup-coaches {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border-color);
}

.lineup-coach {
    display: flex;
    align-items: center;
    gap: 8px;
}

.coach-icon {
    width: 28px;
    height: 28px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.coach-info {
    display: flex;
    flex-direction: column;
}

.coach-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.coach-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Responsive for Lineups */
@media (max-width: 768px) {
    .lineup-pitch-container {
        max-width: 100%;
    }

    .lineup-pitch {
        padding-bottom: 150%;
    }

    .pitch-player-avatar {
        width: 36px;
        height: 42px;
    }

    .jersey-icon {
        width: 36px;
        height: 42px;
    }

    .jersey-number {
        font-size: 11px;
    }

    .pitch-player-name {
        font-size: 8px;
        max-width: 50px;
    }

    .pitch-team-header {
        padding: 4px 8px;
        gap: 6px;
    }

    .pitch-team-name {
        font-size: 10px;
    }

    .pitch-formation {
        font-size: 9px;
        padding: 1px 6px;
    }

    .lineup-subs-grid {
        grid-template-columns: 1fr;
    }

    .lineup-coaches {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .match-detail-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .detail-teams {
        gap: 12px;
    }

    .detail-team-logo {
        width: 48px;
        height: 48px;
    }

    .detail-team-name {
        font-size: 12px;
    }

    .detail-score-num {
        font-size: 28px;
    }

    .detail-score-section {
        min-width: 80px;
    }

    .detail-info-grid {
        grid-template-columns: 1fr;
    }

    .detail-odds {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .detail-handicap {
        flex-direction: column;
        gap: 12px;
    }

    .detail-hdp-value {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        padding: 8px 0;
        width: 100%;
    }

    .detail-tabs {
        padding: 8px;
    }

    .detail-tab {
        padding: 8px 10px;
        font-size: 11px;
    }

    .h2h-summary {
        flex-wrap: wrap;
        gap: 16px;
    }

    .h2h-stat {
        flex: 1 1 30%;
    }
}

/* =====================
   PREDICTIONS TAB
   ===================== */
.detail-predictions {
    padding: 16px;
}

.pred-section {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
}

.pred-section:last-child {
    margin-bottom: 0;
}

.pred-section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Win Probability */
.pred-probability {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pred-prob-item {
    position: relative;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.pred-prob-item .pred-prob-bar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: var(--radius-sm);
    transition: width 0.5s ease;
}

.pred-prob-item.home .pred-prob-bar {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.4), rgba(59, 130, 246, 0.2));
}

.pred-prob-item.draw .pred-prob-bar {
    background: linear-gradient(90deg, rgba(156, 163, 175, 0.4), rgba(156, 163, 175, 0.2));
}

.pred-prob-item.away .pred-prob-bar {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.4), rgba(139, 92, 246, 0.2));
}

.pred-prob-label {
    position: relative;
    z-index: 1;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.pred-prob-value {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.pred-prob-item.home .pred-prob-value {
    color: var(--accent-blue);
}

.pred-prob-item.away .pred-prob-value {
    color: var(--accent-purple);
}

/* AI Advice */
.pred-advice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(245, 158, 11, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-sm);
}

.pred-advice-icon {
    font-size: 20px;
}

.pred-advice-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
}

.pred-winner {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(52, 211, 153, 0.1);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pred-winner-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.pred-winner-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent-green);
}

.pred-winner-comment {
    font-size: 12px;
    color: var(--text-muted);
}

/* Team Comparison */
.pred-comparison {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pred-comparison-header {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    margin-bottom: 8px;
}

.pred-team-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pred-team-name.home {
    color: var(--accent-blue);
}

.pred-team-name.away {
    color: var(--accent-purple);
}

.pred-comparison-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.pred-comp-value {
    font-size: 11px;
    font-weight: 600;
    width: 40px;
    text-align: center;
}

.pred-comp-value.home {
    color: var(--accent-blue);
}

.pred-comp-value.away {
    color: var(--accent-purple);
}

.pred-comp-bar-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pred-comp-label {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pred-comp-bar {
    height: 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
    display: flex;
    overflow: hidden;
}

.pred-comp-bar-home {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-blue), rgba(59, 130, 246, 0.6));
    border-radius: 3px 0 0 3px;
    transition: width 0.5s ease;
}

.pred-comp-bar-away {
    height: 100%;
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.6), var(--accent-purple));
    border-radius: 0 3px 3px 0;
    transition: width 0.5s ease;
    margin-left: auto;
}

/* =====================
   INJURIES TAB
   ===================== */
.detail-injuries {
    padding: 16px;
}

.injuries-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.injury-team {
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.injury-team.home {
    border-top: 3px solid var(--accent-blue);
}

.injury-team.away {
    border-top: 3px solid var(--accent-purple);
}

.injury-team-header {
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid var(--border-color);
}

.injury-empty {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

.injury-list {
    display: flex;
    flex-direction: column;
}

.injury-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.injury-item:last-child {
    border-bottom: none;
}

.injury-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.injury-item.missing {
    background: rgba(239, 68, 68, 0.05);
}

.injury-item.doubtful {
    background: rgba(251, 191, 36, 0.05);
}

.injury-photo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.2);
}

.injury-photo-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.injury-info {
    flex: 1;
    min-width: 0;
}

.injury-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.injury-reason {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.injury-icon {
    font-size: 12px;
}

.injury-type {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    width: fit-content;
}

.injury-type.missing {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.injury-type.doubtful {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

/* Injuries Responsive */
@media (max-width: 600px) {
    .injuries-container {
        grid-template-columns: 1fr;
    }

    .pred-prob-label {
        max-width: 50%;
    }
}

/* =====================
   MODAL
   ===================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(59, 130, 246, 0.1);
    border: 1px solid var(--border-light);
    animation: modalSlideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

.modal-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gradient-danger);
    color: white;
    border-color: rgba(255, 59, 92, 0.3);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

/* Match Info in Modal */
.match-info {
    text-align: center;
    padding: 20px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.match-info .teams {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.match-info .vs {
    color: var(--accent-blue);
    font-size: 12px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.15);
    padding: 4px 10px;
    border-radius: 12px;
}

/* Form Styles */
.form-section {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 12px;
    font-weight: 700;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.form-row.two-cols {
    grid-template-columns: repeat(2, 1fr);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Tip Section */
.form-section.tip-section {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.08), rgba(249, 115, 22, 0.05));
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.form-section.tip-section .form-section-title {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tip-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.tip-preset-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.tip-preset-btn:hover {
    background: var(--gradient-gold);
    border-color: transparent;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.bet-choice-hint {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 12px;
    font-style: italic;
    opacity: 0.7;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group select {
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all var(--transition-smooth);
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15), var(--shadow-glow);
    background: rgba(59, 130, 246, 0.05);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::after {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-light);
    transform: translateY(-1px);
}

.btn-secondary:active {
    transform: scale(0.97) translateY(0);
}

/* Edit Button on Match Row */
.edit-odds-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 14px;
    transition: all var(--transition-fast);
}

.edit-odds-btn:hover {
    background: var(--bg-hover);
    color: var(--accent-yellow);
}

/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
    .sidebar {
        display: none;
    }

    .container {
        padding: 16px;
    }

    .hdp-badge,
    .tip-badge {
        padding: 2px 6px;
    }

    .hdp-badge .hdp-label,
    .hdp-badge .hdp-val {
        font-size: 8px;
    }

    .tip-text {
        font-size: 9px;
    }
}

@media (max-width: 768px) {
    .match-main .match-time {
        width: 50px;
    }

    .match-main .score {
        width: 60px;
    }

    .team-name {
        max-width: 120px;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 16px;
    }

    .nav-tabs {
        display: none;
    }

    .container {
        padding: 12px;
    }

    /* Date Selector - Scrollable */
    .date-selector {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        padding: 10px 0;
        margin-bottom: 10px;
        margin-top: 0;
        top: var(--header-height);
        scrollbar-width: none;
        -ms-overflow-style: none;
        max-width: 100%;
        width: 100%;
    }

    .date-selector::-webkit-scrollbar {
        display: none;
    }

    .date-btn {
        white-space: nowrap;
        padding: 8px 14px;
        font-size: 11px;
        flex-shrink: 0;
    }

    /* Match Layout */
    .match-row {
        padding: 10px 12px;
    }

    .match-main .match-time {
        width: 42px;
    }

    .match-main .score {
        width: 58px;
    }

    .team {
        gap: 8px;
    }

    .team-name {
        font-size: 12px;
        max-width: 100px;
    }

    .team-logo {
        width: 22px;
        height: 22px;
    }

    .team-position {
        font-size: 10px;
    }

    .score {
        padding: 5px 8px;
    }

    .score-number {
        font-size: 15px;
    }

    /* Hide HDP badge on small screens */
    .hdp-badge {
        display: none;
    }

    /* League Header */
    .league-header {
        padding: 12px 14px;
    }

    .league-header .league-name {
        font-size: 14px;
    }

    /* Edit button smaller */
    .edit-btn {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .logo {
        gap: 8px;
    }

    .logo-icon {
        font-size: 22px;
    }

    .logo-text {
        font-size: 16px;
    }

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

    .header-icons {
        gap: 6px;
    }

    .header-icon-btn {
        width: 34px;
        height: 34px;
        font-size: 14px;
    }

    .container {
        padding: 12px 8px;
    }

    /* Date Selector - Horizontal scroll */
    .date-selector {
        gap: 6px;
        padding: 8px 0;
        margin-bottom: 8px;
        margin-top: 0;
        top: var(--header-height);
    }

    .date-btn {
        padding: 8px 12px;
        font-size: 11px;
        border-radius: 12px;
    }

    .date-btn.date-nav-btn {
        padding: 8px 10px;
        font-size: 14px;
    }

    .date-picker {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* League Header */
    .league-header {
        padding: 10px 12px;
    }

    .league-header .league-logo {
        width: 24px;
        height: 24px;
    }

    .league-header .country-flag {
        width: 20px;
        height: 14px;
    }

    .league-header .league-name {
        font-size: 13px;
    }

    .league-header .country-name {
        font-size: 10px;
    }

    .league-header .match-count {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    /* Match Row */
    .match-row {
        padding: 10px 10px;
        gap: 6px;
    }

    .match-main {
        gap: 4px;
    }

    .match-main .match-time {
        width: 36px;
    }

    .match-main .score {
        width: 54px;
    }

    .match-status {
        font-size: 11px;
    }

    .match-minute {
        font-size: 10px;
    }

    .team {
        gap: 6px;
    }

    .team-name {
        max-width: 80px;
        font-size: 12px;
    }

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

    .team-position {
        font-size: 9px;
    }

    .score {
        padding: 4px 6px;
        gap: 4px;
    }

    .score-number {
        font-size: 14px;
        min-width: 18px;
    }

    .score-separator {
        font-size: 12px;
    }

    /* Edit Button */
    .edit-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    /* HDP & Tip Badges */
    .match-info-row {
        gap: 6px;
    }

    .tip-badge {
        padding: 3px 8px;
    }

    .tip-text {
        font-size: 9px;
    }

    /* Standings Button */
    .standings-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Extra small screens (< 360px) */
@media (max-width: 360px) {
    .match-main .match-time {
        width: 32px;
    }

    .match-main .score {
        width: 48px;
    }

    .team-name {
        max-width: 65px;
        font-size: 11px;
    }

    .team-logo {
        width: 18px;
        height: 18px;
    }

    .score-number {
        font-size: 13px;
        min-width: 16px;
    }

    .date-btn {
        padding: 6px 10px;
        font-size: 10px;
    }
}

/* =====================
   SCROLLBAR
   ===================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* =====================
   MOBILE NAV (Bottom)
   ===================== */
.mobile-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-top: 1px solid var(--border-color);
        display: flex;
        justify-content: space-around;
        padding: 8px 0;
        z-index: 1000;
    }

    .mobile-nav .nav-tab {
        flex-direction: column;
        gap: 4px;
        padding: 8px 16px;
        font-size: 10px;
    }

    .main-content {
        padding-bottom: 70px;
    }
}

/* =====================
   BACK TO TOP BUTTON
   ===================== */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    transition: all var(--transition-smooth);
    z-index: 999;
    opacity: 1;
    transform: translateY(0);
    overflow: hidden;
}

.back-to-top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.back-to-top:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.5);
}

.back-to-top:hover::before {
    opacity: 1;
}

.back-to-top:active {
    transform: scale(0.95);
}

.back-to-top.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 80px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 75px;
        right: 12px;
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

/* =====================
   REAL-TIME UPDATE ANIMATIONS
   ===================== */

/* Score flash animation for match detail modal */
.detail-score-num.score-flash {
    animation: scoreFlash 1s ease-out;
}

@keyframes scoreFlash {
    0% {
        transform: scale(1);
        text-shadow: 0 0 0 transparent;
    }
    25% {
        transform: scale(1.3);
        text-shadow: 0 0 20px var(--accent-green), 0 0 40px var(--accent-green);
        color: var(--accent-green);
    }
    50% {
        transform: scale(1.15);
        text-shadow: 0 0 15px var(--accent-green);
    }
    100% {
        transform: scale(1);
        text-shadow: 0 0 0 transparent;
    }
}

/* New event highlight animation */
.detail-event.new-event {
    animation: newEventPulse 3s ease-out;
    position: relative;
}

.detail-event.new-event::before {
    content: 'NEW';
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--gradient-success);
    color: white;
    animation: newBadgeFade 3s ease-out forwards;
}

@keyframes newEventPulse {
    0% {
        background: rgba(52, 211, 153, 0.3);
        transform: scale(1.02);
    }
    30% {
        background: rgba(52, 211, 153, 0.2);
        transform: scale(1);
    }
    100% {
        background: rgba(255, 255, 255, 0.02);
    }
}

@keyframes newBadgeFade {
    0% {
        opacity: 1;
    }
    70% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* Statistics bar update animation */
.stat-bar-home,
.stat-bar-away {
    transition: width 0.5s ease-out;
}

/* Live indicator pulse for detail modal */
.detail-status.live {
    animation: liveStatusPulse 2s infinite;
}

@keyframes liveStatusPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Real-time connection status indicator */
.detail-header .ws-status {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-muted);
}

.detail-header .ws-status .ws-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-green);
    animation: wsDotPulse 2s infinite;
}

.detail-header .ws-status.disconnected .ws-dot {
    background: var(--text-muted);
    animation: none;
}

@keyframes wsDotPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* Score update shimmer effect */
.detail-score.updating {
    position: relative;
    overflow: hidden;
}

.detail-score.updating::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Match row live indicator enhancement */
.match-row.live .score {
    position: relative;
}

.match-row.live .score::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(255, 59, 92, 0.1), rgba(255, 59, 92, 0.05));
    z-index: -1;
    opacity: 0;
    animation: liveScoreGlow 3s infinite;
}

@keyframes liveScoreGlow {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* =====================
   PASSCODE MODAL
   ===================== */
.passcode-modal {
    max-width: 360px;
    width: 90%;
}

.passcode-modal .modal-header {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.12), rgba(249, 115, 22, 0.06));
    border-bottom: 1px solid rgba(251, 191, 36, 0.2);
}

.passcode-description {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin: 0 0 24px 0;
}

.passcode-input-container {
    display: flex;
    justify-content: center;
}

.passcode-input {
    width: 160px;
    padding: 16px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    letter-spacing: 12px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.passcode-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.passcode-input::placeholder {
    letter-spacing: 8px;
    color: var(--text-muted);
}

.passcode-error {
    color: var(--live-color);
    font-size: 13px;
    text-align: center;
    margin: 16px 0 0 0;
    animation: shake 0.4s ease-in-out;
}

.passcode-error.hidden {
    display: none;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* =====================
   STANDINGS MODAL
   ===================== */
.standings-modal {
    max-width: 750px;
    width: 95%;
}

.standings-modal .modal-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.06));
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
}

.standings-modal .modal-title {
    font-size: 15px;
}

.standings-modal .modal-body {
    padding: 0;
    max-height: 65vh;
    overflow-y: auto;
}

/* Standings Table */
.standings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}

.standings-table thead {
    background: linear-gradient(180deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.standings-table th {
    padding: 12px 8px;
    text-align: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(59, 130, 246, 0.3);
}

.standings-table th:first-child {
    width: 40px;
}

.standings-table th:nth-child(2) {
    text-align: left;
    padding-left: 12px;
}

.standings-table tbody tr {
    transition: all var(--transition-fast);
}

.standings-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.06) 0%, transparent 100%);
}

.standings-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.01);
}

.standings-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
}

.standings-table td:nth-child(2) {
    text-align: left;
    padding-left: 12px;
}

/* Position column */
.standings-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 11px;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.standings-pos.champions {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.35);
}

.standings-pos.europa {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.35);
}

.standings-pos.conference {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.35);
}

.standings-pos.relegation {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.35);
}

/* Team cell */
.standings-team {
    display: flex;
    align-items: center;
    gap: 10px;
}

.standings-team-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.standings-team-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    color: var(--text-primary);
    font-size: 12px;
}

/* Goal difference colors */
.standings-gd.positive {
    color: var(--accent-green);
    font-weight: 600;
}

.standings-gd.negative {
    color: var(--accent-red);
    font-weight: 600;
}

/* Points column highlight */
.standings-table td.points {
    font-weight: 800;
    font-size: 14px;
    color: var(--text-primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

/* Form column */
.standings-form {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.standings-form-item {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.standings-form-item.win {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.standings-form-item.draw {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
}

.standings-form-item.loss {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
}

/* Loading state */
.standings-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

.standings-loading .spinner {
    width: 30px;
    height: 30px;
}

/* Empty state */
.standings-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.standings-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* Group header for tournaments with groups */
.standings-group-header {
    background: linear-gradient(90deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    padding: 10px 14px;
    font-weight: 700;
    font-size: 12px;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-blue);
}

/* Mobile responsive */
@media (max-width: 600px) {
    .standings-modal {
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }

    .standings-table {
        font-size: 10px;
    }

    .standings-table th,
    .standings-table td {
        padding: 8px 4px;
    }

    .standings-team-name {
        max-width: 80px;
        font-size: 10px;
    }

    .standings-team-logo {
        width: 18px;
        height: 18px;
    }

    .standings-pos {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .standings-form {
        display: none;
    }

    .standings-table td.points {
        font-size: 12px;
    }

    /* Hide some columns on mobile */
    .standings-table th.hide-mobile,
    .standings-table td.hide-mobile {
        display: none;
    }
}
