/*
╔══════════════════════════════════════════════════════════════════════════════╗
║                         YS SCORES - DESIGN SYSTEM                            ║
║                     Modern Football Scores Platform                          ║
╚══════════════════════════════════════════════════════════════════════════════╝
*/

/* ============================================================================
   1. CSS VARIABLES & DESIGN TOKENS
   ============================================================================ */

:root {
    /* Color Palette */
    --color-primary: #00ff85;
    --color-primary-dark: #00cc6a;
    --color-primary-light: #33ff9f;
    --color-primary-alpha-10: rgba(0, 255, 133, 0.1);
    --color-primary-alpha-20: rgba(0, 255, 133, 0.2);
    
    --color-accent: #ff4757;
    --color-accent-alpha-10: rgba(255, 71, 87, 0.1);
    
    --color-bg-primary: #0a0e12;
    --color-bg-secondary: #141920;
    --color-bg-tertiary: #1c2229;
    --color-bg-elevated: #242b34;
    
    --color-text-primary: #ffffff;
    --color-text-secondary: #9ca3af;
    --color-text-tertiary: #6b7280;
    
    --color-border: #2d3748;
    --color-border-light: #374151;
    
    --color-success: #10b981;
    --color-warning: #f59e0b;
    --color-error: #ef4444;
    --color-info: #3b82f6;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #00ff85 0%, #00cc6a 100%);
    --gradient-dark: linear-gradient(180deg, #0a0e12 0%, #141920 100%);
    --gradient-card: linear-gradient(135deg, #1c2229 0%, #141920 100%);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 255, 133, 0.3);
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-full: 9999px;
    
    /* Typography */
    --font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    
    --font-weight-normal: 400;
    --font-weight-medium: 600;
    --font-weight-bold: 700;
    --font-weight-black: 900;
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Z-Index Layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--color-text-primary);
    background: var(--gradient-dark);
    background-attachment: fixed;
    direction: ltr;
    overflow-x: hidden;
    min-height: 100vh;
}

body.rtl {
    direction: rtl;
}

/* ============================================================================
   3. TYPOGRAPHY
   ============================================================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-md);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }

p {
    margin-bottom: var(--space-md);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary);
}

button {
    font-family: inherit;
    font-size: inherit;
    border: none;
    background: none;
    cursor: pointer;
    transition: all var(--transition-base);
}

/* ============================================================================
   4. LAYOUT UTILITIES
   ============================================================================ */

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.content-grid {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

/* ============================================================================
   5. LANGUAGE BAR
   ============================================================================ */

.language-bar {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    height: 36px;
}

.language-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
}

.lang-switcher {
    display: flex;
    gap: var(--space-xs);
    background: var(--color-bg-tertiary);
    padding: var(--space-xs);
    border-radius: var(--radius-md);
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: var(--color-primary);
    background: var(--color-primary-alpha-10);
}

.lang-btn.active {
    color: var(--color-bg-primary);
    background: var(--color-primary);
}

.lang-btn i {
    font-size: 0.875rem;
}

/* ============================================================================
   6. HEADER
   ============================================================================ */

.header {
    background: rgba(10, 14, 18, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    position: fixed;
    top: 36px;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    height: 70px;
    transition: all var(--transition-base);
}

.header.scrolled {
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: transform var(--transition-base);
}

.brand-logo:hover {
    transform: translateY(-2px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-glow);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(0, 255, 133, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 133, 0.5); }
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-name {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    color: var(--color-primary);
    letter-spacing: -0.5px;
}

.brand-tagline {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Main Navigation */
.main-nav {
    display: flex;
    gap: var(--space-sm);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-lg);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-secondary);
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.nav-item:hover::before,
.nav-item.active::before {
    opacity: 0.1;
}

.nav-item:hover,
.nav-item.active {
    color: var(--color-primary);
}

.nav-item i {
    font-size: 1rem;
}

/* Header Actions */
.app-download-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    color: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    box-shadow: var(--shadow-glow);
    transition: all var(--transition-base);
}

.app-download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 255, 133, 0.5);
}

.app-download-btn i {
    font-size: 1.25rem;
}

/* ============================================================================
   7. MAIN CONTAINER
   ============================================================================ */

.main-container {
    margin-top: 130px; /* 36px (lang bar) + 70px (header) + 24px gap */
    min-height: calc(100vh - 106px);
    padding-bottom: var(--space-2xl);
}

/* ============================================================================
   8. SIDEBAR
   ============================================================================ */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* Widget Component */
.widget {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.widget:hover {
    border-color: var(--color-border-light);
    box-shadow: var(--shadow-lg);
}

.widget-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-lg);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

.widget-header i {
    font-size: 1.125rem;
    color: var(--color-primary);
}

.widget-header h2 {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    margin: 0;
}

.widget-body {
    padding: var(--space-md);
}

/* League List Item */
.league-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.league-item:hover {
    background: var(--color-bg-elevated);
    transform: translateX(4px);
}

body.rtl .league-item:hover {
    transform: translateX(-4px);
}

.league-item img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.league-item span {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

/* App Promo Widget */
.app-promo-widget {
    background: var(--gradient-primary);
    border: none;
}

.app-promo-content {
    text-align: center;
    padding: var(--space-lg);
}

.app-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: 2rem;
    color: var(--color-bg-primary);
}

.app-promo-content h3 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-black);
    color: var(--color-bg-primary);
    margin-bottom: var(--space-sm);
}

.app-promo-content p {
    font-size: var(--font-size-sm);
    color: rgba(0, 0, 0, 0.8);
    margin-bottom: var(--space-lg);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    transition: all var(--transition-base);
    cursor: pointer;
}

.btn-primary {
    background: var(--color-bg-primary);
    color: var(--color-primary);
    border: 2px solid var(--color-bg-primary);
}

.btn-primary:hover {
    background: transparent;
    border-color: var(--color-bg-primary);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* News Item */
.news-item {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item:hover {
    background: var(--color-bg-elevated);
}

.news-meta {
    margin-bottom: var(--space-sm);
}

.news-time {
    font-size: var(--font-size-xs);
    color: var(--color-primary);
    font-weight: var(--font-weight-bold);
}

.news-title {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Live Widget */
.live-widget .widget-header {
    background: var(--color-accent-alpha-10);
}

.live-indicator {
    width: 8px;
    height: 8px;
    background: var(--color-accent);
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.empty-state {
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: var(--font-size-sm);
    padding: var(--space-xl);
}

/* ============================================================================
   9. MAIN CONTENT
   ============================================================================ */

.main-content {
    min-width: 0;
}

/* Date Picker */
.date-picker-container {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
    background: var(--color-bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
}

.date-nav-btn {
    width: 40px;
    height: 40px;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.date-nav-btn:hover {
    background: var(--color-primary-alpha-10);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.date-picker {
    display: flex;
    gap: var(--space-sm);
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
}

.date-picker::-webkit-scrollbar {
    display: none;
}

.date-item {
    flex: 0 0 80px;
    background: var(--color-bg-tertiary);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
}

.date-item:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-border-light);
}

.date-item.active {
    background: var(--gradient-primary);
    border-color: var(--color-primary);
    color: var(--color-bg-primary);
}

.date-day {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    display: block;
    margin-bottom: var(--space-xs);
    font-weight: var(--font-weight-medium);
}

.date-item.active .date-day {
    color: rgba(0, 0, 0, 0.7);
}

.date-number {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-black);
    display: block;
    margin-bottom: var(--space-xs);
}

.date-month {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    display: block;
    font-weight: var(--font-weight-medium);
}

.date-item.active .date-month {
    color: rgba(0, 0, 0, 0.7);
}

/* Match Filters */
.match-filters {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    flex-wrap: wrap;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    font-weight: var(--font-weight-bold);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
}

.filter-btn:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-border-light);
    color: var(--color-text-primary);
}

.filter-btn.active {
    background: var(--color-primary-alpha-10);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.badge {
    background: var(--color-primary);
    color: var(--color-bg-primary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-black);
    min-width: 20px;
    text-align: center;
}

/* Matches Feed */
.matches-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* League Group */
.league-group {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.league-group-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--color-bg-elevated);
    border-bottom: 1px solid var(--color-border);
}

.league-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.league-info {
    flex: 1;
}

.league-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
}

.league-country {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    margin-top: 2px;
}

/* Match Card */
.match-card {
    display: flex;
    align-items: center;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.match-card:last-child {
    border-bottom: none;
}

.match-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.match-card:hover {
    background: var(--color-bg-elevated);
}

.match-card:hover::before {
    opacity: 1;
}

.match-card.live {
    background: var(--color-accent-alpha-10);
}

.match-card.live::before {
    background: var(--color-accent);
    opacity: 1;
}

/* Match Time */
.match-time-info {
    flex: 0 0 80px;
    text-align: center;
}

.match-time {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-black);
    color: var(--color-text-primary);
    display: block;
}

.match-status {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-tertiary);
    display: block;
    margin-top: var(--space-xs);
    text-transform: uppercase;
}

.match-card.live .match-status {
    color: var(--color-accent);
}

/* Match Teams */
.match-teams {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xl);
}

.team {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    min-width: 0;
}

.team.home {
    justify-content: flex-end;
    text-align: right;
}

.team.away {
    justify-content: flex-start;
    text-align: left;
}

.team-logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    flex-shrink: 0;
}

.team-name {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Match Score */
.match-score {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background: rgba(0, 0, 0, 0.5);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-lg);
    border: 2px solid var(--color-border);
    min-width: 100px;
    justify-content: center;
}

.score-number {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-black);
    color: var(--color-text-primary);
}

.score-separator {
    font-size: var(--font-size-lg);
    color: var(--color-text-tertiary);
}

/* Loading States */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    gap: var(--space-lg);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-skeleton {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.skeleton-item {
    height: 48px;
    background: linear-gradient(
        90deg,
        var(--color-bg-tertiary) 25%,
        var(--color-bg-elevated) 50%,
        var(--color-bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================================
   10. MOBILE NAVIGATION
   ============================================================================ */

.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 14, 18, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--color-border);
    padding: var(--space-sm) 0;
    z-index: var(--z-fixed);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    color: var(--color-text-secondary);
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-fast);
}

.mobile-nav-item i {
    font-size: 1.25rem;
}

.mobile-nav-item.active,
.mobile-nav-item:hover {
    color: var(--color-primary);
}

/* ============================================================================
   11. FOOTER
   ============================================================================ */

.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding: var(--space-2xl) 0;
    margin-top: var(--space-2xl);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xl);
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
}

.footer-brand p {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    margin: 0;
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
}

.footer-links a:hover {
    color: var(--color-primary);
}

.footer-copyright {
    color: var(--color-text-tertiary);
    font-size: var(--font-size-xs);
}

/* ============================================================================
   12. RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1200px) {
    .content-grid {
        display: flex;
        flex-direction: column;
        gap: var(--space-xl);
    }
    
    .main-content {
        order: 1;
    }
    
    .sidebar-right {
        order: 2;
        display: block;
    }
    
    .sidebar-left {
        order: 3;
        display: block;
    }

    .sidebar {
        width: 100% !important;
        position: static !important;
    }
}

@media (max-width: 768px) {
    .language-bar {
        height: 32px;
    }
    
    .header {
        height: 60px;
        top: 32px;
    }
    
    .header-content {
        height: 60px;
    }
    
    .main-container {
        margin-top: 92px;
        padding-bottom: 80px;
    }
    
    .mobile-nav {
        display: flex;
        justify-content: space-around;
    }
    
    /* Improved Match Card for Mobile */
    .match-card {
        padding: 12px;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--color-border);
        margin-bottom: 8px;
    }
    
    .match-time-info {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 6px;
        margin-bottom: 2px;
        flex: none;
    }
    
    .match-time {
        font-size: 11px;
        font-weight: 700;
        color: var(--color-primary);
    }
    
    .match-status {
        font-size: 10px;
        color: var(--color-text-tertiary);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .match-teams {
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        gap: 6px;
    }
    
    .team {
        flex: 1;
        display: flex;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        gap: 4px !important;
        overflow: hidden;
        min-width: 0;
    }
    
    .team.home {
        justify-content: flex-end;
        text-align: right;
        flex-direction: row-reverse !important;
    }
    
    .team.away {
        justify-content: flex-start;
        text-align: left;
        flex-direction: row !important;
    }
    
    .team-name {
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: var(--color-text-primary);
        flex: 1;
    }
    
    .team-logo-img {
        width: 20px;
        height: 20px;
        object-fit: contain;
        flex-shrink: 0;
    }
    
    /* Ensure order for RTL/LTR */
    body.ltr .team.home .team-name { order: 1; }
    body.ltr .team.home .team-logo-img { order: 2; }
    body.ltr .team.away .team-logo-img { order: 1; }
    body.ltr .team.away .team-name { order: 2; }

    body.rtl .team.home .team-name { order: 1; }
    body.rtl .team.home .team-logo-img { order: 2; }
    body.rtl .team.away .team-logo-img { order: 1; }
    body.rtl .team.away .team-name { order: 2; }
    
    .match-score {
        flex: 0 0 54px;
        height: 32px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 3px;
        background: var(--color-bg-tertiary);
        border: 1px solid var(--color-border);
        border-radius: 6px;
        margin: 0 4px;
    }
    
    .score-number {
        font-size: 16px;
        font-weight: 800;
        color: var(--color-primary);
    }
    
    .score-separator {
        font-size: 12px;
        opacity: 0.3;
    }

    /* Date Picker Mobile */
    .date-picker-container {
        padding: 8px;
        background: var(--color-bg-secondary);
        margin: 0 -15px 15px; /* Bleed to edges */
    }

    .date-picker {
        gap: 8px;
    }

    .date-item {
        flex: 0 0 65px;
        padding: 8px;
        min-height: 50px;
    }

    .date-day { font-size: 9px; }
    .date-number { font-size: 16px; }
    .date-month { font-size: 9px; }

    /* Widgets Mobile */
    .widget {
        margin-bottom: 20px;
        padding: 15px;
    }
    
    .widget-header h2 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .team-name {
        font-size: var(--font-size-sm);
    }
    
    .team-logo-img {
        width: 32px;
        height: 32px;
    }
    
    .score-number {
        font-size: var(--font-size-xl);
    }
}

/* ============================================================================
   13. RTL SUPPORT
   ============================================================================ */

/* Sidebar Components */
.compact-match-item {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.compact-match-item:hover {
    background: var(--color-bg-elevated);
    border-color: var(--color-primary-alpha-20);
    transform: translateX(-2px);
}

body.rtl .compact-match-item:hover {
    transform: translateX(2px);
}

.compact-match-teams {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.compact-team {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-size-sm);
}

.compact-team img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.compact-match-info {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

body.rtl .compact-match-info {
    text-align: left;
    align-items: flex-start;
}

.compact-score {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
}

.compact-status {
    font-size: 10px;
    color: var(--color-text-secondary);
}

.compact-status.live {
    color: var(--color-accent);
    font-weight: var(--font-weight-bold);
}

.clickable-comment {
    cursor: pointer;
    transition: background var(--transition-fast);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
}

.clickable-comment:hover {
    background: var(--color-bg-elevated);
}

.comment-author {
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
}

.comment-text {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    margin: 4px 0 0 0;
    line-height: 1.4;
}

/* ============================================================================
   13. RTL SUPPORT
   ============================================================================ */

body.rtl .team.home {
    justify-content: flex-start;
    text-align: left;
}

body.rtl .team.away {
    justify-content: flex-end;
    text-align: right;
}

body.rtl .match-card::before {
    left: auto;
    right: 0;
}

/* ============================================================================
   14. PRINT STYLES
   ============================================================================ */

@media print {
    .language-bar,
    .header,
    .sidebar,
    .mobile-nav,
    .footer {
        display: none;
    }
    
    .main-container {
        margin-top: 0;
    }
}
