:root {
    --primary: #3b82f6;
    --secondary: #6366f1;
    --bg-dark: #050505;
    --glass: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text: #f1f5f9;
    --text-dim: #94a3b8;
    --card-bg: rgba(10, 10, 15, 0.7);
    --accent: #3b82f6;
}

body {
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Cairo', 'Inter', sans-serif;
    margin: 0;
    overflow-x: hidden;
    line-height: 1.6;
}

#vanta-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.5;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
}

.gradient-text {
    background: linear-gradient(135deg, #fff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.3));
    /* إصلاح مشكلة الحرف المخفي في النصوص العربية */
    padding-inline-start: 2px;
    padding-inline-end: 2px;
    display: inline-block;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Technical UI */
.btn-premium {
    position: relative;
    background: var(--primary);
    color: #fff;
    padding: 16px 40px;
    border-radius: 16px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    overflow: hidden;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: none;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.5);
    background: #2563eb;
}

.card-luxury {
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-luxury:hover {
    border-color: var(--primary);
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.neon-tag {
    padding: 6px 16px;
    border-radius: 99px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Dashboard Styling */
.dashboard-grid {
    display: grid;
    gap: 24px;
}

.glass-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 24px;
}


.rating-card {
    transition: 0.5s;
}

.rating-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

#ratings-slider {
    padding: 20px 0;
}

/* Dashboard Stats Tidy Effect */
.glass-card.p-8 {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-card.p-8:hover {
    background: rgba(59, 130, 246, 0.03);
    border-bottom-color: var(--primary) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.glass-card.p-8::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: translateX(-100%);
    transition: 0.6s;
}

.glass-card.p-8:hover::after {
    transform: translateX(100%);
}

/* إصلاح مشكلة الحرف المخفي - عام */
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow: visible;
    padding-inline-start: 1px;
}

/* إصلاح مخصص للعناوين الكبيرة */
.text-4xl.font-black,
.text-5xl.font-black,
.text-3xl.font-black {
    overflow: visible;
    padding-inline-start: 2px;
}

/* صفحة الدفع */
#payment-page {
    scrollbar-width: thin;
    scrollbar-color: #3b82f6 #050505;
}

/* أزرار التبويب */
.tab-btn.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

/* لعبة الثعبان */
#snake-canvas {
    image-rendering: pixelated;
    display: block;
}

/* زر ردة الفعل */
#reaction-btn {
    cursor: pointer;
    user-select: none;
    transition: background 0.1s, transform 0.1s;
}

#reaction-btn:active {
    transform: scale(0.97);
}

/* نظام اللوقات */
.glass-toast {
    background: rgba(10, 10, 20, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 3px solid #22c55e;
    padding: 14px 20px;
    border-radius: 16px;
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: white;
    animation: slideIn 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes slideIn {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(-100px);
        opacity: 0;
    }
}

/* تحسين الشبكة المتجاوبة */
@media (max-width: 768px) {
    .grid.md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid.lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    #payment-page .grid {
        grid-template-columns: 1fr;
    }
}