/* ============================================================
   Spitfire57 — css/shell.css
   الهيكل الثابت للصفحات: الشريط العلوي، قائمة الجوال،
   زر الثيم، شاشة التحميل، والتذييل بروابطه وأيقوناته.

   تربطه الصفحات ذات التصميم القياسي فقط، بعد main.css:
     <link rel="stylesheet" href="css/main.css">
     <link rel="stylesheet" href="css/shell.css">

   صفحات لها هيكل خاص (knockout / worldcup / RamadanRecap2026)
   لا تربط هذا الملف وتحتفظ بهيكلها في ملفها الخاص.
   ============================================================ */


/* ---------- شاشة التحميل / Loader ---------- */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

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

.loader-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--neon-cyan);
    animation: pulse 1.5s ease-in-out infinite;
    margin-bottom: 20px;
}

.loader-text {
    font-family: var(--font-body);
    color: var(--neon-cyan);
    font-size: 1.2rem;
    animation: blink 1s ease-in-out infinite;
}

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


/* ---------- شريط التنقل / Navbar ---------- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 15px 30px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

[data-theme="light"] .navbar {
    background: rgba(245, 245, 245, 0.9);
}

.navbar.scrolled {
    padding: 10px 30px;
    box-shadow: var(--glow-cyan);
}

.navbar-content {
    max-width: 1400px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transition: transform var(--transition-normal);
}

.nav-logo:hover img {
    transform: scale(1.1) rotate(5deg);
}

.nav-logo span {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    padding: 5px 0;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-neon);
    transition: width var(--transition-normal);
}

.nav-links a:hover {
    color: var(--neon-cyan);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-accent);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    color: var(--text-primary);
}

.theme-toggle:hover {
    border-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transform: rotate(180deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .sun-icon {
    display: block;
}

[data-theme="light"] .theme-toggle .moon-icon {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: all var(--transition-normal);
}


/* ---------- التذييل / Footer ---------- */

.footer {
    background: var(--bg-secondary);
    padding: 80px 20px 40px;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    max-width: 1200px;
}

.footer-top {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--neon-cyan);
}

.footer-logo span {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-neon);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.footer-section h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    margin-bottom: 25px;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient-neon);
    border-radius: 2px;
}

.social-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    text-decoration: none;
}

.social-link:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-5px);
    box-shadow: var(--glow-cyan);
}

.social-link.kick:hover {
    border-color: #53fc18;
    color: #53fc18;
}

.social-link.twitch:hover {
    border-color: #9146ff;
    color: #9146ff;
}

.social-link.youtube:hover {
    border-color: #ff0000;
    color: #ff0000;
}

.social-link.twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
}

.social-link.discord:hover {
    border-color: #5865f2;
    color: #5865f2;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--neon-cyan);
}

.gear-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.gear-link:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
}

.gear-link svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.gear-link-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid var(--border-subtle);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-copyright span {
    color: var(--neon-cyan);
}


/* ---------- عناصر مشتركة / Utilities ---------- */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.7); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(0, 212, 255, 0); }
}

.page-title {
    font-weight: 800;
}


/* ---------- التجاوب مع الشاشات / Responsive ---------- */

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.active {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .footer-top {
        grid-template-columns: 1fr;
    }
}


/* ---------- موحّد بين الصفحات / Unified across pages ---------- */


.footer-bottom {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

.footer-content {
    margin: 0 auto;
}

.footer-links a {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.footer-links a:hover {
    transform: translateX(-5px);
}

.gear-link:hover {
    background: var(--bg-card-hover);
    box-shadow: var(--glow-cyan);
    transform: translateX(-5px);
}

.navbar-content {
    margin: 0 auto;
}

.social-link.instagram:hover {
    border-color: #e4405f;
    color: #e4405f;
}

.social-link.tiktok:hover {
    border-color: #ff0050;
    color: #ff0050;
}

@media (max-width: 1024px) {
    .footer-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .nav-logo span {
        display: none;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-top {
        gap: 40px;
        grid-template-columns: 1fr;
    }
}

/* ---------- زر تبديل اللغة / Language switch ---------- */

.lang-toggle {
    background: transparent;
    border: 2px solid var(--border-accent);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    padding: 0;
}

.lang-toggle:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
}

/* النص العربي في الزر يحتاج خط النصوص لا خط العناوين */
html[lang="en"] .lang-toggle {
    font-family: var(--font-body);
    font-size: 1rem;
}


/* ---------- تصحيحات الاتجاه للوضع الإنجليزي / LTR fixes ---------- */

[dir="ltr"] .footer-section h4::after {
    right: auto;
    left: 0;
}

[dir="ltr"] .footer-links a:hover {
    transform: translateX(5px);
}

[dir="ltr"] .gear-link:hover {
    transform: translateX(5px);
}
