:root {
    /* پالت رنگی جدید و جذاب */
    --primary-color: #4e54c8;
    --secondary-color: #8f94fb;
    --accent-color: #ff9f43;
    --success-color: #00b894;
    --danger-color: #ff7675;
    
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.6);
    --text-main: #2d3436;
    --text-light: #636e72;
}

/* پس‌زمینه متحرک و زنده */
body {
    font-family: 'Vazir', sans-serif !important;
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    color: var(--text-main);
    padding-bottom: 80px;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* استایل دارک مود (برای شب) */
[data-theme="dark"] body {
    background: linear-gradient(-45deg, #1a1a1a, #2d3436, #000000);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: #dfe6e9;
}
[data-theme="dark"] .glass-card, 
[data-theme="dark"] .widget-card, 
[data-theme="dark"] .att-card {
    background: rgba(40, 40, 40, 0.85);
    border-color: rgba(255, 255, 255, 0.1);
    color: #dfe6e9;
}
[data-theme="dark"] .text-main, [data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: #fff !important;
}
[data-theme="dark"] .text-muted { color: #b2bec3 !important; }


/* کارت‌های شیشه‌ای */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.glass-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.25);
}

/* کارت قهرمان (مخصوص دانش‌آموز) */
.hero-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 24px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(118, 75, 162, 0.4);
    position: relative;
    margin-bottom: 25px;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: rotate 20s linear infinite;
}
@keyframes rotate { from {transform: rotate(0deg);} to {transform: rotate(360deg);} }

.hero-avatar {
    width: 90px; height: 90px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px;
    border: 4px solid rgba(255,255,255,0.6);
    font-size: 3rem;
    position: relative;
    z-index: 1;
}
.hero-balance {
    font-size: 3.5rem;
    font-weight: 900;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    margin: 5px 0;
    line-height: 1;
    position: relative; z-index: 1;
}

/* ویجت‌های کوچک */
.widget-card {
    background: white;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    height: 100%;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s;
}
.widget-card:active { transform: scale(0.95); }

/* دکمه‌ها */
.btn-gradient-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white; border: none;
    box-shadow: 0 4px 15px rgba(118, 75, 162, 0.4);
    transition: all 0.3s;
}
.btn-gradient-primary:hover {
    box-shadow: 0 6px 20px rgba(118, 75, 162, 0.6);
    transform: translateY(-2px);
    color: white;
}

/* لیست‌ها */
.s-row {
    padding: 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: background 0.2s;
}
.s-row:last-child { border-bottom: none; }
.s-row:hover { background-color: rgba(0,0,0,0.02); }

/* رده‌بندی */
.rank-1 { background: linear-gradient(45deg, #FFD700, #FDB931); color: black; border: none; box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4); transform: scale(1.02); }
.rank-2 { background: linear-gradient(45deg, #E0E0E0, #BDBDBD); color: black; border: none; }
.rank-3 { background: linear-gradient(45deg, #CD7F32, #A0522D); color: white; border: none; }

/* انیمیشن‌ها */
.animate-up { animation: fadeInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

.blink { animation: pulse-red 1.5s infinite; }
@keyframes pulse-red { 0% { box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7); } 100% { box-shadow: 0 0 0 10px rgba(255, 82, 82, 0); } }

/* اسکرول بار زیبا */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #b2bec3; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #636e72; }

#installBanner { position: fixed; bottom: 20px; left: 20px; right: 20px; background: var(--glass-bg); backdrop-filter: blur(10px); padding: 15px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,0.3); display: none; z-index: 9999; border: 1px solid var(--glass-border); }
