/* =============================================
   สปอร์ตไลฟ์ - Sports Live App Styles
   Theme: Dark Neon Sports
   ============================================= */

:root {
    /* Colors */
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-card: #1a2234;
    --bg-card-hover: #243049;
    
    --accent-primary: #00ff88;
    --accent-secondary: #00d4ff;
    --accent-tertiary: #ff6b35;
    --accent-gold: #ffd700;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-color: rgba(0, 255, 136, 0.1);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00ff88 0%, #00d4ff 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e17 0%, #111827 100%);
    --gradient-card: linear-gradient(145deg, #1a2234 0%, #0f1624 100%);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50%;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* =============================================
   Base Styles
   ============================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(0, 255, 136, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(255, 107, 53, 0.03) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

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

img {
    max-width: 100%;
    height: auto;
}

/* =============================================
   Loading Screen
   ============================================= */

#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    width: 60px;
    height: 60px;
}

.ball {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    animation: bounce 0.5s ease infinite alternate;
    box-shadow: 
        0 0 30px rgba(0, 255, 136, 0.5),
        inset -10px -10px 20px rgba(0, 0, 0, 0.3);
}

.ball::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-full);
}

.shadow {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 10px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    animation: shadowScale 0.5s ease infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-30px); }
}

@keyframes shadowScale {
    from { transform: translateX(-50%) scale(1); opacity: 0.5; }
    to { transform: translateX(-50%) scale(0.7); opacity: 0.3; }
}

#loading-screen p {
    margin-top: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 1.1rem;
    animation: pulse 1.5s ease infinite;
}

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

/* =============================================
   Header
   ============================================= */

.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    padding: var(--spacing-md) 0;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-icon {
    height: 36px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-normal);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo:hover .logo-icon {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(212, 168, 75, 0.4));
}

.footer-icon {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: var(--spacing-xs);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    transition: all var(--transition-normal);
    position: relative;
}

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

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 255, 136, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.search-box:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.search-box input {
    width: 200px;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box input:focus {
    outline: none;
}

.search-box button {
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.search-box button:hover {
    color: var(--accent-primary);
}


/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-sm) 0;
    z-index: 1000;
}

.mobile-nav ul {
    display: flex;
    justify-content: space-around;
    list-style: none;
}

.mobile-nav .nav-link {
    flex-direction: column;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm);
    font-size: 0.75rem;
}

.mobile-nav .nav-link i {
    font-size: 1.2rem;
}

/* =============================================
   Main Content
   ============================================= */

.main-content {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
    padding-bottom: var(--spacing-2xl);
}

.page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   Hero Section
   ============================================= */

.hero-section {
    position: relative;
    padding: var(--spacing-2xl) 0;
    background: 
        linear-gradient(135deg, rgba(0, 255, 136, 0.1) 0%, transparent 50%),
        linear-gradient(225deg, rgba(0, 212, 255, 0.1) 0%, transparent 50%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 var(--spacing-lg);
}

.hero-content h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-content h1 .accent {
    display: block;
    background: linear-gradient(135deg, #d4a84b 0%, #c9972e 50%, #a67c1a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.hero-content .api-notice {
    font-size: 0.85rem;
    color: var(--accent-secondary);
    background: rgba(0, 212, 255, 0.1);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-2xl);
    flex-wrap: wrap;
}

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

.stat-number {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* =============================================
   Section Headers
   ============================================= */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: var(--spacing-2xl) 0 var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.section-header h2 {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.3rem;
    font-weight: 600;
}

.section-header h2 i {
    color: var(--accent-primary);
}

.league-name {
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-card);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-lg);
}

.page-header {
    text-align: center;
    padding: var(--spacing-2xl) 0;
}

.page-header h1 {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
}

.page-header h1 i {
    color: var(--accent-primary);
}

.page-header p {
    color: var(--text-secondary);
}

/* =============================================
   League Selector
   ============================================= */

.league-selector {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding: var(--spacing-md) 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

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

.league-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
}

.league-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.league-item.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.league-item img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.league-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.league-item.active span {
    color: var(--accent-primary);
    font-weight: 600;
}

.league-item::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: transform var(--transition-normal);
}

.league-item.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* =============================================
   Matches Grid
   ============================================= */

.matches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.match-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.match-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-normal);
}

.match-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(0, 255, 136, 0.3);
}

.match-card:hover::before {
    transform: scaleX(1);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.match-date {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.match-status {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.match-status.finished {
    background: rgba(100, 116, 139, 0.2);
    color: var(--text-secondary);
}

.match-status.live {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    animation: pulse 1.5s ease infinite;
}

.match-status.upcoming {
    background: rgba(0, 212, 255, 0.2);
    color: var(--accent-secondary);
}

.match-teams {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.match-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    text-align: center;
}

.match-team img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-normal);
}

.match-card:hover .match-team img {
    transform: scale(1.1);
}

.match-team span {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
}

.match-score {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    font-family: 'Orbitron', sans-serif;
}

.match-score .score {
    font-size: 1.5rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.match-score .divider {
    color: var(--text-muted);
}

.match-time {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--accent-secondary);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(0, 212, 255, 0.1);
    border-radius: var(--radius-md);
}

.match-venue {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

/* =============================================
   Live Indicator
   ============================================= */

.live-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.live-dot {
    width: 10px;
    height: 10px;
    background: #ef4444;
    border-radius: var(--radius-full);
    animation: livePulse 1.5s ease infinite;
}

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

.pulse {
    animation: pulse 1.5s ease infinite;
    color: #ef4444 !important;
}

/* =============================================
   League Tabs
   ============================================= */

.league-tabs {
    display: flex;
    gap: var(--spacing-sm);
    overflow-x: auto;
    padding: var(--spacing-md) 0;
    margin-bottom: var(--spacing-lg);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.league-tabs::-webkit-scrollbar {
    display: none;
}

.league-tab {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    white-space: nowrap;
    position: relative;
}

.league-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-secondary);
    transform: translateY(-2px);
}

.league-tab.active {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 212, 255, 0.15) 100%);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

.league-tab img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    padding: 2px;
}

.league-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: transform var(--transition-normal);
}

.league-tab.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* =============================================
   Standings Table
   ============================================= */

.standings-table-container {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.standings-table th,
.standings-table td {
    padding: var(--spacing-md);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.standings-table th {
    background: var(--bg-card);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
}

.standings-table td {
    background: var(--bg-secondary);
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}

.standings-table tr:hover td {
    background: var(--bg-card);
}

.standings-table .rank {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    width: 50px;
}

.standings-table .rank.top-4 {
    color: var(--accent-primary);
}

.standings-table .rank.relegation {
    color: #ef4444;
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-align: left;
}

.standings-table .team-cell img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.standings-table .team-cell span {
    font-weight: 500;
}

.standings-table .points {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 1.1rem;
}

.standings-table .form-cell {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.form-indicator {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
}

.form-indicator.win {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

.form-indicator.draw {
    background: var(--text-muted);
    color: var(--bg-primary);
}

.form-indicator.loss {
    background: #ef4444;
    color: white;
}

/* =============================================
   Teams Grid
   ============================================= */

.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--spacing-lg);
}

.team-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.team-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg 340deg,
        var(--accent-primary) 340deg 360deg
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    animation: rotate 4s linear infinite;
}

.team-card::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: var(--bg-card);
    border-radius: calc(var(--radius-lg) - 2px);
    z-index: 0;
}

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

.team-card:hover::before {
    opacity: 1;
}

.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 255, 136, 0.2);
}

.team-card-content {
    position: relative;
    z-index: 1;
}

.team-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.3));
    transition: transform var(--transition-normal);
}

.team-card:hover img {
    transform: scale(1.15);
}

.team-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.team-card p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* =============================================
   Schedule
   ============================================= */

.schedule-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.schedule-date-group {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.schedule-date-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(0, 255, 136, 0.05);
    border-bottom: 1px solid var(--border-color);
}

.schedule-date-header i {
    color: var(--accent-primary);
}

.schedule-date-header h3 {
    font-size: 1rem;
    font-weight: 600;
}

.schedule-matches {
    padding: var(--spacing-md);
}

.schedule-match {
    display: flex;
    align-items: center;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.schedule-match:hover {
    background: var(--bg-card-hover);
}

.schedule-match + .schedule-match {
    border-top: 1px solid var(--border-color);
}

.schedule-time {
    min-width: 70px;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    color: var(--accent-secondary);
}

.schedule-teams {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.schedule-team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.schedule-team.away {
    flex-direction: row-reverse;
}

.schedule-team img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.schedule-team span {
    font-size: 0.9rem;
    font-weight: 500;
}

.schedule-vs {
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 0 var(--spacing-sm);
}

/* =============================================
   Search Results
   ============================================= */

.search-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-lg);
}

/* =============================================
   Modal
   ============================================= */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: var(--spacing-lg);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlide 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent-tertiary);
    color: white;
    border-color: var(--accent-tertiary);
}

.modal-body {
    padding: var(--spacing-xl);
}

.team-detail-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-xl);
}

.team-detail-header img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
}

.team-detail-header h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.team-detail-header p {
    color: var(--text-secondary);
}

.team-detail-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.team-info-item {
    background: var(--bg-card);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
}

.team-info-item label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xs);
}

.team-info-item span {
    font-weight: 500;
}

.team-jersey {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    margin-top: var(--spacing-md);
}

.team-jersey img {
    width: 80px;
    height: 80px;
    object-fit: contain;
}

/* =============================================
   Empty State
   ============================================= */

.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

/* =============================================
   Footer
   ============================================= */

.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-xl) 0;
    margin-top: var(--spacing-2xl);
}

.footer-content {
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-logo i {
    color: var(--accent-primary);
}

.footer-logo .accent {
    color: var(--accent-primary);
}

.main-footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.main-footer a {
    color: var(--accent-secondary);
    transition: color var(--transition-fast);
}

.main-footer a:hover {
    color: var(--accent-primary);
}

.copyright {
    font-size: 0.85rem;
}

/* =============================================
   Skeleton Loading
   ============================================= */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-card) 0%,
        var(--bg-card-hover) 50%,
        var(--bg-card) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

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

.skeleton-match {
    height: 180px;
}

.skeleton-team {
    height: 200px;
}

.skeleton-row {
    height: 50px;
    margin-bottom: var(--spacing-sm);
}

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 1024px) {
    .main-nav {
        display: none;
    }
    
    .mobile-nav {
        display: block;
    }
    
    .main-content {
        padding-bottom: 100px;
    }
    
    .search-box {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    .hero-section {
        padding: var(--spacing-xl) 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-stats {
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .standings-table th,
    .standings-table td {
        padding: var(--spacing-sm);
        font-size: 0.8rem;
    }
    
    .standings-table .team-cell img {
        width: 24px;
        height: 24px;
    }
    
    .team-detail-info {
        grid-template-columns: 1fr;
    }
    
    .team-jersey {
        grid-column: span 1;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.1rem;
    }
    
    .league-item {
        min-width: 80px;
        padding: var(--spacing-sm);
    }
    
    .league-item img {
        width: 40px;
        height: 40px;
    }
    
    .teams-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }
    
    .team-card {
        padding: var(--spacing-md);
    }
    
    .team-card img {
        width: 50px;
        height: 50px;
    }
    
    .match-team img {
        width: 45px;
        height: 45px;
    }
    
    .match-score .score {
        font-size: 1.2rem;
    }
}

/* =============================================
   Chat Page
   ============================================= */

.chat-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 280px);
    min-height: 400px;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-lg);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--accent-primary);
    border-radius: 3px;
}

.chat-message {
    display: flex;
    gap: var(--spacing-md);
    max-width: 85%;
    animation: messageSlide 0.3s ease;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-message.bot .chat-avatar {
    background: var(--gradient-primary);
    color: var(--bg-primary);
}

.chat-message.user .chat-avatar {
    background: var(--accent-tertiary);
    color: white;
}

.chat-avatar i {
    font-size: 1.1rem;
}

.chat-bubble {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    line-height: 1.6;
}

.chat-message.bot .chat-bubble {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: var(--radius-sm);
}

.chat-message.user .chat-bubble {
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.2) 0%, rgba(0, 212, 255, 0.2) 100%);
    border: 1px solid rgba(0, 255, 136, 0.3);
    border-bottom-right-radius: var(--radius-sm);
}

.chat-bubble p {
    margin-bottom: var(--spacing-sm);
}

.chat-bubble p:last-child {
    margin-bottom: 0;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-sm);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.report-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.report-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.report-btn.reported {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    cursor: default;
}

.report-btn:disabled {
    cursor: default;
}

.report-thanks {
    font-size: 0.75rem;
    color: var(--accent-primary);
    animation: fadeIn 0.3s ease;
}

.chat-bubble ul {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.chat-bubble li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.chat-input-container {
    padding: var(--spacing-lg);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.chat-input-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xs);
    transition: all var(--transition-normal);
}

.chat-input-wrapper:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.2);
}

#chat-input {
    flex: 1;
    padding: var(--spacing-sm) var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

#chat-input::placeholder {
    color: var(--text-muted);
}

#chat-input:focus {
    outline: none;
}

.chat-send-btn {
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all var(--transition-normal);
}

.chat-send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.chat-hint {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: var(--spacing-sm);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: var(--spacing-md);
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
}

/* Chat responsive */
@media (max-width: 768px) {
    .chat-container {
        height: calc(100vh - 320px);
        border-radius: var(--radius-lg);
    }
    
    .chat-message {
        max-width: 90%;
    }
    
    .chat-avatar {
        width: 35px;
        height: 35px;
    }
    
    .chat-bubble {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }
}

