﻿body {
    margin: 0;
    padding: 0;
    background-color: #121212;
    font-family: 'Vazirmatn';
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* کانتینر اصلی محتوا */
#main-content-wrapper {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 80px; /* فضا برای نوار پایین */
    width: 100%;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

/* --- استایل صفحات به زودی (Coming Soon) --- */
.coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh; /* حداقل ارتفاع برای وسط‌چین شدن */
    text-align: center;
    padding: 20px;
    color: #fff;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: #00d2ff;
    animation: float 3s ease-in-out infinite;
}

.coming-soon-title {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #00d2ff, #3a7bd5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coming-soon-desc {
    color: #a0a0b0;
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 300px;
    line-height: 1.6;
}

.coming-soon-badge {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
    margin-bottom: 20px;
}

/* انیمیشن شناور بودن آیکون */
@@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* --- استایل نوار ناوبری پایین (چسبیده به کف) --- */
.bottom-navbar {
    position: fixed;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 900px;
    height: 76px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    backdrop-filter: blur(12px) saturate(120%);
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6), 0 2px 8px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.03);
    z-index: 10;
}

.nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 20%;
    height: 100%;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c6c7e;
    border-radius: 15px;
}

/* --- lobby header: profile, title, balance --- */
.lobby-header {
    display: block;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    position: relative;
}

/* left balance */
.lobby-balance.left {
    text-align: left;
    color: #00d2ff;
    min-width: 100px;
    align-self: flex-start;
    position: fixed;
    left: 15px;
    top: 15px;
}

.lobby-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    gap: 6px;
}

.lobby-profile.centered {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.lobby-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.06);
    background: rgba(255,255,255,0.02);
}

.lobby-username {
    color: #fff;
    font-weight: 700;
}

.lobby-title.centered {
    text-align: center;
}

.lobby-spacer {
    width: 100px;
}

.balance-amount {
    font-weight: 800;
}

.nav-item i {
    font-size: 1.4rem;
    transition: transform 0.28s cubic-bezier(.2,.9,.3,1), filter 0.2s;
    z-index: 2;
    display: block;
}

.nav-item span {
    font-size: 0.72rem;
    margin-top: 6px;
    font-weight: 700;
    z-index: 2;
    color: #9aa0b4;
    transition: color 0.22s, transform 0.22s;
}

/* دایره نئونی پس‌زمینه */
.nav-item::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 56px;
    height: 56px;
    background: radial-gradient(ellipse at center, rgba(0,210,255,0.14), rgba(58,123,213,0.06));
    border-radius: 14px;
    opacity: 0.04;
    transition: transform 0.28s ease, opacity 0.28s ease, box-shadow 0.28s;
    z-index: 1;
}

/* حالت فعال (Active) */
.nav-item.active {
    color: #fff;
}

    .nav-item.active::before {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
        box-shadow: 0 8px 32px rgba(0,160,255,0.18), inset 0 0 8px rgba(255,255,255,0.02);
    }

    .nav-item.active i {
        transform: translateY(-6px) scale(1.16);
        filter: drop-shadow(0 6px 16px rgba(0,160,255,0.18));
    }

    .nav-item.active span {
        transform: translateY(-4px);
        color: #dff6ff;
    }

/* special central elevated action */
.nav-item.center-action {
    position: relative;
    margin-top: -26px;
    width: 78px;
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg,#00d2ff,#3a7bd5);
    border-radius: 50%;
    box-shadow: 0 12px 30px rgba(0,160,255,0.22), 0 4px 10px rgba(0,0,0,0.35);
    transform-origin: center;
    z-index: 995;
}

    .nav-item.center-action i {
        font-size: 1.6rem;
    }

    .nav-item.center-action span {
        display: none;
    }

.nav-item:hover {
    transform: translateY(-4px);
}

    .nav-item:hover span {
        color: #e6f9ff;
    }

/* مخفی کردن اسکرول بار */
#main-content-wrapper::-webkit-scrollbar {
    width: 5px;
}

#main-content-wrapper::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 10px;
}
/* ===== referral screen styles ===== */
.referral-container {
    max-width: 980px;
    margin: 18px auto;
    padding: 20px;
    gap: 18px;
    align-items: start;
}
.referral-right-col {
    width: 100%;
}
.referral-header-hero {
    background: linear-gradient(120deg, rgba(0,210,255,0.06), rgba(58,123,213,0.06));
    border-radius: 16px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 8px 28px rgba(0,0,0,0.5);
}

.referral-hero-icon {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    background: linear-gradient(135deg,#00d2ff,#3a7bd5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #04202a;
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 8px 22px rgba(0,160,255,0.12);
}

.referral-hero-title h1 {
    margin: 0;
    color: #fff;
    font-size: 1.25rem;
}

.referral-hero-title p {
    margin: 2px 0 0;
    color: #aab6c4;
    font-size: 0.95rem;
}

.referral-code-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
    border-radius: 12px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
}

.referral-code-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.referral-code-display {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0,0,0,0.2);
    padding: 10px 12px;
    border-radius: 10px;
    color: #eafcff;
    font-weight: 800;
    letter-spacing: 1px;
    font-size: 1.05rem;
}

.copy-btn, .share-btn {
    background: linear-gradient(135deg,#00d2ff,#3a7bd5);
    color: #04202a;
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0,160,255,0.12);
}

.share-buttons {
    display: flex;
    gap: 8px;
}

.referral-stats {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

.stat-card {
    background: rgba(255,255,255,0.02);
    padding: 12px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.03);
}

.stat-icon {
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 800;
    color: #eafcff;
}

.stat-label {
    color: #9aa0b4;
    font-size: 0.85rem;
}

.referrals-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.referral-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255,255,255,0.02);
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.02);
}

    .referral-row .avatar {
        width: 44px;
        height: 44px;
        border-radius: 8px;
        background: rgba(255,255,255,0.04);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .referral-row .meta {
        flex: 1;
    }

        .referral-row .meta .name {
            color: #fff;
            font-weight: 700;
        }

        .referral-row .meta .meta-sub {
            color: #9aa0b4;
            font-size: 0.85rem;
        }

/* responsive */
@media (max-width: 880px) {
    .referral-container {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .referral-stats {
        grid-template-columns: repeat(2,1fr);
    }
}

.group-container {
    padding: 20px;
    padding-bottom: 100px; /* فضا برای دکمه شناور */
}

/* استایل تب‌ها */
.group-tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.group-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    color: #888;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .group-tab.active {
        background: linear-gradient(135deg, #00d2ff, #3a7bd5);
        color: #fff;
        box-shadow: 0 4px 15px rgba(0, 210, 255, 0.3);
    }

/* استایل لیست گروه‌ها و بازیکنان */
.group-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.group-card, .player-card {
    background: rgba(30, 30, 40, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

    .group-card:active, .player-card:active {
        transform: scale(0.98);
    }

.card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.card-text h4 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
}

.card-text p {
    margin: 4px 0 0;
    color: #888;
    font-size: 0.8rem;
}

.card-action {
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.btn-join {
    font-family: 'Vazirmatn';
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
    border: 1px solid rgba(0, 210, 255, 0.3);
}

    .btn-join:hover {
        background: #00d2ff;
        color: #fff;
    }

.btn-leave {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.3);
}

/* دکمه شناور ساخت گروه */
.fab-create-group {
    position: fixed;
    bottom: 90px; /* کمی بالاتر از نوار ناوبری */
    left: 20px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 5px 20px rgba(0, 210, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    z-index: 100;
}

    .fab-create-group:hover {
        transform: scale(1.1) rotate(90deg);
    }

/* مودال ساخت گروه و پرداخت */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

    .modal-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.create-group-modal {
    background: #1e1e28;
    width: 90%;
    max-width: 400px;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-overlay.active .create-group-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .modal-header h3 {
        color: #fff;
        margin: 0;
    }

.close-modal {
    background: none;
    border: none;
    color: #888;
    font-size: 1.2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 15px;
}

    .form-group label {
        display: block;
        color: #aaa;
        margin-bottom: 8px;
        font-size: 0.9rem;
    }

    .form-group input {
        width: 100%;
        padding: 12px;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        color: #fff;
        box-sizing: border-box;
    }

.payment-info {
    background: rgba(0, 210, 255, 0.05);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.payment-amount {
    font-size: 1.5rem;
    color: #00d2ff;
    font-weight: bold;
    margin: 10px 0;
}

.btn-confirm {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00d2ff, #3a7bd5);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: opacity 0.3s;
}

    .btn-confirm:hover {
        opacity: 0.9;
    }

/* تب تورنمنت‌ها (ساده‌تر) */
.tournament-list {
    display: none; /* پیش‌فرض مخفی */
}

    .tournament-list.active {
        display: block;
    }

.group-list-container {
    display: none;
}

    .group-list-container.active {
        display: block;
    }
