@font-face { font-family: 'Peyda'; src: url('peyda.woff') format('woff'); font-weight: normal; font-display: swap; }
:root { --bg-color: #0d0d12; --primary: #6c5ce7; --secondary: #00cec9; --glass-bg: rgba(255, 255, 255, 0.05); --glass-border: rgba(255, 255, 255, 0.1); --text-main: #f5f6fa; --text-muted: #a4b0be; --danger: #ff4757; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Peyda', Tahoma, sans-serif; user-select: auto; -webkit-tap-highlight-color: transparent; }
body { background-color: var(--bg-color); color: var(--text-main); min-height: 100vh; display: flex; flex-direction: column; overflow-x: hidden; background-image: radial-gradient(circle at 15% 50%, rgba(108, 92, 231, 0.15), transparent 25%), radial-gradient(circle at 85% 30%, rgba(0, 206, 201, 0.15), transparent 25%); }

.toast-notification { visibility: hidden; background-color: var(--danger); color: #fff; text-align: center; border-radius: 10px; padding: 16px 20px; position: fixed; z-index: 99999; left: 50%; bottom: 85px; transform: translateX(-50%); box-shadow: 0 4px 15px rgba(0,0,0,0.4); font-size: 1rem; font-weight: bold; opacity: 0; transition: opacity 0.5s, bottom 0.5s; border: 1px solid rgba(255,255,255,0.1); width: 85%; max-width: 350px;}
.toast-notification.show { visibility: visible; opacity: 1; bottom: 100px; }
.toast-notification.success { background-color: var(--secondary); color: #000; }

.action-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-150px); background: var(--glass-bg); backdrop-filter: blur(15px); border: 1px solid var(--primary); border-radius: 15px; padding: 15px; z-index: 100000; width: 90%; max-width: 350px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); opacity: 0; transition: 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55); display: flex; flex-direction: column; gap: 12px; }
.action-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.action-toast-text { color: white; font-size: 0.95rem; text-align: center; line-height: 1.6; }
.action-toast-btns { display: flex; gap: 10px; }
.action-toast-btns button { flex: 1; padding: 8px; border-radius: 8px; border: none; font-weight: bold; cursor: pointer; transition: 0.2s; }
.action-toast-btns button:active { transform: scale(0.95); }
.btn-accept { background: #2ecc71; color: white; }
.btn-reject { background: #ff4757; color: white; }

header { display: flex; justify-content: space-between; align-items: center; padding: 15px 5%; background: rgba(13, 13, 18, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid var(--glass-border); position: sticky; top: 0; z-index: 100; height: 65px; }

.logo-container { display: flex; align-items: center; gap: 0; text-decoration: none; }
.header-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.btn { background: linear-gradient(135deg, var(--primary), var(--secondary)); border: none; padding: 8px 16px; border-radius: 8px; color: white; cursor: pointer; font-weight: bold; transition: transform 0.2s; font-size: 0.9rem; }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--text-main); }
.btn-danger { background: var(--danger); }
.btn-warning { background: #ffa502; color: #000; }
.btn-success { background: #2ecc71; color: white; border: none; }

.score-badge { display: flex; align-items: center; gap: 6px; direction: ltr; font-size: 1.1rem; }
.score-num { color: #ffea00; text-shadow: 0 0 10px rgba(255, 234, 0, 0.8); font-weight: bold; font-size: 1.3rem; }

.notif-bell { position: relative; cursor: pointer; margin-right: 15px; display: flex; align-items: center; justify-content: center;}
.notif-badge { position: absolute; top: -5px; right: -5px; background: var(--danger); color: white; font-size: 0.6rem; border-radius: 50%; width: 16px; height: 16px; display: none; align-items: center; justify-content: center; font-weight: bold;}
.notif-badge.active { display: flex; }

.app-container { padding-bottom: 85px; width: 100%; max-width: 600px; margin: 0 auto; flex: 1;}
.app-tab { display: none; padding: 15px 5%; animation: fadeIn 0.3s ease; }
.app-tab.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; height: 70px; background: rgba(13, 13, 18, 0.85); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); border-top: 1px solid var(--glass-border); display: flex; justify-content: space-around; align-items: center; z-index: 1000; border-radius: 25px 25px 0 0; box-shadow: 0 -5px 20px rgba(0,0,0,0.5); }
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text-muted); font-size: 0.75rem; cursor: pointer; position: relative; width: 20%; transition: 0.3s; }
.nav-item .lucide { stroke: #ffffff; opacity: 0.6; width: 24px; height: 24px; margin-bottom: 4px; transition: 0.3s; }
.nav-item.active { font-weight: bold; }
.nav-item.active .lucide { opacity: 1; transform: translateY(-4px); }

.nav-item[data-tab="games"].active { color: var(--secondary); }
.nav-item[data-tab="games"].active .lucide { stroke: var(--secondary); }
.nav-item[data-tab="social"].active { color: #ff9ff3; }
.nav-item[data-tab="social"].active .lucide { stroke: #ff9ff3; }
.nav-item[data-tab="coins"].active { color: #f1c40f; }
.nav-item[data-tab="coins"].active .lucide { stroke: #f1c40f; }
.nav-item[data-tab="profile"].active { color: #a29bfe; }
.nav-item[data-tab="profile"].active .lucide { stroke: #a29bfe; }
.nav-item[data-tab="more"].active { color: #2ecc71; }
.nav-item[data-tab="more"].active .lucide { stroke: #2ecc71; }

.glass-card { 
    background: var(--glass-bg); 
    border: 1px solid rgba(0, 206, 201, 0.2); 
    border-radius: 15px; 
    padding: 15px; 
    margin-bottom: 15px; 
    backdrop-filter: blur(12px); 
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 15px rgba(0, 206, 201, 0.15); /* درخشش ملایم داخلی */
    z-index: 1;
}
/* نور نیم‌دایره‌ای فید شده در پایین باکس */
.glass-card::before {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60px;
    background: radial-gradient(ellipse at bottom, rgba(0, 206, 201, 0.35) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
}

.site-stats-wrapper { padding: 10px 0; display: flex; gap: 5px; justify-content: space-between; flex-wrap: nowrap !important; overflow: hidden; width: 100%; }
.site-stat-card { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 8px 2px; border-radius: 12px; text-align: center; flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.3); }
.site-stat-card .st-title { font-size: 0.6rem; color: var(--text-muted); margin-bottom: 2px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; width: 100%; }
.site-stat-card .st-val { font-size: 1rem; font-weight: bold; color: var(--secondary); white-space: nowrap; text-shadow: 0 0 10px rgba(0, 206, 201, 0.4); }

.top-players-section { padding: 15px 0 0; }
.top-players-title { font-size: 1.1rem; color: #ff4d6d; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; font-weight: bold; }
.top-players-scroll { display: flex; flex-direction: column; max-height: 160px; overflow-y: auto; gap: 8px; padding-right: 5px; scrollbar-width: thin; scrollbar-color: #ff4d6d rgba(0,0,0,0.3); }
.top-players-scroll::-webkit-scrollbar { width: 6px; }
.top-players-scroll::-webkit-scrollbar-thumb { background: #ff4d6d; border-radius: 10px; }
.tp-card { background: var(--glass-bg); border: 1px solid rgba(255, 77, 109, 0.25); border-radius: 10px; padding: 6px 12px; display: flex; align-items: center; gap: 12px; transition: transform 0.3s; cursor: pointer; }
.tp-avatar { width: 30px; height: 30px; border-radius: 50%; background: #2f3542; object-fit: cover; border: 1px solid #ff4d6d; flex-shrink: 0;}
.tp-info { display: grid; grid-template-columns: minmax(70px, 1.5fr) minmax(70px, 1.5fr) 1fr; width: 100%; align-items: center; gap: 10px; }
.tp-name { font-size: 0.9rem; font-weight: bold; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;}
.tp-game { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;}
.tp-score { font-size: 0.9rem; color: #fff0f3; font-weight: bold; text-shadow: 0 0 5px rgba(255, 255, 255, 0.8); white-space: nowrap; text-align: left; direction: ltr; }

.filters-container { display: flex; gap: 10px; padding: 20px 0 0; overflow-x: auto; white-space: nowrap; -ms-overflow-style: none; scrollbar-width: none; margin-bottom: 20px;}
.filters-container::-webkit-scrollbar { display: none; }
.filter-btn { background: var(--glass-bg); border: 1px solid var(--glass-border); padding: 8px 16px; border-radius: 20px; color: var(--text-muted); cursor: pointer; transition: 0.3s; font-family: inherit; font-size: 0.9rem;}
.filter-btn.active, .filter-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }

.games-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 25px; }
.game-wrapper { position: relative; }
.game-card { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 15px; overflow: hidden; transition: transform 0.3s; cursor: pointer; text-decoration: none; color: inherit; display: flex; flex-direction: column; height: 100%; }
.game-card:hover { transform: translateY(-5px); border-color: var(--primary); }
.game-cover { width: 100%; height: 180px; object-fit: cover; background-color: #2f3542; pointer-events: none; }
.game-info { padding: 15px; display: flex; flex-direction: column; gap: 15px; justify-content: space-between; flex-grow: 1; }
.game-header { display: flex; justify-content: space-between; align-items: center; width: 100%; gap: 10px; flex-wrap: wrap; }
.game-title { font-size: 1.6rem; color: var(--secondary); margin: 0; font-weight: bold; } 
.cost-badge { font-size: 0.8rem; background: rgba(0,0,0,0.4); padding: 5px 10px; border-radius: 8px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.cost-badge span { color: #f1c40f; font-weight: bold; font-size: 0.9rem;}
.cost-badge.free { color: var(--secondary); }
.play-badge { background: linear-gradient(135deg, var(--primary), var(--secondary)); padding: 6px 14px; border-radius: 8px; font-size: 0.85rem; font-weight: bold; color: white; white-space: nowrap; }

.stats-bar { display: flex; justify-content: space-between; background: rgba(0,0,0,0.5); padding: 12px 10px; border-radius: 10px; border: 1px solid rgba(255, 250, 101, 0.15); flex-wrap: wrap; gap: 8px; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; min-width: 50px; }
.stat-label { color: var(--text-muted); font-size: 0.75rem; white-space: nowrap; }
.stat-value { color: #fffa65; font-weight: bold; font-size: 0.95rem; text-shadow: 0 0 8px rgba(255, 250, 101, 0.7); }
.stat-value.record-holder { color: #2ecc71; text-shadow: 0 0 8px rgba(57, 255, 20, 0.5); cursor: pointer; text-decoration: underline dashed rgba(46, 204, 113, 0.5); }

.prize-bar-container { background: rgba(0,0,0,0.7); border-radius: 8px 8px 0 0; border: 1px solid #ff0844; overflow: hidden; position: relative; display: flex; justify-content: space-between; align-items: center; padding: 6px 8px; box-shadow: 0 4px 12px rgba(255, 8, 68, 0.25); }
.prize-progress { position: absolute; bottom: 0; left: 0; width: 100%; height: 4px; background: linear-gradient(90deg, #ff0844, #ffb199, #ff0844); background-size: 200% 100%; animation: prizeAnim 1.5s linear infinite; }
@keyframes prizeAnim { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.prize-text { display: flex; align-items: center; gap: 4px; font-size: 1.05rem; font-weight: bold; z-index: 1; }
.timer-wrapper { display: flex; gap: 2px; z-index: 1; direction: ltr; }
.timer-box { display: flex; flex-direction: column; align-items: center; justify-content: center; background: transparent; border: none; border-radius: 6px; padding: 2px 4px; min-width: 32px; }
.timer-box .time-val { font-size: 1.1rem; font-weight: bold; color: #ff6b81; line-height: 1.1; }
.timer-box .time-lbl { font-size: 0.55rem; color: #ffb199; margin-top: 2px; }

.avatar-preview { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin: 0 auto 15px; border: 2px solid var(--primary); display: block; background: #2f3542; cursor: pointer; }

.admin-controls { position: absolute; top: 10px; left: 10px; z-index: 10; display: flex; gap: 5px; }
.btn-sm { padding: 5px 10px; border: none; border-radius: 6px; cursor: pointer; font-size: 0.8rem; color: white; }
.suggestion-box { width: 100%; background: var(--glass-bg); padding: 20px; border-radius: 15px; border: 1px solid var(--glass-border); text-align: center; margin-top: 20px;}
.suggestion-box textarea { width: 100%; height: 80px; padding: 10px; border-radius: 8px; border: 1px solid var(--glass-border); background: rgba(0,0,0,0.3); color: white; margin: 10px 0; resize: none; outline: none; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); z-index: 2000; justify-content: center; align-items: center; padding: 20px; }
.modal-content { background: #1e1e24; padding: 30px; border-radius: 20px; width: 100%; max-width: 400px; border: 1px solid var(--glass-border); max-height: 90vh; overflow-y: auto; position: relative;}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.close-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.form-group { margin-bottom: 15px; text-align: right; }
.form-group label { display: block; margin-bottom: 8px; color: var(--text-muted); font-size: 0.9rem; }
.form-group input, .form-group select { width: 100%; padding: 12px; background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 8px; color: white; outline: none; font-family: inherit; }

#authModal .form-group label { font-size: 1.1rem; font-weight: bold; }
#authModal .form-group input { font-size: 1.2rem; padding: 15px; }

.checkbox-group { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.checkbox-group input { width: 18px; height: 18px; cursor: pointer; }
.w-100 { width: 100%; }
.sugg-item { background: rgba(0,0,0,0.3); padding: 10px; border-radius: 8px; margin-bottom: 10px; font-size: 0.9rem; text-align: right; }

.os-stats-box { background: rgba(0,0,0,0.4); padding: 15px; border-radius: 10px; border: 1px solid var(--glass-border); margin-bottom: 20px; display: flex; justify-content: space-around;}
.os-stats-box div { text-align: center; }
.os-stats-box span { display: block; font-size: 1.5rem; font-weight: bold; color: var(--secondary); margin-top: 5px;}

.admin-users-table th, .admin-users-table td { padding: 8px; text-align: right; border-bottom: 1px solid rgba(255,255,255,0.05); }
.admin-users-table th { color: var(--secondary); font-size: 0.9rem; }
.admin-users-table td { color: white; font-size: 0.85rem; }

.profile-avatar-large { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--secondary); margin-bottom: 15px; object-fit: cover; cursor: pointer;}
.user-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.user-row:last-child { border-bottom: none; }
.user-info { display: flex; align-items: center; gap: 10px; font-weight: bold; }
.avatar-mini-circle { width: 40px; height: 40px; border-radius: 50%; background: #2f3542; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; border: 1px solid var(--glass-border);}
.record-item { display: flex; justify-content: space-between; align-items: center; padding: 12px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.record-item:last-child { border-bottom: none; }

.sticky-stats-bar {
    position: fixed; top: 65px; left: 50%; transform: translateX(-50%); width: 85%; max-width: 350px;
    background: rgba(13, 13, 18, 0.85); backdrop-filter: blur(10px); border: 1px solid var(--glass-border);
    border-top: none; border-radius: 0 0 20px 20px; z-index: 99; display: flex; justify-content: space-around;
    align-items: center; padding: 8px 15px; font-size: 0.85rem; color: white; transition: top 0.3s, opacity 0.3s;
    opacity: 0; pointer-events: none; box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.sticky-stats-bar.show { opacity: 1; pointer-events: auto; }

.loader-spinner { border: 3px solid rgba(255,255,255,0.1); width: 24px; height: 24px; border-radius: 50%; border-left-color: var(--secondary); animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.lobby-hero-container { position: relative; width: 100%; border-radius: 15px; overflow: hidden; margin-bottom: 15px; border: 1px solid var(--glass-border); }
.lobby-hero { width: 100%; max-height: 200px; object-fit: cover; display: block;}
.lobby-title { position: absolute; bottom: 0; left: 0; width: 100%; text-align: center; font-size: 1.5rem; color: #fff; font-weight: bold; background: linear-gradient(to top, rgba(0,0,0,0.9), transparent); padding: 20px 10px 10px; margin: 0; }
.lobby-online-list { display: flex; gap: 10px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
.lobby-online-list::-webkit-scrollbar { display: none; }
.online-user-circle { flex-shrink: 0; text-align: center; width: 60px; }
.online-user-circle img { width: 45px; height: 45px; border-radius: 50%; border: 2px solid #2ecc71; object-fit: cover; margin-bottom: 5px; background: #2f3542;}
.online-user-circle span { display: block; font-size: 0.65rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-card { background: rgba(0,0,0,0.3); border: 1px solid var(--glass-border); border-radius: 12px; padding: 12px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.friend-info { display: flex; align-items: center; gap: 10px; }
.friend-avatar { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; background: #2f3542; border: 2px solid var(--primary); transition: 0.3s;}
.section-title { font-size: 1.1rem; color: var(--secondary); margin: 20px 0 10px; display: flex; align-items: center; gap: 8px; font-weight: bold;}

.medals-container { display: flex; justify-content: center; gap: 5px; margin-top: 5px; flex-wrap: wrap;}
.medal-badge { font-size: 1.2rem; background: rgba(0,0,0,0.4); border-radius: 50%; width: 30px; height: 30px; display: flex; justify-content: center; align-items: center; box-shadow: 0 0 5px rgba(0,0,0,0.5); cursor: help;}

.chat-messages { display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; overflow-y: auto; scrollbar-width: none; }
.chat-input-area { display: flex; border-top: 1px solid var(--glass-border); padding: 5px; background: rgba(0,0,0,0.8); }
.chat-input-area input { flex: 1; background: transparent; border: none; color: white; padding: 10px; outline: none; font-family: inherit; }
.chat-input-area button { background: var(--secondary); border: none; color: black; font-weight: bold; padding: 0 15px; border-radius: 8px; cursor: pointer; transition: 0.2s; }
@keyframes rgbGlow {
    0% { background-color: rgba(255, 71, 87, 0.45); box-shadow: 0 0 100px 50px rgba(255, 71, 87, 0.35); }
    33% { background-color: rgba(46, 204, 113, 0.45); box-shadow: 0 0 100px 50px rgba(46, 204, 113, 0.35); }
    66% { background-color: rgba(52, 152, 219, 0.45); box-shadow: 0 0 100px 50px rgba(52, 152, 219, 0.35); }
    100% { background-color: rgba(155, 89, 182, 0.45); box-shadow: 0 0 100px 50px rgba(155, 89, 182, 0.35); }
}

/* اعمال انیمیشن روی دایره‌های بلور شده پس‌زمینه */
body::before, body::after {
    animation: rgbGlow 15s infinite alternate ease-in-out !important;
    filter: blur(80px) !important;
    opacity: 0.8 !important; /* کمی پررنگ‌تر از قبل */
}
/* ========================================== */
/* تنظیمات پاپ‌آپ تعاملی (مثل پیغام خروج از سایت) */
/* ========================================== */

#interactiveToast {
    top: auto !important;          
    bottom: 30px !important;       
    left: 50% !important;          
    width: 92% !important;         
    max-width: 400px !important;
    padding: 25px 20px !important; 
    border-radius: 20px !important;
}

/* حالت مخفی: غیرفعال کردن دریافت کلیک (pointer-events: none) */
#interactiveToast:not(.show) {
    transform: translateX(-50%) translateY(150px) !important;
    pointer-events: none !important; /* <--- این خط مشکل را حل می‌کند */
    opacity: 0 !important;
}

/* حالت نمایان: فعال شدن مجدد کلیک */
#interactiveToast.show {
    transform: translateX(-50%) translateY(0) !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

#interactiveToastText {
    font-size: 1.2rem !important;  
    font-weight: bold !important;  
    line-height: 1.7 !important;   
    margin-bottom: 20px !important;
}

.action-toast-btns button {
    font-size: 1.05rem !important;
    padding: 12px 15px !important;
    border-radius: 12px !important;
}