[data-section=statistic] {
    background-color: transparent;
    background-image: url(../images/streams/bg.jpg);
    background-size: cover;
    background-position: bottom;
    background-repeat: no-repeat;
}

.stat-home {
    box-sizing: border-box;
    min-height: 100vh;
    padding-top: 6.25rem;
    padding-bottom: 6.25rem;
}

/* Champion карточка топ-1 */
.stat-champion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, rgba(255,186,112,0.07) 0%, rgba(255,186,112,0.03) 100%);
    border: 1px solid rgba(255,186,112,0.22);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}
.stat-champion::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255,186,112,0.06) 0%, transparent 60%);
    pointer-events: none;
}
.stat-champion--pk {
    background: linear-gradient(135deg, rgba(255,59,59,0.07) 0%, rgba(255,59,59,0.02) 100%);
    border-color: rgba(255,59,59,0.2);
}
.stat-champion--pk::before {
    background: linear-gradient(90deg, rgba(255,59,59,0.06) 0%, transparent 60%);
}
.stat-champion--time {
    background: linear-gradient(135deg, rgba(68,132,216,0.07) 0%, rgba(68,132,216,0.02) 100%);
    border-color: rgba(68,132,216,0.2);
}
.stat-champion--time::before {
    background: linear-gradient(90deg, rgba(68,132,216,0.06) 0%, transparent 60%);
}
.stat-champion--time .stat-champion__name { color: #7ab3f0; }
.stat-champion--time .stat-champion__score span { color: #7ab3f0; text-shadow: 0 0 12px rgba(68,132,216,0.4); font-size: 1.1rem; }
.stat-champion--time .stat-champion__score em { color: rgba(68,132,216,0.5); }
.stat-champion--time .stat-champion__avatar { border-color: rgba(68,132,216,0.5); box-shadow: 0 0 16px rgba(68,132,216,0.2); }
.stat-champion--clan {
    background: linear-gradient(135deg, rgba(255,186,112,0.07) 0%, rgba(255,186,112,0.02) 100%);
    border-color: rgba(255,186,112,0.22);
}
.stat-champion--clan::before {
    background: linear-gradient(90deg, rgba(255,186,112,0.06) 0%, transparent 60%);
}
.stat-champion--clan .stat-champion__name { color: #ffba70; }
.stat-champion--clan .stat-champion__score span { color: #ffba70; text-shadow: 0 0 12px rgba(255,186,112,0.4); font-size: 1.2rem; }
.stat-champion--clan .stat-champion__score em { color: rgba(255,186,112,0.5); }
.stat-champion__avatar--clan {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,186,112,0.08);
    border-color: rgba(255,186,112,0.4);
    box-shadow: 0 0 16px rgba(255,186,112,0.15);
}
.stat-champion__crown {
    font-size: 1.6rem;
    line-height: 1;
    filter: drop-shadow(0 0 8px rgba(255,215,0,0.6));
    flex-shrink: 0;
}
.stat-champion--pk .stat-champion__crown {
    filter: drop-shadow(0 0 8px rgba(255,80,80,0.7));
}
.stat-champion__avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,215,0,0.5);
    flex-shrink: 0;
    position: relative;
    background: rgba(255,186,112,0.08);
    box-shadow: 0 0 16px rgba(255,215,0,0.2);
}
.stat-champion--pk .stat-champion__avatar {
    border-color: rgba(255,80,80,0.5);
    box-shadow: 0 0 16px rgba(255,80,80,0.2);
}
.stat-champion__avatar img { width:100%; height:100%; object-fit:cover; }
.stat-champion__info { flex: 1; min-width: 0; }
.stat-champion__name {
    font-family: var(--font-1, "Philosopher", sans-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffba70;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-champion--pk .stat-champion__name { color: #ff8080; }
.stat-champion__sub {
    font-size: 0.75rem;
    color: rgba(232,209,166,0.45);
    margin-top: 0.2rem;
    font-family: var(--font-0, serif);
}
.stat-champion__score {
    text-align: center;
    flex-shrink: 0;
}
.stat-champion__score span {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: var(--font-1, sans-serif);
    color: #FFD700;
    line-height: 1;
    text-shadow: 0 0 12px rgba(255,215,0,0.4);
}
.stat-champion--pk .stat-champion__score span { color: #ff6b6b; text-shadow: 0 0 12px rgba(255,80,80,0.4); }
.stat-champion__score em {
    font-style: normal;
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: rgba(255,215,0,0.5);
    text-transform: uppercase;
    font-family: var(--font-1, sans-serif);
}

/* Прогресс-бар */
.stat-player__info { flex: 1; min-width: 0; }
.stat-bar-wrap {
    height: 3px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    margin-top: 0.3rem;
    overflow: hidden;
}
.stat-bar {
    height: 100%;
    border-radius: 2px;
    min-width: 3px;
}
.stat-bar--pvp { background: linear-gradient(90deg, rgba(67,248,67,0.4), #43f843); }
.stat-bar--pk  { background: linear-gradient(90deg, rgba(255,59,59,0.4), #ff6b6b); }
.stat-bar--time{ background: linear-gradient(90deg, rgba(68,132,216,0.4), #7ab3f0); }

/* Медали */
.stat-medal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: var(--font-1, sans-serif);
}
.stat-medal--gold   { background: linear-gradient(135deg,#b8860b,#FFD700); color: #1a0f00; box-shadow: 0 0 8px rgba(255,215,0,0.4); }
.stat-medal--silver { background: linear-gradient(135deg,#888,#C8C8C8); color: #1a1a1a; box-shadow: 0 0 6px rgba(192,192,192,0.3); }
.stat-medal--bronze { background: linear-gradient(135deg,#8B4513,#CD7F32); color: #1a0a00; box-shadow: 0 0 6px rgba(205,127,50,0.3); }
.stat-medal--plain  { background: rgba(255,255,255,0.05); color: rgba(255,255,255,0.3); }

/* Замки — карточки */
.stat-castles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}
.stat-castle-card {
    background: rgba(255,186,112,0.04);
    border: 1px solid rgba(255,178,111,0.15);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    transition: border-color 0.2s, background 0.2s;
}
.stat-castle-card:hover {
    border-color: rgba(255,178,111,0.3);
    background: rgba(255,186,112,0.07);
}
.stat-castle-card__name {
    font-family: var(--font-1, sans-serif);
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffba70;
    margin-bottom: 0.4rem;
}
.stat-castle-card__clan {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-0, serif);
    font-size: 0.85rem;
    color: #e8d1a6;
    margin-bottom: 0.55rem;
}
.stat-castle-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* Online pulse */
@keyframes statPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(67,248,67,0.5); }
    50%      { box-shadow: 0 0 0 4px rgba(67,248,67,0); }
}
.stat-home__avatar--online::after { animation: statPulse 2s ease infinite; }

/* Вкладки */
.stat-home__tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0;
    flex-wrap: wrap;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-home__tab {
    background: rgba(13,5,2,0.8);
    border: 1px solid rgba(255,178,111,0.18);
    border-bottom: none;
    color: rgba(232,209,166,0.5);
    padding: 0.65rem 1.6rem;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    font-family: var(--font-1, "Philosopher", sans-serif);
    border-radius: 4px 4px 0 0;
    position: relative;
    bottom: -1px;
}

.stat-home__tab:hover {
    color: rgba(255,186,112,0.8);
    border-color: rgba(255,178,111,0.4);
    background: rgba(255,178,111,0.05);
}

.stat-home__tab--active {
    color: #ffba70;
    border-color: rgba(255,178,111,0.35);
    background: rgba(13,5,2,0.95);
    box-shadow: 0 0 18px rgba(255,186,112,0.12);
}

.stat-home__tab--active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(13,5,2,0.95);
}

/* Панели */
.stat-home__panels {
    border: 1px solid rgba(255,178,111,0.2);
    border-radius: 0 4px 4px 4px;
    background: rgba(13,5,2,0.6);
    position: relative;
    overflow: hidden;
}

.stat-home__panels::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255,186,112,0.5), transparent);
}

.stat-home__panel {
    display: none;
    padding: 1.5rem;
}

.stat-home__panel--active {
    display: block;
    animation: statFadeIn 0.25s ease;
}

@keyframes statFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Таблица */
.stat-home__table {
    width: 100%;
    border-collapse: collapse;
}

.stat-home__table thead th {
    padding: 0 0.9rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,186,112,0.5);
    border-bottom: 1px solid rgba(255,178,111,0.12);
    text-align: left;
    font-family: var(--font-1, "Philosopher", sans-serif);
}

.stat-home__row {
    border-bottom: 1px solid rgba(255,178,111,0.06);
    transition: background 0.15s ease;
}

.stat-home__row:last-child {
    border-bottom: none;
}

.stat-home__row:hover {
    background: rgba(255,186,112,0.04);
}

.stat-home__row td {
    padding: 0.65rem 0.9rem;
    vertical-align: middle;
    color: rgba(232,209,166,0.85);
    font-size: 0.88rem;
    font-family: var(--font-0, "Spectral", serif);
}

.stat-home__row--first td {
    background: rgba(255,215,0,0.03);
}

/* Ранг */
.stat-home__rank {
    width: 38px;
    text-align: center;
    color: rgba(255,255,255,0.3);
    font-size: 0.8rem;
}

/* Игрок */
.stat-home__player {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.stat-home__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid rgba(255,178,111,0.25);
    flex-shrink: 0;
    position: relative;
    background: rgba(255,178,111,0.06);
}

.stat-home__avatar--online::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    background: #43f843;
    border-radius: 50%;
    border: 1.5px solid #0d0502;
    box-shadow: 0 0 6px rgba(67,248,67,0.6);
}

.stat-home__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.stat-home__name {
    font-weight: 600;
    color: #e8d1a6;
    font-family: var(--font-1, "Philosopher", sans-serif);
}

.stat-home__class {
    color: rgba(232,209,166,0.4);
    font-size: 0.78rem;
}

.stat-home__lvl {
    color: rgba(255,186,112,0.6);
    font-size: 0.72rem;
    margin-left: 0.3rem;
    font-family: var(--font-1, sans-serif);
}

/* Бейджи */
.stat-badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.5;
    font-family: var(--font-1, sans-serif);
}
.stat-badge--pvp    { background: rgba(67,248,67,0.08);   color: #43f843; border: 1px solid rgba(67,248,67,0.2); }
.stat-badge--pk     { background: rgba(255,59,59,0.08);   color: #ff6b6b; border: 1px solid rgba(255,59,59,0.2); }
.stat-badge--time   { background: rgba(68,132,216,0.1);   color: #7ab3f0; border: 1px solid rgba(68,132,216,0.2); }

/* Оффлайн */

/* Золотая разделительная линия снизу блока */
.stat-home::after {
    content: '';
    display: block;
    height: 1px;
    margin-top: 3rem;
    background: linear-gradient(to right, transparent, rgba(255,186,112,0.3), transparent);
}

/* Адаптив */
@media (max-width: 768px) {
    .stat-home__tab {
        padding: 0.5rem 0.9rem;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }
    .stat-home__panel {
        padding: 1rem 0.75rem;
    }
    .stat-home__table thead th,
    .stat-home__row td {
        padding: 0.5rem 0.5rem;
        font-size: 0.78rem;
    }
    .stat-home__class {
        display: none;
    }
    .stat-home__avatar {
        width: 26px;
        height: 26px;
    }
}
