       /* بخشااولیه مهم */
        html, body {
            height: 100%;
            margin: 0;
        }
        /* =========================================
           تنظیمات متغیرها و ریست (Variables)
           ========================================= */
        :root {
            --neon-pink: #ff00ff;
            --neon-blue: #00ffff;
            --neon-purple: #bc13fe;
            --neon-green: #0aff00;
            --bg-dark: #050510;
            --glass-bg: rgba(20, 20, 35, 0.6);
            --glass-border: rgba(255, 255, 255, 0.1);
            --text-main: #ffffff;
            --text-muted: #a0a0b0;
            --sidebar-width: 280px;
            --transition-speed: 0.4s;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Vazirmatn', sans-serif;
            outline: none;
            user-select: none; /* جلوگیری از انتخاب متن برای حس اپلیکیشن */
        }

        body {
            background-color: var(--bg-dark);
            color: var(--text-main);
            height: 100vh;
            overflow: hidden; /* جلوگیری از اسکرول کلی */
            display: flex;
            position: relative;
        }

        /* بوم پارتیکل‌ها */
        #particle-canvas {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
        }

        /* =========================================
           کامپوننت‌های UI عمومی
           ========================================= */
        .btn {
            padding: 12px 25px;
            border-radius: 12px;
            border: none;
            cursor: pointer;
            font-weight: 900;
            font-size: 1rem;
            transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            position: relative;
            overflow: hidden;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            z-index: 2;
        }

        .btn::after {
            content: '';
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
            transform: translateX(-100%);
            transition: 0.5s;
        }

        .btn:hover::after { transform: translateX(100%); }

        .btn-primary {
            background: linear-gradient(90deg, var(--neon-purple), var(--neon-pink));
            color: white;
            box-shadow: 0 0 15px rgba(188, 19, 254, 0.5);
        }
        
        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 0 25px rgba(188, 19, 254, 0.8);
        }

        .btn-outline {
            background: transparent;
            border: 2px solid var(--neon-blue);
            color: var(--neon-blue);
        }

        .btn-outline:hover {
            background: rgba(0, 255, 255, 0.1);
            box-shadow: 0 0 15px rgba(0, 255, 255, 0.4);
        }

        .hidden { display: none !important; }

        /* =========================================
           سایدبار (پنل کشویی)
           ========================================= */
        .sidebar {
            width: var(--sidebar-width);
            height: 100%;
            background: rgba(10, 10, 20, 0.85);
            backdrop-filter: blur(15px);
            border-left: 1px solid var(--glass-border);
            position: absolute;
            right: 0;
            top: 0;
            z-index: 100;
            transform: translateX(0);
            transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        }

        .sidebar.collapsed {
            transform: translateX(100%);
        }

        .sidebar-header {
            padding: 30px 20px;
            text-align: center;
            border-bottom: 1px solid var(--glass-border);
            background: linear-gradient(180deg, rgba(188, 19, 254, 0.1), transparent);
        }

        .logo-text {
            font-size: 1.8rem;
            font-weight: 900;
            background: linear-gradient(to right, var(--neon-blue), var(--neon-pink));
            -webkit-text-fill-color: transparent;
            margin-bottom: 10px;
        }

        .user-stats-card {
            background: rgba(255,255,255,0.05);
            border-radius: 15px;
            padding: 15px;
            margin-top: 15px;
            display: flex;
            justify-content: space-around;
            border: 1px solid rgba(255,255,255,0.1);
        }

        .stat-item { text-align: center; }
        .stat-val { font-size: 1.2rem; font-weight: bold; color: var(--neon-green); }
        .stat-label { font-size: 0.75rem; color: var(--text-muted); }

        .nav-links {
            flex: 1;
            padding: 20px 10px;
            overflow-y: auto;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 15px 20px;
            margin-bottom: 10px;
            border-radius: 12px;
            cursor: pointer;
            transition: 0.3s;
            color: var(--text-muted);
            border: 1px solid transparent;
        }

        .nav-item i { width: 30px; font-size: 1.2rem; margin-left: 10px; }
        
        .nav-item:hover, .nav-item.active {
            background: linear-gradient(90deg, rgba(188, 19, 254, 0.2), transparent);
            color: white;
            border-right: 4px solid var(--neon-pink);
        }

        .sidebar-footer {
            padding: 20px;
            border-top: 1px solid var(--glass-border);
        }

        /* دکمه باز/بسته کردن منو */
        #toggle-sidebar-btn {
            position: fixed;
            top: 20px;
            right: 20px;
            width: 50px;
            height: 50px;
            background: rgba(0,0,0,0.5);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 101;
            color: white;
            border: 1px solid var(--neon-blue);
            transition: 0.3s;
        }
        
        #toggle-sidebar-btn:hover {
            background: var(--neon-blue);
            color: #000;
            box-shadow: 0 0 20px var(--neon-blue);
        }

        /* =========================================
           محتوای اصلی
           ========================================= */
        .main-content {
            flex: 1;
            height: 100%;
            padding: 80px 40px 40px 40px; /* فضای خالی برای دکمه منو */
            overflow-y: auto;
            position: relative;
            z-index: 10;
            transition: padding-right var(--transition-speed);
        }

        /* وقتی سایدبار باز است */
        body:not(.sidebar-open) .main-content { padding-right: 40px; }
        body.sidebar-open .main-content { padding-right: calc(var(--sidebar-width) + 40px); }

        /* اسکرول بار سفارشی */
        ::-webkit-scrollbar { width: 8px; }
        ::-webkit-scrollbar-track { background: #0a0a15; }
        ::-webkit-scrollbar-thumb { background: var(--neon-purple); border-radius: 4px; }

        /* گرید کارت‌ها */
        .grid-container {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 30px;
            margin-top: 20px;
        }

        /* کارت‌ها */
        .card {
            background: var(--glass-bg);
            border: 1px solid var(--glass-border);
            border-radius: 20px;
            padding: 0;
            transition: 0.4s;
            position: relative;
            overflow: hidden;
            backdrop-filter: blur(10px);
        }

        .card:hover {
            transform: translateY(-10px) scale(1.02);
            border-color: var(--neon-blue);
            box-shadow: 0 10px 30px rgba(0, 255, 255, 0.15);
        }

        .card-img {
            width: 100%;
            height: 180px;
            object-fit: cover;
            border-bottom: 1px solid var(--glass-border);
        }

        .card-body { padding: 20px; }
        .card-title { font-size: 1.4rem; margin-bottom: 10px; color: white; }
        .card-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; height: 60px; overflow: hidden; }
        
        .price-tag {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: 900;
            color: var(--neon-green);
            font-size: 1.2rem;
            margin-bottom: 15px;
        }
        body {
            display: flex;
            flex-direction: column;
        }
        /* اطلاعت سازنده */
        .site-footer {
            position: fixed;
            bottom: 0;
            left: 0;
            background: #0a0a0a;
            border-top: 2 px solid #00ff9d;
            padding: 12px 0;
            text-align: center;
            z-index: 9999;
        }
        .footer-info {
            color: #00ff9d;
            font-size: 14px;
            display: flex;
            justify-content: center;
            gap: 20px;
            text-shadow: 0 0 8px #00ff9d;
            flex-wrap: wrap;

        }
        /* =========================================
           محیط بازی (Game UI)
           ========================================= */
        .game-wrapper {
            max-width: 900px;
            margin: 0 auto;
            background: rgba(15, 15, 30, 0.9);
            border-radius: 30px;
            padding: 40px;
            text-align: center;
            border: 2px solid var(--neon-purple);
            box-shadow: 0 0 50px rgba(188, 19, 254, 0.2);
            position: relative;
        }

        .game-header { display: flex; justify-content: space-between; margin-bottom: 30px; font-size: 1.2rem; }
        
        .timer-container {
            width: 100%;
            height: 10px;
            background: #222;
            border-radius: 5px;
            margin: 20px 0 40px 0;
            overflow: hidden;
            box-shadow: inset 0 0 5px #000;
        }
        
        .timer-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--neon-green), var(--neon-blue));
            width: 100%;
            transition: width 1s linear;
        }

        .question-box {
            font-size: 3rem;
            font-weight: 900;
            margin: 30px 0;
            direction: ltr;
            text-shadow: 0 0 20px rgba(255,255,255,0.3);
        }

        .options-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .option-btn {
            background: rgba(255,255,255,0.05);
            border: 2px solid var(--glass-border);
            padding: 25px;
            border-radius: 15px;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            transition: 0.2s;
        }

        .option-btn:hover { background: rgba(188, 19, 254, 0.2); border-color: var(--neon-purple); }
        .option-btn.correct { background: var(--neon-green); color: #000; transform: scale(1.05); box-shadow: 0 0 20px var(--neon-green); }
        .option-btn.wrong { background: var(--neon-pink); color: white; animation: shake 0.5s; }

        @keyframes shake {
            0% { transform: translateX(0); } 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } 100% { transform: translateX(0); }
        }

        /* =========================================
           صفحه ورود (Auth)
           ========================================= */
        #auth-screen {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: #050510; z-index: 2000;
            display: flex; justify-content: center; align-items: center;
        }
        
        .auth-box {
            width: 400px; padding: 40px; background: var(--glass-bg);
            border-radius: 20px; border: 1px solid var(--neon-blue);
            text-align: center; box-shadow: 0 0 50px rgba(0,255,255,0.2);
        }

        input {
            width: 100%; padding: 15px; margin: 15px 0;
            background: rgba(0,0,0,0.5); border: 1px solid #444;
            border-radius: 10px; color: white; font-size: 1.1rem;
            transition: 0.3s;
        }
        
        input:focus { border-color: var(--neon-blue); box-shadow: 0 0 15px rgba(0,255,255,0.3); }

        /* توست نوتیفیکیشن */
        #toast {
            position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
            background: #222; color: white; padding: 15px 30px; border-radius: 50px;
            border: 1px solid var(--neon-purple); z-index: 3000;
            opacity: 0; pointer-events: none; transition: 0.4s;
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        #toast.show { opacity: 1; bottom: 50px; }
