/* المتغيرات الأساسية (CSS Variables) - مستوحاة من FotMob */
:root {
    /* الخطوط */
    --font-primary: 'IBM Plex Sans Arabic', sans-serif;
    
    /* الألوان - الوضع النهاري (Light Mode) */
    --bg-main: #f5f5f5;
    --bg-card: #ffffff;
    --bg-header: #ffffff;
    --bg-hover: #f0f0f0;
    --bg-active: #e5e5e5;
    
    --text-primary: #333333;
    --text-secondary: #717171;
    --text-muted: #9f9f9f;
    
    --color-primary: #00985f; /* أخضر FotMob */
    --color-primary-hover: #008251;
    --color-danger: #e55e5b;
    --color-warning: #f08022;
    --color-live: #e55e5b;
    
    --border-color: #eaeaea;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    
    /* التخطيط */
    --header-height: 60px;
    --container-max-width: 1200px;
}

/* الوضع الليلي (Dark Mode) */
.theme-dark {
    --bg-main: #121212;
    --bg-card: #1d1d1d;
    --bg-header: #1d1d1d;
    --bg-hover: #2d2d2d;
    --bg-active: #383838;
    
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --text-muted: #717171;
    
    --color-primary: #00b270;
    --color-primary-hover: #00985f;
    
    --border-color: #333333;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.2);
}

/* إعادة ضبط الأساسيات */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

ul {
    list-style: none;
}

input, button {
    font-family: inherit;
}

/* الشريط العلوي */
.main-header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo i {
    color: var(--color-primary);
    font-size: 1.5rem;
}

.search-bar {
    position: relative;
    width: 250px;
}

.search-bar i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-bar input {
    width: 100%;
    padding: 8px 35px 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-hover);
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s;
}

.search-bar input:focus {
    border-color: var(--color-primary);
    background-color: var(--bg-card);
}

.main-nav {
    display: flex;
    gap: 20px;
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color 0.2s;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--text-primary);
}

.theme-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.theme-toggle:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* شاشة التحميل */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    color: var(--text-secondary);
}

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

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