/* =========================================
   1. Global Reset & Base Styling
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #0b0c10;
    color: #ffffff;
    overflow-x: hidden;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.background-wrapper {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: url('assets/background.png') center/cover no-repeat; 
    filter: blur(12px) brightness(0.4);
    z-index: -1; /* هيخليها ورا كل حاجة لكن جوه الـ body */
}

/* =========================================
   3. Login & Signup Page Styles
========================================= */
.login-container {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.brand-header-top-left {
    position: absolute;
    top: 15px;
    left: 20px;
    text-align: left;
    z-index: 10;
}

.brand-logo {
    max-width: 220px; 
    height: auto;
    display: block;
    margin-bottom: -5px;
    filter: drop-shadow(0px 4px 12px rgba(0, 0, 0, 0.5));
}

.logo-text-fallback {
    font-size: 2.8rem;
    font-weight: 900;
    color: #5ab2ff; 
    margin-bottom: 5px;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0px #1a1a1a, 0 0 20px rgba(90, 178, 255, 0.3);
}

.logo-text-fallback span {
    color: #ff9800; 
}

.slogan {
    font-size: 1.05rem;
    font-weight: 700;
    color: #f1f1f1;
    margin-top: 0;
    line-height: 1;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.8);
}

.glass-card {
    width: 100%;
    max-width: 440px;
    background: #171821; 
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    padding: 35px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6);
    text-align: center;
    z-index: 5;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.illustration-box img {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 16px;
    margin-bottom: 15px;
}

.welcome-text {
    font-size: 0.85rem;
    color: #a0aec0;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group {
    position: relative;
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 14px 16px 14px 45px; 
    background: #20212c; 
    border: 1px solid #2d2f3d;
    border-radius: 12px;
    color: #ffffff;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus {
    border-color: #ff6a00;
    background: #242633;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-size: 1.1rem;
}

.toggle-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}

.toggle-icon:hover {
    color: #ffffff;
}

.form-links {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 25px;
}

.form-links a, .card-footer a {
    color: #ff9f43;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

.form-links a:hover, .card-footer a:hover {
    color: #ffffff;
}

.login-btn {
    width: 100%;
    background: linear-gradient(90deg, #ff4500, #ff8c00); 
    border: none;
    border-radius: 12px;
    padding: 14px;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(255, 69, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.6);
}

.btn-main-text { font-size: 1.25rem; font-weight: 700; }
.btn-sub-text { font-size: 0.75rem; opacity: 0.85; margin-top: 2px; }

.card-footer {
    margin-top: 25px;
    font-size: 0.9rem;
    color: #a0aec0;
}

.gender-selection {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    color: #a0aec0;
    font-size: 1.1rem;
    font-weight: 700;
}

.gender-selection label { cursor: pointer; transition: color 0.3s; }
.gender-selection label:hover { color: #ffffff; }
.gender-selection input { accent-color: #ff8c00; transform: scale(1.2); margin-right: 5px;}

.hidden { display: none !important; }

#login-view, #signup-view { animation: fadeInForm 0.4s ease-in-out; }

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

@media (max-width: 768px) {
    .brand-header-top-left {
        position: relative;
        top: 0; left: 0;
        text-align: center;
        margin-bottom: 30px;
    }
    .brand-logo { margin: 0 auto 10px auto; }
    .login-container { flex-direction: column; justify-content: flex-start; padding-top: 50px; }
}

/* =========================================
   4. Home Page Styles
========================================= */
.glass-navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 50px;
    background: rgba(11, 12, 16, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 100;
}

.nav-logo img { 
    height: 75px; 
    filter: drop-shadow(0px 2px 5px rgba(0,0,0,0.5)); 
    transition: transform 0.3s ease;
}
.nav-logo img:hover { transform: scale(1.05); }

.nav-links { list-style: none; display: flex; gap: 30px; }
.nav-links a { text-decoration: none; color: #a0aec0; font-weight: 700; transition: 0.3s; }
.nav-links a:hover, .nav-links a.active { color: #ff9800; }

.nav-profile img { 
    height: 55px; 
    width: 55px; 
    border-radius: 50%; 
    border: 2px solid #5ab2ff; 
    cursor: pointer; 
    transition: 0.3s; 
    object-fit: cover; 
    background-color: #171821; 
}
.nav-profile img:hover { transform: scale(1.1); }

.home-container {
    margin-top: 110px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-section { margin-bottom: 50px; }
.hero-title { font-size: 2.2rem; font-weight: 900; line-height: 1.3; margin-bottom: 15px; text-shadow: 2px 2px 10px rgba(0,0,0,0.8); }
.hero-title span { color: #5ab2ff; }
.hero-subtitle { font-size: 1.1rem; color: #cfd8dc; max-width: 800px; margin: 0 auto; }

.features-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    width: 100%;
    max-width: 1200px;
    margin-bottom: 60px;
    opacity: 0.6;
    pointer-events: none; 
    transition: 0.3s;
}
.features-grid.active {
    opacity: 1;
    pointer-events: auto;
}

.feature-card {
    flex: 1;
    min-width: 300px;
    max-width: 350px;
    background: linear-gradient(180deg, rgba(23, 24, 33, 0.8) 0%, rgba(14, 15, 23, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-12px);
    border-color: rgba(90, 178, 255, 0.4);
    box-shadow: 0 25px 50px rgba(90, 178, 255, 0.15);
}

.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 15px; min-height: 55px; }
.card-image { width: 100%; height: 180px; border-radius: 12px; overflow: hidden; margin-bottom: 15px; background: #171821; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.feature-card:hover .card-image img { transform: scale(1.06); }
.feature-card p { font-size: 0.9rem; color: #a0aec0; line-height: 1.5; }

.cta-section { text-align: center; margin-bottom: 60px; width: 100%; max-width: 800px; }
.cta-section h2 { font-size: 1.4rem; margin-bottom: 30px; }
.action-buttons { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }

.outline-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 12px 22px;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}
.outline-btn:hover { background: rgba(90, 178, 255, 0.08); border-color: #5ab2ff; transform: translateY(-2px); }

.primary-btn {
    background: linear-gradient(90deg, #ff4500, #ff8c00);
    border: none;
    border-radius: 30px;
    padding: 16px 40px;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 69, 0, 0.35);
    transition: 0.3s;
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255, 69, 0, 0.55); }

.main-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 50px;
    background: rgba(11, 12, 16, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: #a0aec0;
    font-size: 0.9rem;
}

.footer-right a { color: #a0aec0; text-decoration: none; margin-left: 20px; font-weight: bold; transition: 0.3s; }
.footer-right a:hover { color: #ffffff; }

@media (max-width: 900px) {
    .glass-navbar { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-logo img { height: 60px; } 
    .nav-links { gap: 15px; font-size: 0.9rem; }
    .features-grid { flex-direction: column; align-items: center; }
    .feature-card { width: 100%; max-width: 400px; }
    .main-footer { flex-direction: column; gap: 15px; text-align: center; padding: 20px; }
}
.players-table {
    width: 100%;
    margin-top: 20px;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    overflow: hidden;
}
.players-table th, .players-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}
.players-table th { color: #5ab2ff; }
.players-table th:last-child, .players-table td:last-child {
    text-align: center;
    width: 50px;
}
.fa-trash-can:hover {
    transform: scale(1.2);
    color: #ff0000 !important;
}
#games-grid {
    filter: grayscale(100%);
    opacity: 0.6;
    pointer-events: none; 
    transition: 0.5s;
}

#games-grid.active {
    filter: grayscale(0%);
    opacity: 1;
    pointer-events: auto; 
}

#user-action-zone .welcome-title {
    font-size: 2rem; color: #fff; text-align: center; margin-top: 20px;
}
#user-action-zone span { color: #ff9800; } 
.about-page {
    background-color: #0b0e14;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
}

.about-container {
    max-width: 800px;
    margin: 100px auto 50px;
    padding: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.about-section {
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
}

.about-section h1 {
    color: #ff9800;
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.lang-switcher {
    margin-bottom: 30px;
}

.lang-btn {
    background: transparent;
    border: 1px solid #ff9800;
    color: #ff9800;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.3s;
}

.lang-btn:hover {
    background: #ff9800;
    color: white;
}

.primary-btn {
    background: linear-gradient(90deg, #ff9800, #ff5722);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: transform 0.3s, box-shadow 0.3s;
}

.primary-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 87, 34, 0.4);
}

/* 6. ناف بار ثابت وشفاف */
.glass-navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(15px);
    z-index: 1000;
}
/* =========================================
   FAQ Page Styles (Accordion)
   ========================================= */

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    padding: 20px;
    font-size: 1.1rem;
    color: #ffffff;
    font-family: 'Cairo', sans-serif;
    font-weight: bold;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: #ff9800;
    background: rgba(255, 255, 255, 0.05);
}

.faq-question i {
    color: #ff9800;
    transition: transform 0.4s ease;
}

.faq-question.active {
    color: #ff9800;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
}

.faq-question.active i {
    transform: rotate(180deg); 
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: rgba(0, 0, 0, 0.2);
}

.faq-answer p {
    padding: 20px;
    color: #a0aec0;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
}
/* =========================================
   Navbar Styles (Desktop & Mobile)
   ========================================= */
.glass-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    position: relative; /* مهم عشان القايمة المنسدلة في الموبايل */
}

/* بنقسم المساحة عشان اللينكات تيجي في السنتر بالظبط */
.nav-logo {
    flex: 1;
    display: flex;
    justify-content: flex-start;
}

.nav-links {
    flex: 2; /* بتاخد المساحة الأكبر في النص */
    display: flex;
    justify-content: center;
    gap: 30px;
    list-style: none;
}

.nav-right-controls {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px; /* المسافة بين الصورة وزرار البرجر في الموبايل */
}

.menu-toggle {
    display: none; /* مخفي في اللاب توب */
    color: #ff9800;
    font-size: 1.8rem;
    cursor: pointer;
}

/* =========================================
   Mobile View (تحت 768px)
   ========================================= */
@media (max-width: 768px) {
    .glass-navbar {
        display: flex !important;
        flex-direction: row !important; /* إجبار إنهم يبقوا في سطر واحد */
        justify-content: space-between !important; /* اللوجو في طرف والزراير في طرف */
        align-items: center !important;
        flex-wrap: nowrap !important; /* بيمنعهم ينزلوا تحت بعض نهائي */
        padding: 15px 20px;
    }

    /* بنلغي الـ flex: 1 عشان مياخدوش مساحة زيادة في الموبايل تزق التاني */
    .nav-logo, .nav-right-controls {
        flex: unset !important;
    }

    .menu-toggle {
        display: block !important; /* إظهار البرجر */
    }

    /* تظبيط القايمة المنسدلة */
    .nav-links {
        display: none; 
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(26, 28, 35, 0.98);
        border-bottom: 2px solid #ff9800;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        z-index: 9999;
        box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.6);
    }

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

    .nav-links li {
        margin: 15px 0;
    }
}
/* =========================================
   Back to Home Button
   ========================================= */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px; /* المسافة بين السهم والكلمة */
    color: #a0aec0; /* لون رمادي فاتح هادي */
    text-decoration: none;
    font-family: 'Cairo', sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #ff9800; /* ينور برتقالي لما الماوس ييجي عليه */
    transform: translateX(-8px); /* يتحرك حركة خفيفة ناحية الشمال */
}