:root {
    --primary-color: #ff8800;
    --secondary-color: #ff6b00;
    --accent-color: #ffa533;
    --bg-dark: #1a1a1a;
    --bg-light: #2a2a2a;
    --text-light: #ffffff;
    --text-gray: #cccccc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    font-family: 'Tajawal', sans-serif;
}

body {
    background: linear-gradient(135deg, #090909 0%, #080808 100%);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: -1;
}

.header {
    background: linear-gradient(45deg, var(--secondary-color), var(--primary-color));
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    box-shadow: 0 2px 20px rgba(0,0,0,0.4);
}

.logo {
    font-size: 3.5rem;
    font-weight: 900;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.header p {
    font-size: 1.2rem;
    opacity: 0.9;
}     
                
.scrollToTopBtn {
    opacity: 0;
    pointer-events: none;
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 99;
    font-size: 28px;
    border: none;
    outline: none;
    background-color: #FF7F0E; /* اللون البرتقالي */
    color: white;
    cursor: pointer;
    width: 48px;
    height: 48px;
    border-radius: 50%; /* شكل دائرة */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-weight: bold; /* خط ثقيل للسهم */
}

.scrollToTopBtn.show {
    opacity: 1;
    pointer-events: auto;
}

.scrollToTopBtn:hover {
    background-color: #e06a00; /* لون داكن عند المرور */
}

.nav-toggle {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    color: var(--text-light);
    background: none;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: none;
}

.navbar {
    background-color: var(--bg-light);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 3rem;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.1rem;
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a i {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    border-radius: 5px;
}

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

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.section {
    background-color: var(--bg-light);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: var(--primary-color);
    border-radius: 20px 0 0 20px;
}

.section:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section p {
    line-height: 1.8;
    color: var(--text-gray);
    font-size: 1.1rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature-card {
    background: linear-gradient(145deg, #2d2d2d, #222222);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.btn-container {
    text-align: center;
    margin-top: 4rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    margin: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,136,0,0.3);
    font-size: 1.1rem;
    font-weight: 700;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,136,0,0.4);
}

.statistics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
    text-align: center;
}

.stat-card {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1.1rem;
}
        
.footer {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--text-gray);
}

@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .navbar {
        padding: 0;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        align-items: center;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .nav-links.active {
        display: flex;
        animation: slideDown 0.3s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .section {
        padding: 2rem;
    }

    .logo {
        font-size: 2.5rem;
    }
      }

/* === إضافة Sidebar فقط (لمستها الوحيدة على CSS) === */
/* لاحظ: هذه الإضافة فقط — باقي CSS لم ألمسه */
.sidebar {
    position: fixed;
    top: 0;
    right: -260px; /* يبدأ مخفي */
    width: 250px;
    height: 100%;
    background: var(--bg-light);
    box-shadow: -4px 0 15px rgba(0,0,0,0.4);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: right 0.28s ease;
    z-index: 2100;
}

.sidebar.active {
    right: 0;
}

.sidebar a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 600;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    transition: background 0.18s ease, transform 0.18s ease;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateX(-6px);
}

.sidebar .close-btn {
    align-self: flex-end;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--primary-color);
    transition: transform 0.18s ease;
}

.sidebar .close-btn:hover {
    transform: rotate(90deg);
}

/* زر فتح Sidebar (موجود دومًا لكن يمكن تظليله في CSS حسب حاجتك) */
.sidebar-toggle {
    position: fixed;
    top: 18px;
    right: 18px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    font-size: 1.6rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2200;
    box-shadow: 0 4px 12px rgba(0,0,0,0.28);
    transition: background 0.2s ease, transform 0.12s ease;
}

.sidebar-toggle.hide {  
    display: none;
}

.sidebar-toggle:hover {
    background: var(--secondary-color);
        }

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* نخلي المحتوى العادي فوق */
    height: 100%;
}

.sidebar-bottom {
    margin-top: auto; /* يضغط الزرون لتحت */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-bottom::before {
    content: "";
    display: block;
    height: 1px; /* سمك الخط */
    background: rgba(255, 255, 255, 0.3); /* أبيض شفاف شوي */
    margin: 2% 10px 2% 10px; /* 2% فوق وتحت حسب ارتفاع السايدبار، 10px يمين ويسار */
    border-radius: 1px; /* عشان يكون ناعم */
}

.game-popup {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}

.game-popup.active {
  display: flex;
}

.game-popup-content {
  background: rgba(26,26,26,0.95);
  padding: 2rem;
  border-radius: 18px;
  position: relative;
}

.close-popup {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 2rem;
  cursor: pointer;
  color: #ff8800;
}

.games-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.game-option {
    width: 220px;
    padding: 1.5rem;
    text-align: center;
    background: #2a2a2a; /* لون صندوق خلفية */
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    text-decoration: none;
    color: var(--text-light);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.game-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.7);
}

.game-image {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 1rem;
    object-fit: cover; /* الصور ما تتشوه */
}

.game-title {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary-color);
    font-family: 'Tajawal', sans-serif;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.sidebar-game-icon {
    position: absolute;
    top: 20px;
    right: 10px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 2500;
    box-shadow: 0 0 8px rgba(255, 136, 0, 0.6);
    border: 1px solid rgba(0,0,0,0.5);
}
