/* فونت و متغیرها */
@font-face {
    font-family: 'LeekoFont';
    src: url('assets/fonts/NotoSansArabic-Medium.ttf') format('truetype');
}

:root {
    --brand-blue: #001165;
    --brand-orange: #FF9200;
    --bg-white: #ffffff;
    --bg-light: #f9f9f9;
    --text-dark: #333333;
    --border-color: #e5e5e5;
}

* {
    box-sizing: border-box; margin: 0; padding: 0;
    font-family: 'LeekoFont', Tahoma, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    padding-bottom: 80px; /* جا برای منوی پایین */
}

/* --- هدر بالا --- */
.site-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05); 
}

.site-logo {
    height: 40px; /* ارتفاع لوگو را تنظیم می‌کند تا هدر به هم نریزد */
    width: auto;  /* عرض را خودکار تنظیم می‌کند تا نسبت تصویر حفظ شود */
    display: block;
}

.logo-link {
    display: flex;
    align-items: center;
}

.header-left { display: flex; gap: 15px; }
.icon-wrapper { position: relative; font-size: 1.4rem; color: #555; }
.badge {
    position: absolute; top: -5px; right: -8px;
    background: var(--brand-orange); color: white;
    font-size: 0.7rem; width: 16px; height: 16px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.menu-icon { font-size: 1.4rem; color: #555; }

/* --- باکس جستجو --- */
.search-section { padding: 10px 20px; }
.search-box {
    background: #f0f3f8; /* رنگ پس زمینه باکس جستجو در عکس */
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.search-box input {
    border: none; background: transparent;
    width: 100%; padding: 0 10px;
    font-size: 0.9rem; outline: none; text-align: right;
}

.search-btn {
    background: var(--brand-orange); color: white;
    border: none; padding: 8px 20px;
    border-radius: 6px; font-weight: bold; font-size: 0.9rem;
}

/* --- بخش Hero (ویدیو و دکمه‌ها) --- */
.hero-section { padding: 20px; text-align: center; }

.video-placeholder {
    width: 100%; height: 200px;
    background: #4a4a4a; /* رنگ طوسی تیره ویدیو */
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

.play-circle {
    width: 50px; height: 50px;
    border: 2px solid var(--brand-orange);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-orange); font-size: 1.2rem;
}

.hero-title { color: var(--brand-blue); font-size: 1.1rem; margin-bottom: 10px; }
.hero-desc { color: #666; font-size: 0.85rem; line-height: 1.6; margin-bottom: 20px; }

.hero-buttons { display: flex; gap: 10px; justify-content: center; }

.btn {
    flex: 1; padding: 12px 0; border-radius: 8px;
    font-weight: bold; font-size: 0.9rem; cursor: pointer;
}
.btn-solid {
    background: var(--brand-orange); color: white; border: none;
}
.btn-outline {
    background: white; color: var(--brand-orange);
    border: 1px solid var(--brand-orange);
}

/* --- لیست بازی‌ها --- */
.games-section { padding: 0 20px; margin-top: 10px; }

.section-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 15px; border-bottom: 1px solid #eee; padding-bottom: 10px;
}
.sec-title { color: var(--brand-blue); font-size: 1rem; }
.view-all { color: var(--brand-orange); font-size: 0.8rem; text-decoration: none; }

.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

/* کارت بازی (استایل جدید و روشن) */
.game-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.game-img { width: 100%; height: 100px; object-fit: cover; background: #ddd; }
.card-body { padding: 10px; text-align: center; }
.g-title { font-size: 0.85rem; color: var(--brand-blue); margin-bottom: 8px; font-weight: bold; }
.g-btn {
    width: 100%; background: white; border: 1px solid var(--brand-orange);
    color: var(--brand-orange); padding: 5px; border-radius: 5px; font-size: 0.8rem;
}

/* --- منوی پایین --- */
.bottom-nav {
    position: fixed; bottom: 0; width: 100%; height: 70px;
    background: white; border-top: 1px solid #eee;
    display: flex; justify-content: space-around; align-items: center;
    z-index: 100;
}
.nav-item {
    text-decoration: none; color: #888;
    display: flex; flex-direction: column; align-items: center;
    font-size: 0.75rem;
}
.nav-item i { font-size: 1.4rem; margin-bottom: 5px; }
.nav-item.active { color: var(--brand-orange); }

/* --- Game Overlay (Modal Style) --- */
.game-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
}
.game-overlay.hidden { display: none; }
.game-window {
    width: 90%; max-width: 400px; background: white;
    border-radius: 15px; overflow: hidden;
}
.gw-header {
    background: var(--brand-blue); color: white;
    padding: 10px 15px; display: flex; justify-content: space-between; align-items: center;
}
#close-game-btn { background: none; border: none; color: white; font-size: 1.2rem; }
.gw-body { padding: 20px; min-height: 300px; display: flex; justify-content: center; align-items: center; }

/* استایل دوز داخل مودال */
.tictac-board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.cell {
    width: 60px; height: 60px; background: #f0f0f0;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; border-radius: 5px; cursor: pointer;
}
.cell.x { color: var(--brand-orange); }
.cell.o { color: var(--brand-blue); }