:root {
    --bg: #0f172a;
    --text: #e2e8f0;
    --muted: #94a3b8;

    /* 팀 공통 변수(팀별로 오버라이드) */
    --team-color: #00f0ff;
    --team-color-2: #8b5cf6;
    --team-grad: linear-gradient(135deg, var(--team-color), var(--team-color-2));
    --team-logo: none;
}

/* ===== 기본 ===== */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Poppins', 'Noto Sans KR', sans-serif;
    background: var(--bg);
    color: var(--text);
}

/* ===== 배너 ===== */
.team-hero {
    padding: 60px 30px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
    position: relative;
    background: var(--team-grad);
    overflow: hidden;
}

.team-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--team-logo);
    background-repeat: no-repeat;
    background-position: right 6% center;
    background-size: 200px;
    pointer-events: none;
}

.team-hero-content {
    max-width: 1200px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.team-hero-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 12px;
}

.slogan.team-slogan {
    font-size: 1.5rem;
    font-style: italic;
    font-weight: 600;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, .8);
    margin-top: 10px;
    opacity: 0;
    animation: sloganFade 1.2s ease forwards;
}

@keyframes sloganFade {
    from {
        transform: translateY(8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.team-hero-logo {
    width: 200px;
    height: 120px;
}

/* ===== 공통 레이아웃/버튼/푸터 ===== */
.section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.btn {
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text);
    background: transparent;
    border: 1px solid var(--team-color);
    transition: .2s;
}

.back-home-section {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 60px;
}

.btn.neon-home-btn {
    display: inline-block;
    padding: 14px 28px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    border-radius: 999px;
    background: linear-gradient(to right, #00f0ff, #8b5cf6);
    color: #0f172a;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(6px);
    border: none;
    text-align: center;
}

.neon-home-btn:hover  {
    background: linear-gradient(to right, #8b5cf6, #00f0ff);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

footer {
    text-align: center;
    padding: 40px 0;
    font-size: .9rem;
    color: var(--muted);
}

/* ===== 필터 바 ===== */
.filter-row {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 140px;
}

.filter-item.grow {
    flex: 1;
}

.filter-bar select,
.filter-bar input {
    background: #121a33;
    color: #e2e8f0;
    border: 1px solid #2a3555;
    border-radius: 10px;
    padding: 8px 10px;
}

.search-button {
    background: transparent;
    border: 1px solid var(--team-color);
    color: var(--text);
}

.search-button:hover {
    box-shadow: 0 0 12px var(--team-color);
}

/* ===== 뷰 네비 (그룹 전환) ===== */
.view-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 8px 0 14px;
}

.nav-btn {
    background: #121a33;
    border: 1px solid #2a3555;
    color: #e2e8f0;
    padding: 6px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    background: #1f2a47;
    transition: transform .2s, background .2s;
}

.dots .dot.active {
    background: var(--team-color);
    box-shadow: 0 0 10px var(--team-color);
    transform: scale(1.1);
}

/* ===== 테이블 래퍼 ===== */
.table-wrap {
    margin-top: 10px;
}

.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #1e2a44;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* ===== 테이블 ===== */
#statsTable {
    border-collapse: collapse;
    width: 100%;
    min-width: 1100px;
}

#statsTable th, #statsTable td {
    border-bottom: 1px solid #1b2440;
    padding: 10px 12px;
    white-space: nowrap;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

#statsTable thead th {
    background: #0f1830;
    position: relative;
}

#statsTable tbody tr:hover {
    background: #0f1833;
}

/* 고정 컬럼(순위/이름) */
.fixed-col {
    position: sticky;
    left: 0;
    background: rgba(10, 14, 24, .9);
    backdrop-filter: blur(6px);
    z-index: 2;
}

#statsTable .fixed-col + .fixed-col {
    left: 72px;
    z-index: 2;
}

#statsTable th.fixed-col, #statsTable td.fixed-col {
    min-width: 72px;
}

/* 헤더 인터랙션 */
.stat-header {
    user-select: none;
    position: relative;
}

.stat-header:hover {
    text-decoration: underline;
}

/* 순위 칼럼 폭 */
.rank-cell {
    width: 40px;
    min-width: 40px;
    text-align: center;
    padding: 4px 0;
}

/* 레전드/날짜 */
.legend {
    margin: 12px 4px;
    color: #94a3b8;
    font-size: 13px;
}

.record-date {
    margin-top: 5px;
    font-size: .9rem;
    color: #aaa;
}

/* ===== 툴팁 (헤더 설명) ===== */
.th-tip {
    position: relative;
    cursor: help;
    border-bottom: 1px dotted var(--team-color-2);
}

.th-tip .tip-box {
    position: absolute;
    bottom: 100%;
    left: 0;
    transform: translateY(-6px);
    background: #0b1220;
    color: #e2e8f0;
    border: 1px solid rgba(0, 240, 255, .3);
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 10px;
    white-space: nowrap;
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease;
    pointer-events: none;
    z-index: 10;
}

.th-tip:hover .tip-box {
    visibility: visible;
    opacity: 1;
}

/* ===== 반응형 ===== */
@media (max-width: 768px) {
    .stats-body {
        font-size: 14px;
    }

    #statsTable th, #statsTable td {
        padding: 8px 10px;
    }

    #statsTable .fixed-col {
        min-width: 56px;
    }

    .team-hero .team-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== 유틸 ===== */
.hidden {
    display: none !important;
}
