/*
 * VS 비교 화면. 블루팀(왼쪽) / 레드팀(오른쪽)은 게임 안의 진영 색을 그대로 쓴다.
 * 가운데 비교표가 이 페이지의 주인공이라 나머지는 선과 여백 위주로 조용하게 둔다.
 */
:root {
    --ink: #0c111c;
    --panel: #131b2b;
    --panel-2: #1a2438;
    --line: rgba(255, 255, 255, .08);
    --text: #e9edf5;
    --mute: #8c97ad;
    --blue: #5b8cff;
    --red: #ff5c68;
    --gold: #c8aa6e;
}

.vs-container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 60px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px) minmax(0, 1fr);
    column-gap: 28px;
    row-gap: 36px;
    position: relative;
    z-index: 9;
    align-items: start;
}

/* ───── 양쪽 선수 ───── */
.side { min-width: 0; }
.side-a { --side: var(--blue); }
.side-b { --side: var(--red); }

.side .finder {
    display: flex;
    margin: 0 0 14px;
    border-bottom: 2px solid var(--side);
}
.side .finder .form-control {
    background: transparent;
    border: 0;
    border-radius: 0;
    color: var(--text);
    font-size: 17px;
    padding: 10px 2px;
    box-shadow: none;
}
.side .finder .form-control::placeholder { color: var(--mute); }
.side .finder .search-button {
    background: var(--side);
    color: #0c111c;
    font-weight: 700;
    border: 0;
    border-radius: 0;
    padding: 0 20px;
}
.side .finder .search-button:hover { filter: brightness(1.12); }

.side .vsb-info { position: relative; min-height: 200px; }
.side .no-data {
    margin: 0;
    padding: 56px 0;
    text-align: center;
    color: var(--mute);
    font-size: 15px;
    line-height: 1.6;
}
.loading-img {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}

.vs-player {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
}
.vsp-icon { position: relative; flex: none; }
.vsp-icon img {
    width: 64px; height: 64px;
    border-radius: 50%;
    border: 3px solid var(--side);
    display: block;
}
.vsp-level {
    position: absolute;
    left: 50%; bottom: -8px;
    transform: translateX(-50%);
    background: var(--ink);
    border: 1px solid var(--side);
    color: var(--text);
    font-size: 11px;
    padding: 0 7px;
    border-radius: 9px;
}
.vsp-id {
    flex: 1;
    min-width: 0;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.vsp-tag { font-size: 14px; font-weight: 500; color: var(--mute); margin-left: 4px; }
.vsp-btn {
    flex: none;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--mute);
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 4px;
}
.vsp-btn:hover { color: var(--text); border-color: var(--side); }

.ranks { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.rank-cell { padding: 14px 0 12px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.rank-cell + .rank-cell { padding-left: 16px; border-left: 1px solid var(--line); }
.rank-cell img { width: 48px; height: 48px; flex: none; }
.rank-cell .rk-kind { font-size: 12px; color: var(--mute); }
.rank-cell .rk-name { font-size: 15px; font-weight: 700; color: var(--text); }
.rank-cell .rk-wl { font-size: 12px; color: var(--mute); }
.rank-cell.unranked .rk-name { color: var(--mute); font-weight: 500; }

.vs-most-list {
    list-style: none;
    margin: 0; padding: 12px 0;
    display: flex; gap: 8px;
    border-top: 1px solid var(--line);
}
.vs-most { position: relative; }
.vs-most img { width: 44px; height: 44px; border-radius: 6px; display: block; }
.vsm-level {
    position: absolute; right: -3px; bottom: -3px;
    background: var(--ink); color: var(--gold);
    font-size: 10px; line-height: 1;
    padding: 2px 4px; border-radius: 3px;
}

.vs-game-recent { border-top: 1px solid var(--line); padding-top: 12px; }
.recent-head { font-size: 12px; color: var(--mute); margin-bottom: 8px; }
.recent-wl { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.recent-wl strong { font-size: 15px; color: var(--text); }
.recent-wl span { font-size: 13px; color: var(--mute); }
.recent-wl .red { color: var(--red); }
.vstg-bar { height: 6px; margin-top: 8px; background: var(--red); border-radius: 3px; overflow: hidden; }
.vstg-gage { display: block; height: 100%; background: var(--blue); }

/* ───── 가운데 비교표 ───── */
.duel { padding: 4px 0 0; }
.duel-mark {
    text-align: center;
    font-family: 'Black Han Sans', 'Pretendard Variable', sans-serif;
    font-size: 76px;
    line-height: 1;
    letter-spacing: 2px;
    color: var(--gold);
    margin: 0 0 6px;
}
.duel-score {
    display: flex; justify-content: center; align-items: baseline; gap: 14px;
    font-family: 'Black Han Sans', 'Pretendard Variable', sans-serif;
    font-size: 30px; color: var(--mute);
    min-height: 38px;
    margin-bottom: 18px;
}
.duel-score .a { color: var(--blue); }
.duel-score .b { color: var(--red); }
.duel-score .lead { color: var(--text); }
.duel-score .a.lead { color: var(--blue); }
.duel-score .b.lead { color: var(--red); }

.drow {
    display: grid;
    grid-template-columns: 1fr 76px 1fr;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}
.dlabel { text-align: center; font-size: 13px; color: var(--mute); }
.dside { display: flex; flex-direction: column; gap: 5px; }
.dside b {
    font-size: 20px; font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--mute);
    line-height: 1;
}
.dside i {
    display: block; height: 5px; width: var(--w, 0%);
    background: var(--mute); opacity: .35;
    transition: width .5s cubic-bezier(.2, .8, .2, 1);
}
.dside.l { align-items: flex-end; text-align: right; }
.dside.l i { margin-left: auto; }
.dside.l.win b { color: var(--blue); } .dside.l.win i { background: var(--blue); opacity: 1; }
.dside.r.win b { color: var(--red); }  .dside.r.win i { background: var(--red); opacity: 1; }
.duel-empty { text-align: center; color: var(--mute); font-size: 14px; line-height: 1.6; padding: 24px 0; border-top: 1px solid var(--line); }
.duel-note { margin: 14px 0 0; font-size: 12px; color: var(--mute); text-align: center; }

/* ───── 아래 최근 게임 목록 ───── */
.vs-lists {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}
.vs-lists .vs-box { min-width: 0; }
.vs-lists .vs-box:first-child { --side: var(--blue); }
.vs-lists .vs-box:last-child { --side: var(--red); }
.vs-lists .vst-game-list { position: relative; min-height: 0; }

@media (max-width: 1100px) {
    .vs-container { grid-template-columns: 1fr 1fr; }
    .duel { grid-column: 1 / -1; grid-row: 2; }
    .vs-lists { grid-row: 3; }
}
@media (max-width: 760px) {
    .vs-container { grid-template-columns: 1fr; padding: 0 14px 40px; }
    .duel { grid-row: auto; order: 3; }
    .vs-lists { grid-template-columns: 1fr; order: 4; overflow-x: auto; }
    .duel-mark { font-size: 56px; }
}

@media (prefers-reduced-motion: reduce) {
    .dside i { transition: none; }
}

/* 처음엔 5경기만, 나머지는 더보기 */
.vst-game-list.collapsed .vst-game-box.extra { display: none; }
.more-games {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 11px 0;
    background: transparent;
    color: var(--mute);
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: 14px;
}
.more-games:hover { color: var(--text); border-color: var(--side, var(--mute)); }

/* 최근 많이 한 챔피언 */
.champ-rows { list-style: none; margin: 0; padding: 0; }
.champ-rows li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.champ-rows img { width: 34px; height: 34px; border-radius: 6px; flex: none; }
.champ-rows .cn { flex: 1; min-width: 0; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ-rows .cs, .champ-rows .ck { color: var(--mute); font-variant-numeric: tabular-nums; }
.champ-rows .ck { min-width: 70px; text-align: right; color: var(--side, var(--text)); }

/* ───── 특색: 대전 화면 ───── */
.vs-body {
    background:
        radial-gradient(55% 380px at 0% 0%, rgba(91, 140, 255, .16), transparent 70%),
        radial-gradient(55% 380px at 100% 0%, rgba(255, 92, 104, .16), transparent 70%);
}
/* VS 글자 뒤로 비스듬히 가르는 선: 두 진영이 맞붙는 느낌 */
.duel { position: relative; }
.duel::before {
    content: '';
    position: absolute;
    left: 50%; top: -6px;
    width: 2px; height: 120px;
    background: linear-gradient(var(--blue), var(--red));
    transform: translateX(-50%) rotate(14deg);
    opacity: .55;
}
.duel-mark { position: relative; text-shadow: 0 0 28px rgba(200, 170, 110, .35); }
.duel-tug { height: 6px; background: var(--red); margin: 0 auto 10px; max-width: 280px; overflow: hidden; transform: skewX(-20deg); }
.duel-tug span { display: block; height: 100%; background: var(--blue); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.duel-verdict { text-align: center; min-height: 24px; margin-bottom: 14px; font-size: 15px; color: var(--mute); }
.duel-verdict b { font-weight: 800; font-size: 17px; }
.duel-verdict b.a { color: var(--blue); }
.duel-verdict b.b { color: var(--red); }
@media (prefers-reduced-motion: reduce) { .duel-tug span { transition: none; } }

/* ───── 플레이어 패널을 작게 ───── */
.side .finder .form-control { font-size: 15px; padding: 8px 2px; }
.side .finder .search-button { padding: 0 16px; font-size: 14px; }
.side .vsb-info { min-height: 120px; }
.side .no-data { padding: 34px 0; font-size: 14px; }
.vs-player { gap: 10px; padding-bottom: 12px; }
.vsp-icon img { width: 44px; height: 44px; border-width: 2px; }
.vsp-level { font-size: 10px; bottom: -6px; }
.vsp-id { font-size: 17px; }
.vsp-tag { font-size: 12px; }
.vsp-btn { font-size: 11px; padding: 4px 8px; }
.rank-cell { padding: 9px 0 8px; gap: 8px; }
.rank-cell + .rank-cell { padding-left: 12px; }
.rank-cell img { width: 34px; height: 34px; }
.rank-cell .rk-kind { font-size: 11px; }
.rank-cell .rk-name { font-size: 13px; }
.rank-cell .rk-wl { font-size: 11px; }
.recent-head { font-size: 11px; margin-bottom: 6px; }
.recent-wl strong { font-size: 13px; }
.recent-wl span { font-size: 12px; }
.vs-game-recent { padding-top: 9px; }

/* 이번 시즌 모스트가 주인공, 숙련도는 작은 아이콘 한 줄 */
.season-most { border-top: 1px solid var(--line); padding: 10px 0 4px; }
.season-wait { margin: 4px 0 6px; font-size: 12px; color: var(--mute); }
.champ-rows li { padding: 6px 0; }
.champ-rows img { width: 30px; height: 30px; }
.champ-rows li:first-child .cn { font-size: 15px; }
.vs-most-list { padding: 8px 0; gap: 5px; }
.vs-most img { width: 26px; height: 26px; border-radius: 4px; opacity: .75; }
.vsm-level { font-size: 9px; padding: 1px 3px; }
