/* ============================================================
   Quiz Duel - استایل‌های بازی
   نسخه: 1.9.0
   ============================================================ */

/* =============== وارد کردن فونت وزیر =============== */
/* وارد کردن فونت وزیر از CDN */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');
/* =============== استایل یکدست =============== */
/* =============== استایل‌های مستقل بازی (مقاوم در برابر قالب) =============== */
.quiz-duel-container *,
.quiz-duel-container *::before,
.quiz-duel-container *::after {
    box-sizing: border-box !important;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif !important;
}

.quiz-duel-container button,
.quiz-duel-container input,
.quiz-duel-container select {
    font-family: inherit !important;
    font-size: inherit !important;
}

/* ⭐ جلوگیری از بزرگ شدن دکمه‌ها */
.quiz-duel-container button {
    min-height: auto !important;
    min-width: auto !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    line-height: 1.5 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
}

/* ⭐ جلوگیری از تغییر فونت */
.quiz-duel-container h1,
.quiz-duel-container h2,
.quiz-duel-container h3,
.quiz-duel-container h4,
.quiz-duel-container p,
.quiz-duel-container span,
.quiz-duel-container div {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif !important;
    line-height: 1.6 !important;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif;
}
/* تنظیم ضخامت و سایز فونت برای بخش‌های مختلف */
h1, h2, h3, h4 {
    font-weight: bold;
    letter-spacing: -0.5px;
}

.game-logo {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
}

.level-card h3 {
    font-size: 24px;
    font-weight: 700;
}

.question-text {
    font-size: 22px;
    line-height: 1.8;
    font-weight: 500;
}

.option-btn {
    font-weight: 600;
    letter-spacing: 0.5px;
}
body {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);

}

.game-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}
.history-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255,255,255,0.05);
    margin: 4px 0;
    border-radius: 8px;
    font-size: 13px;
    color: rgba(255,255,255,0.9);
}

.history-win {
    border-right: 3px solid #4ade80;
}

.history-loss {
    border-right: 3px solid #ef4444;
}

.history-draw {
    border-right: 3px solid #facc15;
}
.wallet-charge-section {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 15px;
    margin-top: 15px;
}

.charge-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.charge-btn {
    flex: 1;
    min-width: 100px;
    padding: 10px 15px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    border: none;
    border-radius: 10px;
    color: #1e1a2f;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.charge-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74,222,128,0.3);
}
/* =============== دکمه خروج =============== */
.logout-container {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 999;
}

.logout-btn {
    background: rgba(255,0,0,0.15);
    color: #ff0000;
    border: 1px solid rgba(255,0,0,0.2);
    padding: 8px 18px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    display: inline-block;
    backdrop-filter: blur(10px);
    
}
.power-icon{
       width: 16px;
        height: 16px;
}

.logout-btn:hover {
    background: rgba(255,0,0,0.25);
    border-color: rgba(255,0,0,0.4);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255,0,0,0.15);
}
/* =============== بخش راهنما =============== */
.help-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.help-icons {
    display: flex;
    justify-content: space-around;
    gap: 10px;
}

.help-icon {
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    flex: 1;
}

.help-icon:hover {
    transform: translateY(-5px);
}

.help-icon-circle {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.help-icon:hover .help-icon-circle {
    background: #facc15;
    border-color: #facc15;
}

.help-icon:hover .help-emoji {
    filter: brightness(0) invert(1);
}

.help-emoji {
    font-size: 24px;
    transition: all 0.3s;
}

.help-label {
    font-size: 11px;
    opacity: 0.8;
    display: block;
}
/* =============== کادر جستجوی دوستان =============== */
/* =============== کادر جستجوی دوستان =============== */
.search-friends-container {
    margin: 10px 0 15px 0;
}

.search-friends-wrapper {
    position: relative;
}

/* ⭐ انتخابگر قوی‌تر با کلاس و id */
#search-friends-input.search-friends-input {
    width: 100% !important;
    padding: 12px 20px !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 50px !important; /* ⭐ گردی کامل */
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    font-size: 14px !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    box-shadow: none !important;
    height: auto !important;
    line-height: 1.5 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

#search-friends-input.search-friends-input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

#search-friends-input.search-friends-input:focus {
    border-color: #facc15 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 25px rgba(250, 204, 21, 0.15) !important;
}

/* ⭐ آیکون جستجو در داخل ورودی */
.search-friends-wrapper .search-icon {
    position: absolute;
    right: 250px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    z-index: 5;
}

/* =============== نتایج جستجو =============== */
.search-friends-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(30, 26, 47, 0.96);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    margin-top: 5px;
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    padding: 5px 0;
}

.search-friends-results.show {
    display: block;
}

/* =============== آیتم‌های نتیجه =============== */
.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
    cursor: default;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.search-result-item .result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-item .result-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.search-result-item .result-email {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
}

/* =============== وضعیت‌ها =============== */
.search-result-item .result-status {
    font-size: 11px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 500;
    white-space: nowrap;
}

.search-result-item .result-status.online {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.15);
}

.search-result-item .result-status.offline {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.25);
}

.search-result-item .result-status.friend {
    background: rgba(250, 204, 21, 0.15);
    color: #facc15;
    border: 1px solid rgba(250, 204, 21, 0.15);
}

/* =============== دکمه افزودن =============== */
.add-friend-from-search {
    background: linear-gradient(135deg, #4ade80, #22c55e) !important;
    border: none !important;
    padding: 5px 14px !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #1e1a2f !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(74, 222, 128, 0.2) !important;
    white-space: nowrap !important;
}

.add-friend-from-search:hover:not(:disabled) {
    transform: scale(1.05) !important;
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
    box-shadow: 0 6px 25px rgba(74, 222, 128, 0.35) !important;
}

.add-friend-from-search:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* =============== اسکرول‌بار =============== */
.search-friends-results::-webkit-scrollbar {
    width: 4px;
}

.search-friends-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.search-friends-results::-webkit-scrollbar-thumb {
    background: rgba(250, 204, 21, 0.3);
    border-radius: 10px;
}

.search-friends-results::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 204, 21, 0.5);
}
/* =============== پاپ‌آپ راهنما =============== */
.help-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.help-popup-content {
    background: linear-gradient(135deg, #1e1a2f, #2a2438);
    border-radius: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.help-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: white;
    opacity: 0.7;
    transition: all 0.3s;
}

.help-popup-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}
/* =============== اصلاح دکمه بستن پاپ‌آپ راهنما =============== */
#quiz-duel-app .help-popup-close {
    padding: 0 !important;
    padding-top: 0 !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    
    border-radius: 50% !important;
    background: rgba(255,255,255,0.1) !important;
    border: none !important;
    font-size: 24px !important;
    color: white !important;
    cursor: pointer !important;
    line-height: 1 !important;
    
    position: absolute !important;
    top: 12px !important;
    right: 16px !important;
    
    transition: all 0.3s ease !important;
    box-shadow: none !important;
    outline: none !important;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, sans-serif !important;
}


/* محتوای پاپ‌آپ */
.help-popup-body {
    color: white;
}

.help-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #facc15;
}

.help-text {
    font-size: 13px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: rgba(255,255,255,0.9);
}

.help-subtitle {
    font-size: 14px;
    font-weight: bold;
    margin: 20px 0 10px;
    color: #facc15;
    border-right: 3px solid #facc15;
    padding-right: 10px;
}

.help-list {
    list-style: none;
    padding: 0;
}

.help-list li {
    margin: 12px 0;
    padding-right: 25px;
    position: relative;
}

.help-list li::before {
    content: "✨";
    position: absolute;
    right: 0;
    top: 0;
}

.help-highlight {
    background: rgba(250,204,21,0.2);
    padding: 15px;
    border-radius: 15px;
    margin: 15px 0;
    border-right: 3px solid #facc15;
}

.help-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
    opacity: 0.6;
}
/* =============== استایل کارنامه =============== */
.profile-header {
    background: linear-gradient(135deg, rgba(255,255,255,0.15), rgba(255,255,255,0.05));
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar img {
    border-radius: 50%;
    border: 3px solid #facc15;
    width: 80px;
    height: 80px;
}

.profile-name {
    font-size: 18px;
    font-weight: bold;
    margin-top: 10px;
}

.profile-level {
    background: #facc15;
    color: #1e1a2f;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    margin-top: 8px;
}

.profile-stats {
    display: flex;
    gap: 5px;
    margin-top: 20px;
}

.stat-card {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.stat-card.win { border-right: 3px solid #4ade80; }
.stat-card.loss { border-right: 3px solid #ef4444; }

.stat-icon {
    font-size: 32px;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
}

.stat-number {
    font-size: 24px;
    font-weight: bold;
}

/* بخش سکه‌ها */
.coins-section {
    background: rgba(255,255,255,0.05);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 20px;
}

.coins-section h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.coins-levels {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.coin-card {
    flex: 1;
    background: rgba(255,255,255,0.1);
    border-radius: 15px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
}

.coin-card.level1 { border-bottom: 3px solid #cd7f32; }
.coin-card.level2 { border-bottom: 3px solid #c0c0c0; }
.coin-card.level3 { border-bottom: 3px solid #ffd700; }
.coin-card.total { border-bottom: 3px solid #4ade80; background: rgba(74,222,128,0.1); }

.coin-icon {
    font-size: 32px;
}

.coin-info {
    display: flex;
    flex-direction: column;
}

.coin-level {
    font-size: 12px;
    opacity: 0.7;
}

.coin-amount {
    font-size: 20px;
    font-weight: bold;
    color: #facc15;
}

/* کارت‌های ویژه */
.special-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.golden-card, .incentive-card {
    flex: 1;
    background: linear-gradient(135deg, #facc15, #ffd700);
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    color: #1e1a2f;
}

.golden-card {
    background: linear-gradient(135deg, #ffd700, #ffb347);
}

.card-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.card-desc {
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 10px;
}

.card-value {
    font-size: 28px;
    font-weight: bold;
    margin: 10px 0;
}

.card-progress {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}
.hidden {
    display: none !important;
}
.progress-bar {
    background: #4ade80;
    height: 100%;
    border-radius: 10px;
    transition: width 0.3s;
}

.collect-btn {
    background: #1e1a2f;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

/* =============== بخش برداشت =============== */
.withdraw-section {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 20px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
}

.withdraw-section h3 {
    margin-bottom: 15px !important;
    font-size: 16px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.withdraw-box {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
}

.withdraw-info {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 12px 16px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.8) !important;
}

.withdraw-info strong {
    color: #facc15 !important;
    font-size: 20px !important;
}

/* =============== ورودی و دکمه برداشت =============== */
.withdraw-input {
    display: flex !important;
    gap: 10px !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* ⭐ جلوگیری از شکستن */
}

.withdraw-input input {
    flex: 1 !important;
    min-width: 0 !important; /* ⭐ اجازه کوچک شدن */
    padding: 12px 16px !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 12px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: white !important;
    font-size: 16px !important;
    font-family: inherit !important;
    transition: all 0.3s !important;
    height: 48px !important;
    box-sizing: border-box !important;
}

.withdraw-input input:focus {
    outline: none !important;
    border-color: #facc15 !important;
    background: rgba(255, 255, 255, 0.1) !important;
}

.withdraw-input input::placeholder {
    color: rgba(255, 255, 255, 0.3) !important;
}

/* ⭐ دکمه برداشت */
.withdraw-btn {
    background: linear-gradient(135deg, #facc15, #f59e0b) !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1e1a2f !important;
    transition: all 0.3s ease !important;
    font-family: inherit !important;
    height: 48px !important;
    white-space: nowrap !important; /* ⭐ جلوگیری از شکستن متن */
    min-width: fit-content !important;
    box-shadow: 0 4px 15px rgba(250, 204, 21, 0.2) !important;
}

.withdraw-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.35) !important;
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.withdraw-btn:active {
    transform: translateY(0) !important;
}

/* =============== توضیحات برداشت =============== */
.withdraw-note {
    margin-top: 10px !important;
    padding: 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    border-right: 3px solid #facc15 !important;
}

.withdraw-note small {
    color: rgba(255, 255, 255, 0.5) !important;
    font-size: 12px !important;
    display: block !important;
    line-height: 1.8 !important;
}

/* =============== واکنش‌گرا (موبایل) =============== */
@media (max-width: 768px) {
    .withdraw-input {
        flex-wrap: wrap !important; /* ⭐ در موبایل اجازه شکستن */
    }
    
    .withdraw-input input {
        flex: 1 1 100% !important;
        min-width: 100% !important;
    }
    
    .withdraw-btn {
        flex: 1 1 100% !important;
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }
}

@media (max-width: 480px) {
    .withdraw-info {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center !important;
    }
    
    .withdraw-input input {
        padding: 10px 14px !important;
        font-size: 14px !important;
        height: 44px !important;
    }
    
    .withdraw-btn {
        padding: 10px 18px !important;
        font-size: 14px !important;
        height: 44px !important;
    }
}
/* =============== صفحه انتخاب سطح =============== */
.fullscreen-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 40px;
    padding: 40px;
    text-align: center;
    max-width: 1100px;
    width: 90%;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.logo-area {
    margin-bottom: 30px;
}

.game-logo {
    font-size: 42px;
    font-weight: bold;
    color: #facc15;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.game-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    margin-top: 10px;
}

.glass-panel h2 {
    color: white;
    font-size: 28px;
    margin-bottom: 10px;
}

.glass-panel > p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.level-cards-container {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.level-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    width: 260px;
    transition: all 0.3s;
    cursor: pointer;
}

.level-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.level-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.level-icon.bronze { filter: drop-shadow(0 0 10px #cd7f32); }
.level-icon.silver { filter: drop-shadow(0 0 10px #c0c0c0); }
.level-icon.gold { filter: drop-shadow(0 0 10px #ffd700); }

.level-card h3 {
    font-size: 24px;
    margin: 10px 0;
    color: #333;
}

.level-price {
    font-size: 14px;
    font-weight: bold;
    color: #4ade80;
    margin: 10px 0;
}
/* =============== ارتقا سطح - قیمت‌ها =============== */
.level-option .level-price-badge {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: #4ade80 !important;
    background: rgba(74, 222, 128, 0.1) !important;
    padding: 2px 10px !important;
    border-radius: 15px !important;
    display: inline-block !important;
    white-space: nowrap !important;
    font-family: inherit !important;
}

.level-option {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 12px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    margin: 5px 0 !important;
    font-size: 14px !important;
    font-family: inherit !important;
}

.level-option span {
    font-size: 14px !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.upgrade-level-btn {
    background: #facc15 !important;
    border: none !important;
    padding: 4px 14px !important;
    border-radius: 15px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1e1a2f !important;
    transition: all 0.3s !important;
}

.upgrade-level-btn:hover {
    transform: scale(1.05) !important;
    background: #f59e0b !important;
}
.level-points {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin: 15px 0;
    font-size: 13px;
}

.win { color: #4ade80; }
.loss { color: #ef4444; }

.register-level-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    transition: all 0.3s;
}

.register-level-btn:hover {
    transform: scale(1.05);
}

/* =============== صفحه اصلی بازی =============== */
.game-container {
    display: flex;
    gap: 20px;
    min-height: 85vh;
}

.game-sidebar {
    width: 320px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: 25px;
    padding: 20px;
    color: white;
}

.user-profile {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 20px;
}

.user-avatar img {
    border-radius: 50%;
    border: 3px solid #facc15;
    align-items:center;
}

.user-avatar h4 {
    margin: 10px 0 0;
}

.user-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 12px;
    opacity: 0.7;
    display: block;
}

.stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #facc15;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.menu-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 12px 15px;
    border-radius: 12px;
    color: white;
    text-align: right;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.menu-btn .icon {
    margin-left: 10px;
}

.menu-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.menu-btn.active {
    background: #facc15;
    color: #1e1a2f;
}

.tab-pane {
    display: none;
    margin-top: 15px;
}

.tab-pane.active {
    display: block;
}

.tab-pane h3 {
    margin-bottom: 15px;
    font-size: 16px;
}

.friends-list, #top-players-list, #match-history-list {
    max-height: 300px;
    overflow-y: auto;
}

.friend-item, .history-item, .top-player-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.challenge-btn {
    background: #facc15;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
}

.my-score-box {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 15px;
    text-align: center;
    margin-top: 15px;
}

.my-score-box #my-total-score {
    font-size: 32px;
    font-weight: bold;
    color: #facc15;
}

.level-upgrade-box {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
}

.current-level {
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 15px;
}

.level-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.level-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.change-level-btn {
    background: #facc15;
    border: none;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
}

/* بخش اصلی بازی */
.game-main {
    flex: 1;
    background: white;
    border-radius: 25px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.quick-match-area {
    text-align: center;
    margin-bottom: 30px;
}

.quick-match-btn {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border: none;
    padding: 12px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

.quick-match-btn:hover {
    transform: scale(1.05);
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
}

.message-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.welcome-message h3 {
    font-size: 28px;
    color: #333;
    margin-bottom: 15px;
}

.welcome-message p {
    color: #666;
    margin: 10px 0;
}

.hint {
    color: #facc15;
    font-size: 14px;
}

.waiting-message {
    text-align: center;
    padding: 60px 20px;
}

.cancel-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.player-card {
    text-align: center;
    flex: 1;
}

.player-avatar {
    font-size: 48px;
}

.player-name {
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.player-score {
    font-size: 28px;
    font-weight: bold;
    color: #facc15;
}

.vs-icon {
    font-size: 24px;
    font-weight: bold;
    color: #ff4444;
    padding: 0 20px;
}

.turn-indicator {
    text-align: center;
    padding: 12px;
    border-radius: 15px;
    margin: 20px 0;
    font-weight: bold;
}

.question-box {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 30px;
    margin: 20px 0;
    text-align: center;
}

.question-text {
    font-size: 22px;
    color: #333;
    line-height: 1.6;
}

.options-box {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

.option-btn {
    flex: 1;
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
}

.option-a {
    background: #f5576c;
    color: white;
}

.option-b {
    background: #4facfe;
    color: white;
}

.option-btn:hover:not(:disabled) {
    transform: translateY(-3px);
}

.option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
/* =============== واکنش‌گرا برای موبایل و تبلت =============== */

/* تبلت و موبایل (عرض کمتر از 1024px) */
@media (max-width: 1024px) {
    .game-container {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .game-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        order: 2 !important;
    }
    
    .game-sidebar.collapsed {
        width: 100% !important;
        max-width: 100% !important;
        padding: 15px !important;
    }
    
    .game-main {
        order: 1 !important;
        padding: 20px !important;
    }
    
    .game-header {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .player-card {
        width: 100% !important;
    }
    
    .vs-icon {
        padding: 0 !important;
        font-size: 20px !important;
    }
    
    .options-box {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .option-btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 14px !important;
    }
    
    .question-text {
        font-size: 18px !important;
    }
    
    .level-cards-container {
        flex-direction: column !important;
        align-items: center !important;
    }
    
    .level-card {
        width: 100% !important;
        max-width: 300px !important;
    }
}

/* موبایل کوچک (عرض کمتر از 480px) */
@media (max-width: 480px) {
    .game-wrapper {
        padding: 10px !important;
    }
    
    .game-main {
        padding: 15px !important;
        border-radius: 15px !important;
    }
    
    .game-sidebar {
        padding: 15px !important;
        border-radius: 15px !important;
    }
    
    .question-text {
        font-size: 16px !important;
    }
    
    .option-btn {
        font-size: 13px !important;
        padding: 10px !important;
    }
    
    .player-score {
        font-size: 22px !important;
    }
    
    .player-name {
        font-size: 14px !important;
    }
    
    .glass-panel {
        padding: 20px !important;
        border-radius: 25px !important;
    }
    
    .game-logo {
        font-size: 28px !important;
    }
    
    .level-card {
        padding: 15px !important;
    }
    
    .level-card h3 {
        font-size: 18px !important;
    }
    
    .help-icons {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .help-icon-circle {
        width: 40px !important;
        height: 40px !important;
    }
    
    /* کولاپس در موبایل */
    .game-sidebar.collapsed {
        width: 100% !important;
        padding: 10px !important;
    }
    
    .game-sidebar.collapsed .sidebar-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 5px !important;
    }
    
    .game-sidebar.collapsed .sidebar-menu .menu-btn {
        width: auto !important;
        padding: 8px 12px !important;
        font-size: 16px !important;
    }
    
    .game-sidebar.collapsed .sidebar-menu .menu-btn .icon {
        font-size: 18px !important;
    }
}

/* دسکتاپ بزرگ (عرض بیشتر از 1200px) */
@media (min-width: 1200px) {
    .game-container {
        max-width: 1400px !important;
        margin: 0 auto !important;
    }
}
/* =============== چت =============== */
/* =============== پنل چت (شناور) =============== */
#chat-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 340px;
    max-height: 450px;
    background: rgba(20, 18, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: white;
    font-size: 14px;
}

.chat-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 20px;
    cursor: pointer;
}

.chat-messages {
    flex: 1;
    padding: 12px 16px;
    overflow-y: auto;
    max-height: 300px;
    min-height: 150px;
}

.chat-message {
    margin-bottom: 10px;
    max-width: 80%;
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.chat-message.sent {
    background: #facc15;
    color: #1e1a2f;
    margin-left: auto;
}

.chat-message.received {
    background: rgba(255,255,255,0.1);
    color: white;
}

.chat-message .time {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 3px;
    display: block;
}

.chat-input {
    display: flex;
    padding: 10px 12px;
    border-top: 1px solid rgba(255,255,255,0.05);
    gap: 8px;
}

.chat-input input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 13px;
}

.chat-input button {
    background: #facc15;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 16px;
}

.chat-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 30px 0;
}

/* =============== نوتیفیکیشن =============== */
.notification-bell {
    position: fixed;
    top: 75px;
    right: 20px;
    z-index: 100;
}

.bell-btn {
    background: rgba(20, 18, 35, 0.9);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: white;
    font-size: 22px;
    cursor: pointer;
    position: relative;
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-dropdown {
    position: absolute;
    top: 55px;
    right: 0;
    width: 320px;
    max-height: 350px;
    background: rgba(20, 18, 35, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: white;
    font-size: 14px;
}
.notification-empty {
    text-align: center;
    color: rgba(255,255,255,0.4) !important;
    padding: 30px 20px;
    font-size: 13px;
}
.notification-header button {
    background: none;
    border: none;
    color: #facc15;
    cursor: pointer;
    font-size: 12px;
}

.notification-list {
    max-height: 280px;
    overflow-y: auto;
}

.notification-item {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    cursor: pointer;
}

.notification-item:hover {
    background: rgba(255,255,255,0.05);
}

.notification-item .time {
    font-size: 10px;
    opacity: 0.4;
    display: block;
    margin-top: 3px;
}
.friend-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.chat-btn {
    background: rgba(74, 222, 128, 0.2);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    color: #4ade80;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn:hover {
    background: #4ade80;
    color: #1e1a2f;
    transform: scale(1.05);
}
/* =============== تاریخچه مسابقات =============== */
.history-section {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.history-header {
    display: grid;
    grid-template-columns: 70px 1fr 80px 70px 70px 100px;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(250,204,21,0.1);
    border-radius: 10px;
    font-weight: bold;
    color: #facc15;
    font-size: 13px;
    margin-bottom: 10px;
}



.history-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(5px);
}

.history-item.win {
    border-right: 3px solid #4ade80;
}

.history-item.loss {
    border-right: 3px solid #ef4444;
}

.history-item.draw {
    border-right: 3px solid #facc15;
}

.h-col {
    display: flex;
    align-items: center;
}

.result-icon {
    font-size: 18px;
    margin-right: 5px;
}

.result-text {
    font-size: 12px;
}

.my-score {
    color: #4ade80;
    font-weight: bold;
}

.opp-score {
    color: #ef4444;
    font-weight: bold;
}

.score-sep {
    color: rgba(255,255,255,0.3);
    margin: 0 5px;
}

/* =============== خالی بودن تاریخچه =============== */
.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255,255,255,0.4);
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.empty-history p {
    font-size: 16px;
    margin-bottom: 5px;
}

.empty-history small {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
}

/* =============== آمار =============== */
.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    padding: 1px;
    border-radius: 10px;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 20px;
    font-weight: bold;
    display: block;
}

.stat-card .stat-label {
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.stat-card.win .stat-number { color: #4ade80; }
.stat-card.loss .stat-number { color: #ef4444; }
.stat-card.draw .stat-number { color: #facc15; }
.stat-card.coins .stat-number { color: #fbbf24; }

/* ============================================================
   ⭐ مخفی/نمایش بخش‌های دوئل الماس
   ============================================================ */

.diamond-section-hidden {
    display: none !important;
}

.diamond-section-visible {
    display: block !important;
}

/* انیمیشن محو شدن */
.diamond-fade-out {
    animation: diamondFadeOut 0.3s ease forwards;
}

.diamond-fade-in {
    animation: diamondFadeIn 0.3s ease forwards;
}

@keyframes diamondFadeOut {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.95); }
}

@keyframes diamondFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-diamond {
    0%, 100% { transform: scale(1); text-shadow: 0 0 20px rgba(0, 206, 209, 0.3); }
    50% { transform: scale(1.1); text-shadow: 0 0 40px rgba(0, 206, 209, 0.6); }
}

.diamond-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 206, 209, 0.3);
}

.diamond-option:hover:not(:disabled) {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0, 206, 209, 0.2);
}

.diamond-option:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#diamond-duels-list::-webkit-scrollbar {
    width: 4px;
}
#diamond-duels-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
#diamond-duels-list::-webkit-scrollbar-thumb {
    background: rgba(0, 206, 209, 0.3);
    border-radius: 10px;
}

.diamond-duel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.diamond-duel-item:hover {
    background: rgba(255,255,255,0.08);
    transform: translateX(5px);
}

.diamond-duel-item .amount {
    color: #facc15;
    font-weight: bold;
    font-size: 16px;
}

.diamond-duel-item .creator {
    color: rgba(255,255,255,0.7);
}

.diamond-duel-item .join-btn {
    background: linear-gradient(135deg, #00ced1, #008b8b);
    border: none;
    padding: 6px 18px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.diamond-duel-item .join-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 206, 209, 0.3);
}

.diamond-empty {
    text-align: center;
    color: rgba(255,255,255,0.3);
    padding: 20px;
    font-size: 14px;
}
/* ============================================================
   ⭐ مخفی/نمایش بخش دوئل الماس با انیمیشن
   ============================================================ */

/* حالت مخفی */
.diamond-section-hidden {
    display: none !important;
}

/* حالت نمایش */
.diamond-section-visible {
    display: block !important;
}

/* انیمیشن محو شدن */
.diamond-fade-out {
    animation: diamondFadeOut 0.4s ease forwards;
}

/* انیمیشن ظاهر شدن */
.diamond-fade-in {
    animation: diamondFadeIn 0.4s ease forwards;
}

@keyframes diamondFadeOut {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
        max-height: 2000px;
    }
    100% {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
        max-height: 0;
    }
}

@keyframes diamondFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
        max-height: 0;
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
        max-height: 2000px;
    }
}

/* انیمیشن جمع شدن (کشویی) */
.diamond-slide-up {
    animation: diamondSlideUp 0.4s ease forwards;
}

.diamond-slide-down {
    animation: diamondSlideDown 0.4s ease forwards;
}

@keyframes diamondSlideUp {
    0% {
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        max-height: 0;
        opacity: 0;
        transform: translateY(-30px);
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
}

@keyframes diamondSlideDown {
    0% {
        max-height: 0;
        opacity: 0;
        transform: translateY(-30px);
        padding: 0;
        margin: 0;
        overflow: hidden;
    }
    100% {
        max-height: 2000px;
        opacity: 1;
        transform: translateY(0);
        padding: 25px;
        margin: 20px 0;
        overflow: visible;
    }
}

/* دکمه نمایش/مخفی */
.diamond-toggle-btn {
    background: rgba(0, 206, 209, 0.15);
    border: 1px solid rgba(0, 206, 209, 0.3);
    color: #00ced1;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.diamond-toggle-btn:hover {
    background: rgba(0, 206, 209, 0.25);
    transform: scale(1.05);
}

.diamond-toggle-btn .arrow {
    transition: transform 0.3s;
    display: inline-block;
}

.diamond-toggle-btn .arrow.collapsed {
    transform: rotate(-90deg);
}

.diamond-toggle-btn .arrow.expanded {
    transform: rotate(0deg);
}

#my-duels-list::-webkit-scrollbar {
    width: 4px;
}
#my-duels-list::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}
#my-duels-list::-webkit-scrollbar-thumb {
    background: rgba(0, 206, 209, 0.3);
    border-radius: 10px;
}

.my-duel-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s;
}

.my-duel-item:hover {
    background: rgba(255,255,255,0.08);
}

.my-duel-item .duel-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.my-duel-item .duel-amount {
    color: #facc15;
    font-weight: bold;
    font-size: 15px;
}

.my-duel-item .duel-status {
    font-size: 13px;
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: bold;
}

.my-duel-item .duel-status.waiting {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.my-duel-item .duel-status.active {
    background: rgba(59, 130, 246, 0.2);
    color: #3b82f6;
}

.my-duel-item .duel-actions {
    display: flex;
    gap: 8px;
}

.my-duel-item .duel-actions .cancel-btn {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 5px 15px;
    border-radius: 8px;
    color: #f87171;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.my-duel-item .duel-actions .cancel-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.my-duel-item .duel-actions .join-btn {
    background: linear-gradient(135deg, #00ced1, #008b8b);
    border: none;
    padding: 5px 15px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s;
}

.my-duel-item .duel-actions .join-btn:hover {
    transform: scale(1.05);
}
/* ============================================================
   ⭐ آمار کارنامه - دو ستونی (اندازه کوچک)
   ============================================================ */

.profile-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;                    /* ← فاصله بین باکس‌ها */
    margin: 12px 0;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 8px 12px;           /* ← کوچک */
    display: flex;
    align-items: center;
    gap: 8px;                    /* ← کوچک */
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.07);
}

.stat-card .stat-icon {
    font-size: 20px;             /* ← کوچک */
    width: 32px;                 /* ← کوچک */
    height: 32px;                /* ← کوچک */
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    flex-shrink: 0;
}

.stat-card .stat-info {
    flex: 1;
    min-width: 0;
}

.stat-card .stat-label {
    display: block;
    font-size: 12px;             /* ← کوچک */
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.stat-card .stat-number {
    display: block;
    font-size: 19px;             /* ← کوچک */
    font-weight: 700;
    margin-top: 0px;
    line-height: 1.2;
}

/* رنگ‌ها */
.stat-card.win .stat-number { color: #4ade80; }
.stat-card.draw .stat-number { color: #facc15; }
.stat-card.loss .stat-number { color: #f87171; }
.stat-card.total .stat-number { color: #0019FF; }

/* ============================================================
   ⭐ ریسپانسیو
   ============================================================ */

@media (max-width: 480px) {
    .profile-stats-grid {
        gap: 6px;
    }
    
    .stat-card {
        padding: 6px 10px;
        border-radius: 8px;
    }
    
    .stat-card .stat-icon {
        font-size: 16px;
        width: 28px;
        height: 28px;
    }
    
    .stat-card .stat-number {
        font-size: 14px;
    }
    
    .stat-card .stat-label {
        font-size: 9px;
    }
}
/* ============================================================
   ⭐ دکمه بازی همزمان
   ============================================================ */

.instant-match-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: bold !important;
    cursor: pointer !important;
    font-size: 15px !important;
    margin-top: 10px !important;
    transition: all 0.3s !important;
    width: 100% !important;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3) !important;
}

.instant-match-btn:hover:not(:disabled) {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4) !important;
}

.instant-match-btn:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

/* دکمه چالش همزمان در لیست دوستان */
.instant-challenge-btn {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9) !important;
    border: none !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    color: white !important;
    cursor: pointer !important;
    font-size: 12px !important;
    transition: all 0.3s !important;
    margin-left: 4px !important;
}

.instant-challenge-btn:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3) !important;
}

.instant-match-status {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    margin-top: 5px;
    text-align: center;
}
/* ============================================================
   ⭐ تم قرمز و مشکی SweetAlert
   ============================================================ */

.swal-dark-red-theme {
    background: linear-gradient(145deg, #0f0505, #1a0a0a) !important;
    border: 1px solid rgba(220, 38, 38, 0.15) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(220, 38, 38, 0.05) !important;
    border-radius: 20px !important;
    padding: 20px !important;
}

.swal-title-red {
    color: #f87171 !important;
    font-size: 24px !important;
    font-weight: bold !important;
    text-shadow: 0 0 30px rgba(220, 38, 38, 0.2) !important;
}

.swal-btn-red {
    background: linear-gradient(135deg, #dc2626, #991b1b) !important;
    color: #ffffff !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    padding: 12px 30px !important;
    border-radius: 12px !important;
    font-weight: bold !important;
    font-size: 16px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2) !important;
}

.swal-btn-red:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 30px rgba(220, 38, 38, 0.4) !important;
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.swal-btn-gray {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #9ca3af !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 12px 25px !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.swal-btn-gray:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* انیمیشن ورود */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.swal-dark-red-theme {
    animation: fadeInScale 0.3s ease !important;
}

/* اسکرول بار برای محتوای طولانی */
.swal-dark-red-theme::-webkit-scrollbar {
    width: 4px;
}
.swal-dark-red-theme::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.03);
}
.swal-dark-red-theme::-webkit-scrollbar-thumb {
    background: rgba(220, 38, 38, 0.3);
    border-radius: 10px;
}
/* انیمیشن چشمک زدن برای بخش کمبود */
@keyframes pulse-red {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}