:root {
    --primary: #6366f1;
    --primary-alt: #818cf8;
    --secondary: #ec4899;
    --dark: #0f172a;
    --darker: #020617;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-heavy: rgba(15, 23, 42, 0.98);
    --border: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --gold: #fbbf24;
    --cyan: #06b6d4;
    --red: #ef4444;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--darker);
    color: var(--text);
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Typography */
h1, h2, h3, h4 { font-weight: 950; color: #fff; line-height: 1.2; }

/* Nav */
.glass-nav {
    position: fixed; top: 0; width: 100%; z-index: 5000; padding: 1.2rem 5%;
    background: rgba(2, 6, 23, 0.9); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }
.logo { font-size: 1.6rem; font-weight: 950; color: white; }
.logo span { color: var(--secondary); }
.nav-links { display: flex; gap: 2.5rem; }
.nav-link-item { text-decoration: none; color: #cbd5e1; font-weight: 700; transition: 0.3s; }
.nav-link-item:hover { color: var(--primary-alt); }

/* Buttons */
.btn {
    padding: 1rem 2.2rem; border-radius: 16px; font-weight: 800; font-size: 1.05rem;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.8rem;
    cursor: pointer; transition: 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.15); color: #fff !important; text-decoration: none;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-alt)); }
.btn-glass { background: var(--glass); backdrop-filter: blur(10px); }
.btn:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.5); }
.btn-small { padding: 0.6rem 1.4rem; font-size: 0.9rem; border-radius: 12px; }

/* Hero */
.hero-section { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 120px 5% 60px; }
.main-title { font-size: clamp(3rem, 10vw, 6rem); margin-bottom: 2rem; }
.gradient-text { 
    background: linear-gradient(to right, #818cf8, #ec4899, #fbbf24, #818cf8);
    background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: flow 5s linear infinite; 
}
@keyframes flow { to { background-position: 200% center; } }
.hero-subtitle { font-size: 1.4rem; color: #cbd5e1; max-width: 800px; margin: 0 auto 3.5rem; }
.hero-actions { display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap; }

/* Grid & Cards - FIXED VISIBILITY */
.section { padding: 100px 5% 80px; max-width: 1400px; margin: 0 auto; clear: both; }
.section-header { text-align: center; margin-bottom: 5rem; width: 100%; }
.section-title { font-size: 3.5rem; margin-bottom: 1rem; }

.games-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 2rem; 
    width: 100%; 
    min-height: 400px;
}

.game-card { 
    padding: 2.5rem 2rem; border-radius: 24px; background: var(--glass); 
    border: 1px solid var(--border); text-align: center; cursor: pointer;
    transition: 0.4s;
    display: flex; flex-direction: column; align-items: center;
    opacity: 1 !important;
}
.game-card:hover { transform: translateY(-12px); border-color: var(--primary-alt); background: rgba(255,255,255,0.12); }

.game-icon-box { width: 70px; height: 70px; border-radius: 20px; margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: center; }
.game-icon-box svg { width: 35px; height: 35px; stroke-width: 2.5px; }

.blue { background: rgba(99,102,241,0.15); color: #818cf8; }
.pink { background: rgba(236,72,153,0.15); color: #f472b6; }
.gold { background: rgba(251,191,36,0.15); color: #fbbf24; }
.green { background: rgba(34,197,94,0.15); color: #4ade80; }
.purple { background: rgba(168,85,247,0.15); color: #c084fc; }
.orange { background: rgba(249,115,22,0.15); color: #fb923c; }
.cyan { background: rgba(6,182,212,0.15); color: #22d3ee; }
.red { background: rgba(239,68,68,0.15); color: #f87171; }

.game-card h3 { font-size: 1.6rem; margin-bottom: 0.8rem; }
.game-card p { font-size: 1rem; color: var(--text-dim); }

/* Modal */
.game-overlay-v3 { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(2, 6, 23, 0.98); z-index: 10000; display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-mega { 
    width: 100%; max-width: 950px; height: 90vh; background: var(--dark); border-radius: 35px; 
    border: 1px solid var(--border); display: flex; flex-direction: column; padding: 2.5rem;
}
.modal-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.close-btn-mega { background: none; border: none; color: #fff; font-size: 3rem; cursor: pointer; }

/* Aura */
.custom-cursor {
    width: 60px; height: 60px; border: 1px solid rgba(99, 102, 241, 0.3); border-radius: 50%;
    position: fixed; pointer-events: none; z-index: 9999; display: none; mix-blend-mode: screen;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .main-title { font-size: 3rem; }
    .hero-actions { flex-direction: column; }
    .btn { width: 100%; }
}
