/* =========================================
   المتغيرات (الألوان الأساسية للموقع)
========================================= */
:root {
    --bg-color: #0a0a0a;
    --text-color: #ffffff;
    --pink: #ff007f;
    --green: #037a76;
    --dark-gray: #1a1a1a;
    --topgg-color: #ff3366;
}

/* =========================================
   الإعدادات العامة
========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* =========================================
   الشريط العلوي (Navbar)
========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: rgba(0, 0, 0, 0.8);
    border-bottom: 1px solid #333;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    font-weight: 900;
    color: var(--pink);
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 35px;
    height: 4px;
    background-color: var(--pink);
    border-radius: 2px;
    transition: 0.3s;
}

.menu-toggle:hover span {
    background-color: white;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* =========================================
   القائمة الجانبية (Sidebar & Overlay)
========================================= */
.overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); z-index: 999;
    opacity: 0; visibility: hidden; transition: 0.3s;
}

.overlay.active { opacity: 1; visibility: visible; }

.sidebar {
    position: fixed; top: 0; width: 320px; height: 100vh;
    background-color: var(--dark-gray); z-index: 1000;
    padding: 30px 20px; box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

[dir="rtl"] .sidebar { right: 0; transform: translateX(100%); }
[dir="rtl"] .sidebar.active { transform: translateX(0); }
[dir="ltr"] .sidebar { left: 0; transform: translateX(-100%); }
[dir="ltr"] .sidebar.active { transform: translateX(0); }

.close-btn {
    font-size: 2.5rem; color: var(--pink); cursor: pointer;
    line-height: 1; margin-bottom: 20px; transition: 0.3s;
}

[dir="rtl"] .close-btn { text-align: left; }
[dir="ltr"] .close-btn { text-align: right; }

.close-btn:hover { color: white; transform: scale(1.1); }

.sidebar-content { display: flex; flex-direction: column; gap: 15px; }

.side-link {
    color: white; text-decoration: none; font-size: 1.2rem;
    font-weight: bold; transition: 0.3s; padding: 10px 0;
}

.side-link:hover { color: var(--pink); padding-inline-start: 10px; }

.tech-link { font-size: 1rem; color: #aaa; font-weight: normal; }
.tech-link:hover { color: var(--green); }

.divider { border: 0; height: 1px; background: #333; margin: 10px 0; }

.lang-select {
    background-color: var(--bg-color); color: white;
    border: 1px solid var(--pink); padding: 10px;
    border-radius: 5px; cursor: pointer; font-weight: bold;
    outline: none; width: 100%; font-size: 1.1rem; transition: 0.3s;
}

.lang-select:hover { box-shadow: 0 0 10px rgba(255, 0, 127, 0.3); }

/* =========================================
   القسم الرئيسي (Hero Section)
========================================= */
.hero {
    display: flex; align-items: center; justify-content: space-between;
    padding: 60px 5%; min-height: 80vh; flex-wrap: wrap; gap: 40px;
}

.hero-content { flex: 1; min-width: 300px; }
.hero-content h1 { font-size: 4rem; color: var(--pink); margin-bottom: 20px; text-shadow: 0 0 15px rgba(255, 0, 127, 0.5); }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; line-height: 1.8; color: #cccccc; }

.buttons { display: flex; gap: 15px; flex-wrap: wrap; }

.btn {
    padding: 12px 35px; border-radius: 8px; text-decoration: none;
    font-weight: bold; font-size: 1.1rem; transition: 0.3s; text-align: center; cursor: pointer; border: none;
}

.btn.primary { background-color: var(--pink); color: white; border: 2px solid var(--pink); box-shadow: 0 0 15px rgba(255, 0, 127, 0.4); }
.btn.primary:hover { background-color: transparent; color: var(--pink); }

.btn.secondary { background-color: transparent; color: white; border: 2px solid var(--green); }
.btn.secondary:hover { background-color: var(--green); box-shadow: 0 0 15px rgba(3, 122, 118, 0.4); }

.btn.topgg { background-color: transparent; color: white; border: 2px solid var(--topgg-color); }
.btn.topgg:hover { background-color: var(--topgg-color); box-shadow: 0 0 15px rgba(255, 51, 102, 0.4); }

.hero-image { flex: 1; min-width: 300px; text-align: center; }
.hero-image img { max-width: 100%; border-radius: 15px; box-shadow: 0 0 30px rgba(255, 0, 127, 0.3); animation: float 4s ease-in-out infinite; }

/* =========================================
   قسم المميزات (Features)
========================================= */
.features {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; padding: 50px 5%;
}

.feature-card {
    background: var(--dark-gray); padding: 40px 20px; border-radius: 15px;
    text-align: center; border-top: 4px solid var(--pink); transition: 0.3s;
}

.feature-card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(255, 0, 127, 0.15); }
.feature-icon { font-size: 3.5rem; margin-bottom: 20px; }
.feature-card h3 { color: var(--green); margin-bottom: 15px; font-size: 1.5rem; }
.feature-card p { color: #aaa; line-height: 1.6; }

/* =========================================
   الحصالة العالمية (Piggy Bank)
========================================= */
.piggy-bank {
    padding: 60px 5%; background: linear-gradient(to bottom, var(--bg-color), #1a1500);
    text-align: center; border-top: 2px solid #ffd700;
}
.piggy-content h2 { color: #ffd700; font-size: 2.5rem; margin-bottom: 10px; text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.piggy-content p { color: #aaa; margin-bottom: 40px; font-size: 1.1rem; }
.piggy-container {
    display: inline-block; background: rgba(255, 215, 0, 0.05); padding: 40px 60px;
    border-radius: 20px; border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.15), inset 0 0 30px rgba(255, 215, 0, 0.05);
    position: relative; overflow: hidden; transition: 0.3s;
}
.piggy-container:hover { transform: scale(1.05); box-shadow: 0 0 60px rgba(255, 215, 0, 0.3), inset 0 0 40px rgba(255, 215, 0, 0.1); border-color: #ffd700; }
.piggy-icon { font-size: 5rem; margin-bottom: 15px; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.5)); }
.piggy-amount { font-size: 3.5rem; font-weight: 900; color: #fff; text-shadow: 0 0 20px #ffd700; display: flex; align-items: center; justify-content: center; gap: 10px; font-family: monospace; }
.currency { color: #ffd700; }

/* =========================================
   صانع بطاقات الدعوة (Invite Maker)
========================================= */
.invite-maker { padding: 60px 5%; background-color: #111; text-align: center; border-top: 2px solid var(--green); }
.invite-maker-content h2 { color: var(--green); font-size: 2.5rem; margin-bottom: 10px; }
.invite-maker-content p { color: #aaa; margin-bottom: 30px; font-size: 1.1rem; }
.input-group { display: flex; justify-content: center; gap: 10px; margin-bottom: 40px; flex-wrap: wrap; }
.input-group input {
    padding: 12px 20px; font-size: 1.1rem; border-radius: 8px; border: 2px solid var(--green);
    background: var(--bg-color); color: white; outline: none; width: 300px; max-width: 100%; transition: 0.3s;
}
.input-group input:focus { box-shadow: 0 0 15px rgba(3, 122, 118, 0.5); }
.card-preview-container { display: flex; flex-direction: column; align-items: center; gap: 20px; animation: popIn 0.5s ease-out forwards; }
.squid-card {
    width: 400px; height: 250px; background: #d4af37; background-image: radial-gradient(#b8860b 1px, transparent 1px);
    background-size: 10px 10px; border-radius: 15px; display: flex; flex-direction: column; justify-content: center;
    align-items: center; box-shadow: 0 15px 30px rgba(0,0,0,0.8); position: relative; color: #333;
}
.squid-card .shapes { font-size: 3rem; font-weight: 900; letter-spacing: 15px; margin-bottom: 20px; color: #222; }
.squid-card .player-name { font-size: 2rem; font-weight: 900; text-transform: uppercase; color: #111; letter-spacing: 2px; }
.squid-card .card-footer { position: absolute; bottom: 15px; font-size: 0.9rem; font-weight: bold; color: #555; text-decoration: line-through; }

/* =========================================
   طاقم الإدارة (Staff Section)
========================================= */
.staff-section { padding: 60px 5%; background-color: #050505; text-align: center; border-top: 2px solid var(--pink); }
.staff-content h2 { color: var(--pink); font-size: 2.5rem; margin-bottom: 10px; }
.staff-content p { color: #aaa; margin-bottom: 40px; font-size: 1.1rem; }
.staff-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.staff-card {
    background: #111; border: 2px solid #333; border-radius: 10px;
    padding: 30px 20px; width: 250px; transition: 0.3s;
}
.staff-card:hover { transform: translateY(-10px); border-color: var(--pink); box-shadow: 0 10px 20px rgba(255,0,127,0.2); }
.front-man { border-color: #ffd700; box-shadow: 0 0 15px rgba(255,215,0,0.2); width: 300px; }
.front-man:hover { border-color: #ffd700; box-shadow: 0 10px 30px rgba(255,215,0,0.4); }
.mask-icon { font-size: 4rem; margin-bottom: 15px; color: #fff; }
.front-man .mask-icon { color: #ffd700; }
.staff-role { color: white; font-size: 1.5rem; margin-bottom: 10px; }
.staff-desc { color: #888; font-size: 0.9rem; line-height: 1.5; }

/* =========================================
   نافذة المُجنّد (Recruiter Widget)
========================================= */
.recruiter-widget { position: fixed; bottom: 30px; right: 30px; z-index: 1000; display: flex; flex-direction: column; align-items: flex-end; }
[dir="ltr"] .recruiter-widget { right: 30px; left: auto; }
[dir="rtl"] .recruiter-widget { left: 30px; right: auto; align-items: flex-start; }

.recruiter-tooltip {
    background: var(--pink); color: white; padding: 10px 15px; border-radius: 10px;
    margin-bottom: 15px; font-weight: bold; box-shadow: 0 5px 15px rgba(255,0,127,0.4);
    animation: bounce 2s infinite; cursor: pointer;
}
.recruiter-icon {
    width: 60px; height: 60px; background: #222; border: 2px solid var(--pink);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 2rem; cursor: pointer; box-shadow: 0 0 20px rgba(255,0,127,0.5); transition: 0.3s;
}
.recruiter-icon:hover { transform: scale(1.1); }

.recruiter-chat {
    position: absolute; bottom: 80px; background: #1a1a1a; width: 300px;
    border-radius: 15px; border: 2px solid var(--pink); box-shadow: 0 10px 30px rgba(0,0,0,0.8);
    display: none; flex-direction: column; overflow: hidden;
}

/* التعديل الجديد لضمان بقاء النافذة داخل الشاشة */
[dir="rtl"] .recruiter-chat { left: 0; right: auto; }
[dir="ltr"] .recruiter-chat { right: 0; left: auto; }

.chat-header { background: var(--pink); color: white; padding: 15px; font-weight: bold; display: flex; justify-content: space-between; align-items: center; }
#close-chat { background: none; border: none; color: white; font-size: 1.5rem; cursor: pointer; }
.chat-body { padding: 20px; display: flex; flex-direction: column; gap: 15px; }
.msg { background: #333; padding: 10px 15px; border-radius: 10px; font-size: 0.95rem; line-height: 1.5; }
.bot-msg { border-right: 3px solid var(--pink); }
[dir="ltr"] .bot-msg { border-right: none; border-left: 3px solid var(--pink); }
.chat-options { display: flex; flex-direction: column; gap: 10px; }
.chat-btn { padding: 10px; border: none; border-radius: 8px; cursor: pointer; font-weight: bold; transition: 0.3s; }
.play-btn { background: var(--green); color: white; }
.play-btn:hover { background: #025a57; }
.no-btn { background: #444; color: white; }
.no-btn:hover { background: #555; }
.invite-action-btn { background: var(--pink); color: white; text-align: center; text-decoration: none; padding: 10px; border-radius: 8px; font-weight: bold; display: block; margin-top: 10px; }

/* =========================================
   صفحة الخطأ 404 (Error Page)
========================================= */
.error-page { display: flex; justify-content: center; align-items: center; min-height: 85vh; text-align: center; padding: 20px; }
.error-content {
    background: rgba(26, 26, 26, 0.8); padding: 50px 30px; border-radius: 15px;
    border-top: 5px solid red; box-shadow: 0 0 40px rgba(255, 0, 0, 0.2);
    max-width: 600px; width: 100%; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.error-code { font-size: 8rem; font-weight: 900; color: red; text-shadow: 0 0 20px rgba(255, 0, 0, 0.8); margin-bottom: 10px; letter-spacing: 5px; line-height: 1; }
.error-title { font-size: 2.5rem; color: white; margin-bottom: 15px; text-transform: uppercase; }
.error-desc { font-size: 1.2rem; color: #aaa; margin-bottom: 40px; line-height: 1.6; }

/* =========================================
   تذييل الصفحة (Footer)
========================================= */
footer { text-align: center; padding: 20px; background-color: rgba(0, 0, 0, 0.8); border-top: 1px solid #333; color: #888; font-size: 0.9rem; }

/* =========================================
   الحركات (Animations)
========================================= */
@keyframes float { 0% { transform: translateY(0px); } 50% { transform: translateY(-15px); } 100% { transform: translateY(0px); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(0.8); } 100% { opacity: 1; transform: scale(1); } }

/* =========================================
   التجاوب مع شاشات الجوال (Mobile Responsive)
========================================= */
@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; padding-top: 40px; }
    .hero-content h1 { font-size: 2.8rem; }
    .buttons { justify-content: center; }
    .btn { width: 100%; }
    .piggy-amount { font-size: 2.2rem; }
    .piggy-container { padding: 30px 20px; }
    .squid-card { width: 100%; max-width: 350px; height: 220px; }
}
