﻿/* کارت آمار صفحه اصلی — UI مدرن */

.homepage_profile_statistics {
    width: 92%;
    margin: 8px auto 12px;
    flex: 0 0 auto;
    min-height: auto;
    justify-content: flex-start;
    flex-wrap: nowrap;
    position: relative;
    z-index: 2;
}

.homepage_boxes_main {
    flex: 1 1 auto;
    min-height: 0;
    position: relative;
    z-index: 1;
}

.fhome-stats-card {
    position: relative;
    z-index: 1;
    border-radius: 14px;
    background: linear-gradient(180deg, #1e2430 0%, #151a24 100%);
    border: 2px solid #0a0d12;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.fhome-stats-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px 8px;
    background: rgba(0, 0, 0, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px 12px 0 0;
}

.fhome-stats-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
    direction: rtl;
}

.fhome-stats-profile__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
    text-align: right;
}

.fhome-stats-profile__name {
    display: block;
    max-width: 120px;
    font-size: 92%;
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fhome-stats-profile__link {
    font-size: 72%;
    font-weight: 700;
    color: #5eb8ff;
    line-height: 1.2;
}

.fhome-stats-profile__avatar {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #efd90e;
    object-fit: cover;
    background: #2b1959;
}

.fhome-stats-segment {
    display: flex;
    align-items: stretch;
    gap: 6px;
    flex-shrink: 0;
}

.fhome-stats-segment__btn {
    border: none;
    border-radius: 10px;
    padding: 0 12px;
    min-height: 36px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.55);
    font-family: KalamehWebFaNum, Arial, sans-serif;
    font-size: 78%;
    font-weight: 800;
    line-height: 1.3;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.fhome-stats-segment__btn.btnweekthisweek,
.fhome-stats-segment__btn.btnhistoryhistory {
    background: #efd90e !important;
    color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(239, 217, 14, 0.28);
    border-bottom: none !important;
}

.fhome-stats-segment__btn::after {
    display: none !important;
}

.fhome-stats-card__body.awardbox {
    display: flex;
    position: relative;
    align-items: stretch;
    justify-content: space-between;
    gap: 4px;
    width: 100% !important;
    background: transparent !important;
    color: #fff;
    border-radius: 0 0 12px 12px;
    box-sizing: border-box;
}

.fhome-stats-card__body .awardboxopacity {
    border-radius: 0 0 12px 12px;
    bottom: 0;
    height: auto;
    min-height: 100%;
}

.fhome-stats-card__body .btnweekstart {
    position: absolute;
    z-index: 99;
    width: min(220px, 86%);
    height: 40px;
    right: 50%;
    margin-right: 0;
    top: 78%;
    transform: translate(50%, -50%);
    display: none;
    border-radius: 10px;
    font-size: 82%;
    font-weight: 800;
}

.fhome-stats-card .fhome-stat-item.playcount,
.fhome-stats-card .fhome-stat-item.rankcount,
.fhome-stats-card .fhome-stat-item.fulllevelcount,
.fhome-stats-card .fhome-stat-item.pointcount {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    height: auto !important;
    min-height: 58px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    margin: 0 !important;
    padding: 0 2px 4px !important;
    font-size: 78%;
    font-weight: 800;
    line-height: 1.35 !important;
    text-align: center;
    background: none !important;
    background-image: none !important;
    border-radius: 8px;
    cursor: pointer;
    overflow: visible !important;
    transition: background 0.2s ease;
}

.fhome-stats-card .fhome-stat-item:active {
    background: rgba(255, 255, 255, 0.06) !important;
}

.fhome-stat-item__icon {
    display: block;
    width: 32px;
    height: 32px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

.fhome-stat-item.playcount .fhome-stat-item__icon {
    background-image: url('/competition/images/main/game.png');
}

.fhome-stat-item.rankcount .fhome-stat-item__icon {
    background-image: url('/competition/images/main/rank.png');
}

.fhome-stat-item.fulllevelcount .fhome-stat-item__icon {
    background-image: url('/competition/images/main/level.png');
}

.fhome-stat-item.pointcount .fhome-stat-item__icon {
    background-image: url('/competition/images/main/point.png');
}

.fhome-stat-item__text {
    display: block;
    min-height: 18px;
    color: #fff;
}

.fhome-stat-item .f50 {
    font-size: 100%;
    font-weight: 700;
    opacity: 0.92;
}

.fhome-stats-card .fhome-stat-item__text .verysmallloaderblack {
    border-top-color: #efd90e;
}

/* باکس رتبه کلی — صفحه اصلی */
.fhome-rank-banner {
    position: relative;
    display: block;
    cursor: pointer;
}

.fhome-rank-banner__art {
    display: block;
    width: 100%;
    height: auto;
    pointer-events: none;
    user-select: none;
}

.fhome-rank-banner__value {
    position: absolute;
    right: 23.5%;
    top: 19px;
    width: 14%;
    min-width: 34px;
    text-align: center;
    font-size: clamp(13px, 3.8vw, 18px);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    pointer-events: none;
}

.fhome-rank-banner__value .verysmallloaderblack {
    border-top-color: #fff;
}

/* skeleton کارت‌های تصویری صفحه اصلی */
.fhome-card {
    position: relative;
    overflow: hidden;
}

.fhome-card__skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: inherit;
    background: linear-gradient(135deg, #2a3344 0%, #1c2330 100%);
    overflow: hidden;
    opacity: 1;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.fhome-card__skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.03) 75%);
    background-size: 200% 100%;
    animation: fwalletShimmer 1.2s infinite;
}

.fhome-card__img {
    position: relative;
    z-index: 2;
    width: 100%;
    display: block;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.fhome-card.is-loaded .fhome-card__img {
    opacity: 1;
}

.fhome-card.is-loaded .fhome-card__skeleton {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.fhome-card.is-loading.mainmenuboxnew,
.fhome-card.is-loading.mainmenubox_supercup_new {
    min-height: 72px;
}

.fhome-card.is-loading.mainmenubox_n:not([style*="min-height"]) {
    min-height: 100px;
}

.fhome-rank-banner.fhome-card .fhome-rank-banner__value {
    z-index: 3;
}

/* فروشگاه */
#shopactivity .fhome-card.is-loading.itemboxverysmall {
    min-height: 88px;
}

#shopactivity .fhome-card.is-loading.itemboxmedium {
    min-height: 120px;
}

#shopactivity .fhome-card.is-loading.mainitembox > div {
    min-height: 72px;
}

.fquiz-wallet-promo.fhome-card.is-loading.fquiz-wallet-promo--pending {
    min-height: 88px;
}

.fquiz-wallet-promo.fhome-card .fquiz-wallet-promo__overlay {
    z-index: 3;
}

.fquiz-wallet-promo.fhome-card .fquiz-wallet-promo__btn {
    z-index: 4;
}
