:root {
    --bg: #0b1020;
    --bg-soft: #121931;
    --panel: #171f3c;
    --line: #2a365f;
    --text: #f3f5ff;
    --muted: #b4bedf;
    --accent: #5c8cff;
    --accent-soft: #8baeff;
    --shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #090d1a 0%, #0b1020 100%);
    color: var(--text);
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(9, 13, 26, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.logo {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 22px;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 15px;
    padding-bottom: 6px;
    border-bottom: 2px solid transparent;
}

.nav a:hover,
.nav a.is-active {
    color: var(--text);
    border-bottom-color: var(--accent-soft);
}

.hero {
    padding: 72px 0 36px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    align-items: stretch;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.03;
}

h2 {
    margin: 0 0 14px;
    font-size: 30px;
    line-height: 1.15;
}

h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.lead,
.card p,
.panel p,
.placeholder-card p,
.info-card li,
.page-text,
.state-card p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.15s ease, opacity 0.15s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #ffffff;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line);
}

.info-card,
.card,
.panel,
.placeholder-card,
.toolbar-card,
.table-card,
.state-card,
.leaderboard-shell {
    background: linear-gradient(180deg, rgba(23, 31, 60, 0.96) 0%, rgba(16, 22, 44, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.info-card {
    padding: 28px;
}

.feature-list {
    margin: 0;
    padding-left: 20px;
}

.feature-list li + li {
    margin-top: 12px;
}

.section {
    padding: 36px 0 72px;
}

.section-accent {
    padding-bottom: 72px;
}

.section-head {
    margin-bottom: 24px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.card,
.panel,
.placeholder-card,
.state-card {
    padding: 24px;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.placeholder-card {
    max-width: 720px;
    margin: 24px auto 0;
}

.page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.page-title {
    margin-bottom: 12px;
}

.page-actions {
    display: flex;
    gap: 12px;
}

.toolbar-card,
.table-card {
    padding: 24px;
}

.toolbar-card {
    margin-bottom: 24px;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 184px auto;
    gap: 18px;
    align-items: end;
}

.toolbar-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toolbar-field label {
    color: var(--muted);
    font-size: 15px;
}

.toolbar input,
.toolbar select,
.leaderboard-search,
.leaderboard-limit {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 14px;
    border: 1px solid rgba(121, 146, 255, 0.22);
    background: rgba(6, 12, 29, 0.92);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.toolbar input:focus,
.toolbar select:focus,
.leaderboard-search:focus,
.leaderboard-limit:focus {
    border-color: rgba(121, 146, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(92, 140, 255, 0.12);
}

.toolbar-buttons {
    display: flex;
    gap: 12px;
}

.table-scroll,
.leaderboard-table-wrap {
    overflow-x: auto;
}

.rating-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.rating-table th,
.rating-table td {
    padding: 18px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    vertical-align: middle;
}

.rating-table th {
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rating-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.player-name {
    font-size: 18px;
    font-weight: 700;
}

.country-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.country-flag-image {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    flex: 0 0 auto;
}

.state-card-error {
    border-color: rgba(255, 107, 107, 0.4);
}

.leaderboard-container {
    width: min(1820px, calc(100% - 20px));
}

.leaderboard-shell-polished {
    overflow: hidden;
    padding: 0;
    border-radius: 24px;
    background:
        radial-gradient(circle at top center, rgba(89, 122, 255, 0.12), transparent 32%),
        linear-gradient(180deg, rgba(17, 25, 53, 0.98) 0%, rgba(7, 13, 31, 0.99) 100%);
}

.leaderboard-toolbar-polished {
    padding: 18px 28px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.leaderboard-toolbar-top {
    display: flex;
    justify-content: center;
    align-items: center;
}

.leaderboard-toolbar-polished form {
    width: 100%;
}

.leaderboard-filter-polished {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.leaderboard-filter-status-form {
    display: flex;
    justify-content: center;
    align-items: center;
}

.leaderboard-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.leaderboard-filter-row-status {
    justify-content: center;
    width: 100%;
}

.leaderboard-button {
    min-height: 52px;
    border: 1px solid rgba(121, 146, 255, 0.3);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(48, 77, 176, 0.6), rgba(30, 49, 112, 0.85));
    color: #eef4ff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.leaderboard-button:hover {
    transform: translateY(-1px);
    border-color: rgba(139, 174, 255, 0.5);
    box-shadow: 0 8px 22px rgba(51, 92, 223, 0.28);
}

.leaderboard-table-polished {
    width: 100%;
    min-width: 1280px;
    border-collapse: collapse;
    table-layout: fixed;
}

.leaderboard-table-polished col.col-rank {
    width: 86px;
}

.leaderboard-table-polished col.col-elo {
    width: 110px;
}

.leaderboard-table-polished col.col-player {
    width: auto;
}

.leaderboard-table-polished col.col-games-all {
    width: 148px;
}

.leaderboard-table-polished col.col-winrate {
    width: 92px;
}

.leaderboard-table-polished col.col-wins {
    width: 88px;
}

.leaderboard-table-polished col.col-losses {
    width: 88px;
}

.leaderboard-table-polished thead th {
    padding: 16px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #f1f5ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}

.leaderboard-table-polished tbody td {
    padding: 14px 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    color: #f5f8ff;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-table-polished tbody tr {
    transition: background 0.16s ease;
}

.leaderboard-table-polished tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.015);
}

.leaderboard-table-polished tbody tr:hover {
    background: linear-gradient(90deg, rgba(93, 117, 208, 0.08), rgba(255, 255, 255, 0.02));
}

.leaderboard-table-polished thead th.col-rank,
.leaderboard-table-polished thead th.col-player,
.leaderboard-table-polished tbody td.value-player {
    text-align: left;
}
.leaderboard-table-polished tbody td.value-rank,
.leaderboard-table-polished thead th.col-elo,
.leaderboard-table-polished tbody td.value-elo,
.leaderboard-table-polished thead th.col-games-all,
.leaderboard-table-polished tbody td.value-games-all,
.leaderboard-table-polished thead th.col-winrate,
.leaderboard-table-polished tbody td.value-winrate,
.leaderboard-table-polished thead th.col-wins,
.leaderboard-table-polished tbody td.value-wins,
.leaderboard-table-polished thead th.col-losses,
.leaderboard-table-polished tbody td.value-losses {
    text-align: center;
}

.value-rank {
    color: #dfe8ff;
    font-weight: 800;
}

.value-elo {
    color: #eef4ff;
    font-weight: 700;
}

.polished-player-inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sc2-player-name {
    color: #18b1ff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.race-inline-icon,
.race-cell-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.race-inline-icon {
    opacity: 0.95;
}

.race-cell-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.race-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 88px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.race-tag-protoss {
    background: linear-gradient(180deg, rgba(73, 66, 46, 0.9), rgba(49, 45, 32, 0.95));
    color: #ffd35f;
    border-color: rgba(255, 211, 95, 0.15);
}

.race-tag-terran {
    background: linear-gradient(180deg, rgba(27, 56, 122, 0.9), rgba(18, 41, 95, 0.95));
    color: #8dc0ff;
    border-color: rgba(141, 192, 255, 0.15);
}

.race-tag-zerg {
    background: linear-gradient(180deg, rgba(63, 37, 113, 0.9), rgba(47, 27, 87, 0.95));
    color: #c690ff;
    border-color: rgba(198, 144, 255, 0.15);
}

.muted-dash {
    color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 980px) {
    .hero-grid,
    .cards-grid,
    .two-col,
    .toolbar,
    .page-head,
    .profile-meta-grid,
    .profile-chart-summary {
        grid-template-columns: 1fr;
        display: grid;
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
        padding: 14px 0;
    }

    .toolbar-buttons,
    .page-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .toolbar-buttons .button,
    .page-actions .button {
        width: 100%;
    }

    .leaderboard-filter-polished {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
    }
}

.col-divider-left {
    border-left: 1px solid rgba(138, 158, 228, 0.18);
}

.leaderboard-table-polished thead th.col-divider-left,
.leaderboard-table-polished tbody td.col-divider-left {
    box-shadow: inset 1px 0 0 rgba(138, 158, 228, 0.18);
}
.player-profile-link {
    color: inherit;
    text-decoration: none;
}

.player-profile-link:hover .sc2-player-name,
.player-profile-link:hover,
.inline-link:hover {
    color: #79c8ff;
}

.inline-link {
    color: #b7d8ff;
    text-decoration: none;
    font-weight: 700;
}

.leaderboard-row-link {
    cursor: pointer;
}

.leaderboard-row-link:focus-visible {
    outline: 2px solid rgba(121, 200, 255, 0.9);
    outline-offset: -2px;
}

.profile-container {
    width: min(1320px, calc(100% - 40px));
}

.profile-header-card,
.profile-stat-card,
.profile-section-card {
    background: linear-gradient(180deg, rgba(23, 31, 60, 0.96) 0%, rgba(16, 22, 44, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.profile-header-card {
    padding: 24px;
    margin-bottom: 20px;
}

.profile-header-top {
    margin-bottom: 20px;
}

.profile-back-button {
    min-width: 220px;
}

.profile-header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.profile-identity {
    min-width: 0;
}

.profile-identity-line {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.profile-player-name {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.05;
}

.profile-subtitle {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.profile-flag {
    width: 34px;
    height: 24px;
}

.profile-race-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
}

.profile-elo-card {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    min-width: 180px;
    padding: 20px 22px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(40, 61, 136, 0.55), rgba(19, 31, 77, 0.88));
    border: none;
    box-shadow: 0 16px 36px rgba(6, 13, 33, 0.32);
}

.profile-elo-label,
.profile-last-played,
.profile-stat-label {
    color: var(--muted);
}

.profile-elo-value {
    font-size: 38px;
    line-height: 1;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.profile-stat-card {
    padding: 22px;
}

.profile-stat-label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}

.profile-stat-value {
    font-size: 34px;
    line-height: 1;
}

.profile-section-card {
    padding: 22px;
}

.profile-section-head {
    margin-bottom: 18px;
}

.profile-section-head p {
    margin: 8px 0 0;
    color: var(--muted);
}

.profile-empty-state {
    margin-top: 0;
}

.profile-history-table {
    min-width: 1080px;
}

.profile-race-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.match-result-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.match-result-win {
    color: #98f0b1;
    background: rgba(60, 140, 84, 0.22);
    border: 1px solid rgba(91, 212, 125, 0.2);
}

.match-result-loss {
    color: #ffb5b5;
    background: rgba(145, 60, 60, 0.22);
    border: 1px solid rgba(255, 125, 125, 0.2);
}

.delta-win {
    color: #98f0b1;
}

.delta-loss {
    color: #ffb5b5;
}

@media (max-width: 980px) {
    .profile-header-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-elo-card {
        align-items: flex-start;
        width: 100%;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .profile-stats-grid {
        grid-template-columns: 1fr;
    }

    .profile-player-name {
        font-size: 30px;
    }
}


.profile-meta-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 18px;
    margin-bottom: 20px;
}

.profile-meta-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    background: linear-gradient(180deg, rgba(23, 31, 60, 0.96) 0%, rgba(16, 22, 44, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.profile-meta-label {
    color: var(--muted);
    font-size: 15px;
}

.profile-meta-value,
.profile-discord-link,
.profile-meta-empty {
    font-size: 17px;
    line-height: 1.45;
}

.profile-discord-link {
    color: #b7d8ff;
    text-decoration: none;
    font-weight: 700;
    word-break: break-word;
}

.profile-discord-link:hover {
    color: #d4e5ff;
}

.profile-meta-empty {
    color: rgba(255, 255, 255, 0.48);
}

.profile-rating-chart-section {
    margin-bottom: 20px;
}

.profile-chart-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.profile-chart-frame {
    position: relative;
    padding: 16px 12px 10px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(10, 16, 35, 0.9) 0%, rgba(7, 12, 27, 0.96) 100%);
    border: 1px solid rgba(121, 146, 255, 0.12);
    overflow: hidden;
}

.rating-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: hidden;
    user-select: none;
}

.profile-section-head-chart {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.chart-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.chart-mode-button,
.chart-reset-button {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.chart-mode-button {
    border: none;
    background: transparent;
    color: var(--muted);
}

.chart-mode-button.is-active {
    background: rgba(92, 140, 255, 0.22);
    color: var(--text);
}

.chart-reset-button {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
}

.rating-chart-grid-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.rating-chart-axis-label {
    fill: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.rating-chart-date-separator {
    stroke: rgba(140, 167, 255, 0.12);
    stroke-width: 1;
    stroke-dasharray: 4 6;
}

.rating-chart-date-label {
    fill: rgba(255, 255, 255, 0.42);
    font-size: 11px;
}

.rating-chart-area {
    display: none;
}

.rating-chart-line {
    opacity: 0;
    transition: opacity 0.18s ease;
}

.rating-chart-line.is-visible {
    opacity: 1;
}

.rating-chart-line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.rating-chart-line-smoothed {
    stroke: #86b4ff;
    stroke-width: 4;
}

.rating-chart-line-raw {
    stroke: rgba(174, 201, 255, 0.82);
    stroke-width: 2.4;
}

.rating-chart-brush-overlay {
    fill: rgba(255, 255, 255, 0);
    cursor: crosshair;
}

.rating-chart-brush-selection {
    fill: rgba(115, 156, 255, 0.14);
    stroke: rgba(148, 180, 255, 0.48);
    stroke-width: 1;
    opacity: 0;
    pointer-events: none;
}

.rating-chart-brush-selection.is-visible {
    opacity: 1;
}

.rating-chart-cursor-line {
    stroke: rgba(214, 227, 255, 0.45);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0;
    pointer-events: none;
}

.rating-chart-cursor-dot {
    fill: #f1f6ff;
    stroke: #6f9dff;
    stroke-width: 2;
    opacity: 0;
    pointer-events: none;
}

.rating-chart-cursor-line.is-visible,
.rating-chart-cursor-dot.is-visible {
    opacity: 1;
}

.chart-tooltip {
    position: absolute;
    z-index: 5;
    min-width: 220px;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(11, 16, 32, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.chart-tooltip-date {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.chart-tooltip-main {
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.chart-tooltip-sub {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    line-height: 1.4;
}

.profile-chart-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.profile-chart-summary-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-chart-summary-item span {
    color: var(--muted);
    font-size: 14px;
}

.profile-chart-summary-item strong {
    font-size: 28px;
    line-height: 1;
}

.profile-chart-range {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.56);
    font-size: 14px;
}

@media (max-width: 980px) {
    .profile-header-main {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-elo-card {
        align-items: flex-start;
    }

    .profile-section-head-chart {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-chart-range {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ===== Submit Result module merged from styles (8).css ===== */

.submit-container {
    width: min(1200px, calc(100% - 40px));
    margin: 0 auto;
}

.submit-shell,
.form-section {
    background: linear-gradient(180deg, rgba(23, 31, 60, 0.96) 0%, rgba(16, 22, 44, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.submit-shell {
    padding: 34px;
    background:
        radial-gradient(circle at top right, rgba(94, 142, 255, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(14, 23, 46, 0.98) 0%, rgba(9, 16, 31, 1) 100%);
}

.form-section {
    padding: 24px;
    background: linear-gradient(180deg, rgba(17, 28, 54, 0.92) 0%, rgba(11, 19, 37, 0.98) 100%);
}

.submit-form input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.submit-form select,
.submit-form textarea {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    border: 1px solid rgba(121, 146, 255, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(8, 14, 28, 0.96) 0%, rgba(7, 12, 24, 0.98) 100%);
    color: var(--text);
    font-size: 15px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.submit-form textarea {
    min-height: 138px;
    padding: 14px 16px;
    resize: vertical;
}

.submit-form input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]):focus,
.submit-form select:focus,
.submit-form textarea:focus {
    border-color: rgba(121, 146, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(92, 140, 255, 0.12);
}

.submit-form input::placeholder,
.submit-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.34);
}

/* Submit Match */

.submit-section {
    padding-top: 42px;
}

.submit-hero {
    margin-bottom: 26px;
}

.submit-title {
    margin-bottom: 12px;
    font-size: clamp(40px, 5vw, 68px);
    letter-spacing: -0.03em;
}

.submit-lead {
    max-width: 720px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.submit-alert {
    margin-bottom: 24px;
    padding: 18px 20px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.submit-alert-error {
    background: linear-gradient(180deg, rgba(78, 25, 32, 0.88) 0%, rgba(49, 17, 22, 0.96) 100%);
    border-color: rgba(255, 129, 129, 0.2);
    color: #ffd5d5;
}

.submit-alert-success {
    background: linear-gradient(180deg, rgba(23, 43, 74, 0.96) 0%, rgba(14, 25, 49, 0.98) 100%);
    border-color: rgba(121, 146, 255, 0.2);
}

.submit-alert-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 14px;
}

.submit-alert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.submit-alert-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 6px;
}

.submit-alert-main {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-weight: 700;
}

.submit-alert-main a {
    color: #b7d8ff;
    text-decoration: none;
}

.submit-alert-note {
    margin-top: 6px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 13px;
}

.submit-alert-note-standalone {
    margin-top: 16px;
}

.submit-elo-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.submit-elo-pill {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    font-weight: 700;
}

.submit-elo-pill-win {
    background: rgba(60, 140, 84, 0.18);
    border: 1px solid rgba(91, 212, 125, 0.18);
    color: #b5f7c7;
}

.submit-elo-pill-loss {
    background: rgba(145, 60, 60, 0.18);
    border: 1px solid rgba(255, 125, 125, 0.16);
    color: #ffd1d1;
}

.submit-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.submit-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.form-section-span-2 {
    grid-column: span 2;
}

.form-section-head {
    margin-bottom: 18px;
}

.form-section-head h2 {
    margin: 0 0 6px;
    font-size: 23px;
}

.form-section-head p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.form-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.field-help {
    color: rgba(255, 255, 255, 0.54);
    font-size: 13px;
    line-height: 1.45;
}

.player-status-hint {
    display: none;
    margin-top: -2px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255, 204, 102, 0.26);
    background: linear-gradient(180deg, rgba(71, 52, 18, 0.92) 0%, rgba(53, 38, 12, 0.96) 100%);
    color: #ffe08a;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
}

.player-status-hint.is-visible {
    display: block;
}

.choice-grid {
    display: grid;
    gap: 12px;
}

.choice-grid-race {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.choice-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card-wrapper {
    position: relative;
}

.choice-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

.choice-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 78px;
    width: 100%;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(10, 17, 33, 0.98) 0%, rgba(7, 12, 24, 1) 100%);
    color: var(--text);
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}

.choice-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.choice-card:hover {
    transform: translateY(-1px);
    border-color: rgba(121, 146, 255, 0.3);
}

.choice-input:checked + .choice-card,
.choice-input:focus-visible + .choice-card {
    border-color: rgba(139, 174, 255, 0.64);
    box-shadow: 0 0 0 4px rgba(92, 140, 255, 0.14), 0 12px 28px rgba(39, 72, 161, 0.22);
}

.choice-card-race-terran {
    color: #9bcbff;
    background: linear-gradient(180deg, rgba(18, 47, 107, 0.92) 0%, rgba(10, 29, 67, 0.98) 100%);
}

.choice-card-race-protoss {
    color: #ffd76e;
    background: linear-gradient(180deg, rgba(85, 73, 32, 0.92) 0%, rgba(55, 46, 18, 0.98) 100%);
}

.choice-card-race-zerg {
    color: #d5a8ff;
    background: linear-gradient(180deg, rgba(73, 37, 129, 0.92) 0%, rgba(43, 20, 80, 0.98) 100%);
}

.choice-card-mode {
    flex-direction: column;
}

.submit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 4px;
}

.submit-shell datalist {
    display: none;
}

@media (max-width: 1100px) {
    .submit-alert-grid,
    .submit-elo-summary,
    .submit-form-grid,
    .form-two-col {
        grid-template-columns: 1fr;
    }

    .form-section-span-2 {
        grid-column: auto;
    }
}

@media (max-width: 980px) {
    .choice-grid-race,
    .choice-grid-compact {
        grid-template-columns: 1fr;
    }

    .submit-actions .button {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .submit-container {
        width: min(100%, calc(100% - 20px));
    }

    .submit-shell,
    .form-section {
        padding: 16px;
    }
}



.game-reports-table {
    min-width: 1120px;
}

.leaderboard-table-polished col.col-match-id {
    width: 84px;
}

.leaderboard-table-polished col.col-played-at {
    width: 152px;
}

.leaderboard-table-polished col.col-match-player {
    width: 190px;
}

.leaderboard-table-polished col.col-ranked {
    width: 128px;
}

.leaderboard-table-polished col.col-game-type {
    width: 126px;
}

.leaderboard-table-polished col.col-mission {
    width: 190px;
}

.leaderboard-table-polished col.col-comment {
    width: auto;
}

.leaderboard-table-polished thead th.col-match-id,
.leaderboard-table-polished thead th.col-played-at,
.leaderboard-table-polished thead th.col-ranked,
.leaderboard-table-polished thead th.col-game-type,
.leaderboard-table-polished thead th.col-mission {
    text-align: center;
}
.leaderboard-table-polished thead th.col-match-player,
.leaderboard-table-polished tbody td.value-match-player {
    text-align: left;
}
.leaderboard-table-polished thead th.col-comment {
    text-align: left;
}

.leaderboard-table-polished tbody td.value-match-id,
.leaderboard-table-polished tbody td.value-played-at,
.leaderboard-table-polished tbody td.value-ranked,
.leaderboard-table-polished tbody td.value-game-type,
.leaderboard-table-polished tbody td.value-mission {
    text-align: center;
}

.leaderboard-table-polished tbody td.value-comment {
    text-align: left;
    color: var(--muted);
}

.leaderboard-table-polished tbody td.value-match-id,
.leaderboard-table-polished tbody td.value-played-at,
.leaderboard-table-polished tbody td.value-ranked,
.leaderboard-table-polished tbody td.value-game-type,
.leaderboard-table-polished tbody td.value-mission,
.leaderboard-table-polished tbody td.value-comment {
    font-size: 12px;
}
.admin-header-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(92, 140, 255, 0.16);
    border: 1px solid rgba(139, 174, 255, 0.3);
    color: var(--accent-soft);
    font-size: 13px;
    font-weight: 700;
}

.button-small {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
}

.col-admin-actions,
.value-admin-action {
    width: 110px;
    text-align: center;
}

.admin-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    background: rgba(92, 140, 255, 0.16);
    border: 1px solid rgba(139, 174, 255, 0.28);
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.admin-action-link:hover {
    background: rgba(92, 140, 255, 0.24);
}

.admin-auth-container {
    display: flex;
    justify-content: center;
}

.admin-auth-card,
.admin-editor-shell {
    width: min(920px, 100%);
    padding: 28px;
    background: linear-gradient(180deg, rgba(23, 31, 60, 0.96) 0%, rgba(16, 22, 44, 0.96) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.admin-auth-card {
    max-width: 520px;
}

.admin-dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
}

.admin-form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.admin-form-two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-form-actions-split {
    justify-content: space-between;
    flex-wrap: wrap;
}

.admin-inline-alert {
    margin-bottom: 20px;
}

.admin-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 15px;
}

.admin-editor-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    font-size: 14px;
}

.button-danger {
    background: rgba(255, 99, 132, 0.16);
    border-color: rgba(255, 99, 132, 0.35);
    color: #ffffff;
}

@media (max-width: 980px) {
    .admin-header-box {
        width: 100%;
        justify-content: flex-end;
    }

    .admin-form-two-col,
    .admin-dashboard-grid,
    .admin-editor-meta {
        grid-template-columns: 1fr;
    }
}


.page-leaderboard-scroll-lock {
    overflow: hidden;
}

.page-leaderboard-scroll-lock main {
    height: calc(100vh - 73px);
    overflow: hidden;
}

.leaderboard-page-head {
    margin-bottom: 18px;
}

.leaderboard-page-subtitle {
    margin: 8px 0 0;
}

.leaderboard-compact-section {
    padding: 20px 0 24px;
    height: calc(100vh - 73px);
    overflow: hidden;
}

.leaderboard-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.leaderboard-shell-scrollable {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.leaderboard-toolbar-polished {
    flex: 0 0 auto;
}

.leaderboard-status-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.leaderboard-status-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid rgba(121, 146, 255, 0.22);
    background: rgba(6, 12, 29, 0.92);
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
    user-select: none;
}

.leaderboard-status-toggle:hover {
    border-color: rgba(121, 146, 255, 0.45);
    color: var(--text);
}

.leaderboard-status-toggle.is-active {
    border-color: rgba(139, 174, 255, 0.58);
    background: linear-gradient(180deg, rgba(48, 77, 176, 0.6), rgba(30, 49, 112, 0.85));
    color: #eef4ff;
    box-shadow: 0 10px 24px rgba(51, 92, 223, 0.22);
}

.leaderboard-status-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.leaderboard-state-card {
    margin: 20px 28px 28px;
}

.leaderboard-table-wrap-vertical {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.leaderboard-table-polished thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    background: linear-gradient(180deg, rgba(17, 25, 53, 0.98) 0%, rgba(12, 19, 40, 0.98) 100%);
}

@media (max-width: 980px) {
    .page-leaderboard-scroll-lock {
        overflow: auto;
    }

    .page-leaderboard-scroll-lock main,
    .leaderboard-compact-section,
    .leaderboard-container {
        height: auto;
        overflow: visible;
    }

    .leaderboard-shell-scrollable,
    .leaderboard-table-wrap-vertical {
        min-height: auto;
    }

    .leaderboard-filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .leaderboard-status-group {
        width: 100%;
    }

    .leaderboard-status-toggle {
        flex: 1 1 auto;
    }
}


.game-reports-section {
    padding: 20px 0 24px;
    height: calc(100vh - 73px);
    overflow: hidden;
}

.game-reports-container {
    width: min(1820px, calc(100% - 20px));
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.game-reports-page-head {
    margin-bottom: 18px;
    flex: 0 0 auto;
}

.game-reports-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.game-reports-table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    overscroll-behavior: contain;
}

.game-reports-table {
    min-width: 1380px;
}

.game-reports-table .col-comment {
    width: 320px;
}

.game-reports-table .value-comment {
    white-space: normal;
    line-height: 1.4;
}

.table-footer-pagination {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 24px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: linear-gradient(180deg, rgba(14, 20, 41, 0.96) 0%, rgba(10, 15, 31, 0.98) 100%);
}

.pagination-link,
.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

.pagination-link {
    border: 1px solid rgba(121, 146, 255, 0.22);
    background: rgba(6, 12, 29, 0.92);
    color: var(--muted);
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.pagination-link:hover {
    transform: translateY(-1px);
    border-color: rgba(121, 146, 255, 0.45);
    color: var(--text);
    box-shadow: 0 8px 22px rgba(51, 92, 223, 0.18);
}

.pagination-link.is-active {
    border-color: rgba(139, 174, 255, 0.58);
    background: linear-gradient(180deg, rgba(48, 77, 176, 0.6), rgba(30, 49, 112, 0.85));
    color: #eef4ff;
    box-shadow: 0 10px 24px rgba(51, 92, 223, 0.22);
    pointer-events: none;
}

.pagination-ellipsis {
    min-width: 24px;
    padding: 0 4px;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: none;
}

@media (max-width: 980px) {
    .game-reports-section,
    .game-reports-container,
    .game-reports-shell,
    .game-reports-table-wrap {
        height: auto;
        min-height: auto;
        overflow: visible;
    }

    .game-reports-container {
        width: min(100%, calc(100% - 20px));
    }

    .table-footer-pagination {
        gap: 8px;
        padding: 16px;
    }

    .pagination-link,
    .pagination-ellipsis {
        min-width: 38px;
        height: 38px;
        padding: 0 12px;
        font-size: 13px;
    }
}
.brand-block {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
    min-width: 0;
}

.brand-logo {
    width: 96px;
    height: 64px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.brand-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--text);
}

.brand-version {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--accent-soft);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.brand-note {
    font-size: 11px;
    line-height: 1.2;
    color: var(--muted);
}
.home-hero-grid {
    align-items: start;
}

.home-main-actions {
    gap: 16px;
}

.home-highlight-card {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.home-quick-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.home-wide-button {
    width: 100%;
}

.home-cards-grid {
    grid-template-columns: repeat(4, 1fr);
}

.home-two-col {
    align-items: stretch;
}

.home-link-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.home-muted-line {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.home-note-panel {
    max-width: 920px;
}

@media (max-width: 980px) {
    .home-cards-grid {
        grid-template-columns: 1fr;
    }
}