:root {
    color-scheme: light;
    --bg: #fff;
    --panel: #ffffff;
    --text: #000;
    --muted: #5f5f5f;
    --line: #e5e1d8;
    --soft: #F5F3ED;
    --accent: #c7161c;
    --accent-2: #000;
    --danger: #b42318;
    --locked: #7a4b00;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 25px;
}

button,
input {
    font: inherit;
}

.shell {
    width: min(100%, 1180px);
    margin: 0 auto;
    padding: 8px;
}

.topbar,
.panel,
.match {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    font-family: Poppins, "Adjusted Georgia Fallback", Georgia, serif;
}

p {
    margin: 0;
    font-family: Roboto, Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 25px;
}

h1 {
    font-size: 22px;
    line-height: 1.2;
}

h2 {
    font-size: 16px;
    margin-bottom: 12px;
}

h3 {
    font-size: 14px;
}

.muted {
    color: var(--muted);
    margin-top: 4px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo {
    width: 54px;
    height: auto;
    flex: 0 0 auto;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 10px;
    padding: 7px 10px;
    background: var(--soft);
    color: var(--accent);
    white-space: nowrap;
    font-size: 12px;
    font-weight: 700;
}

.badge.pending {
    background: var(--soft);
    color: var(--locked);
}

.mobile-tabs {
    display: flex;
    gap: 0;
    margin-top: 14px;
    border-bottom: 2px solid var(--line);
}

.mobile-tabs .mobile-tab {
    flex: 1;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    border: none;
    background: none;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.mobile-tabs .mobile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.mobile-tabs .mobile-tab[data-mobile-tab="ranking"] {
    display: block;
}

.mobile-tab-content {
    display: none;
}

.mobile-tab-content.active {
    display: block;
}

.my-points-summary {
    margin-top: 14px;
}

.my-points-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.my-points-main {
    flex: 1;
    min-width: 0;
}

.my-points-aside {
    flex-shrink: 0;
}

.my-points-aside .scoring-rules {
    margin-top: 0;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

@media (min-width: 901px) {
    .my-points-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .my-points-aside {
        width: 260px;
        position: sticky;
        top: 16px;
    }

    .my-points-aside .scoring-rules {
        border-top: none;
        border-left: 1px solid var(--line);
        padding-top: 0;
        padding-left: 20px;
    }
}

.my-points-phase {
    margin-bottom: 18px;
}

.my-points-phase h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line);
}

.my-points-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.my-points-match:last-child {
    border-bottom: none;
}

.my-points-match-teams {
    flex: 1;
    min-width: 0;
}

.my-points-match-score {
    font-weight: 600;
    margin: 0 10px;
    white-space: nowrap;
}

.my-points-match-detail {
    text-align: right;
    white-space: nowrap;
    font-size: 12px;
    color: var(--muted);
}

.my-points-match-detail strong {
    color: var(--accent);
    font-size: 13px;
}

.my-points-total {
    margin-top: 16px;
    padding: 12px;
    background: var(--card);
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
    font-weight: 700;
}

.my-points-total span {
    color: var(--accent);
    font-size: 20px;
}

.layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 14px;
}

.panel {
    padding: 16px;
    min-width: 0;
    overflow: hidden;
}

.auth-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
}

label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 12px;
}

input,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    background: #fff;
    color: var(--text);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    padding-right: 35px;
}

select:hover {
    border-color: var(--accent);
}

select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(199, 22, 28, 0.1);
}

input[type="number"] {
    text-align: center;
    padding-inline: 4px;
}

button {
    border: 0;
    border-radius: 6px;
    padding: 10px 12px;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    filter: brightness(.95);
}

button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin-bottom: 12px;
    padding-bottom: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) transparent;
}

.tabs::-webkit-scrollbar {
    height: 4px;
}

.tabs::-webkit-scrollbar-track {
    background: transparent;
}

.tabs::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 4px;
}

.tab {
    background: var(--soft);
    color: var(--text);
    white-space: nowrap;
}

.tab.active {
    background: var(--accent);
    color: #fff;
}

.phase-section[hidden] {
    display: none;
}

.matches {
    display: grid;
    gap: 10px;
}

.match {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    position: relative;
}

.match-header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.match-today {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 0.05em;
    background: rgba(199, 22, 28, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.phase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.phase-header h2 {
    margin-bottom: 0;
}

.btn-save-header {
    padding: 6px 12px;
    font-size: 13px;
}

.match-date-lock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.match-date-lock.locked {
    color: var(--locked);
    font-weight: 700;
}

.match-date-lock svg {
    width: 14px;
    height: 14px;
}

.match-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    line-height: 1.4;
    background-color: #6c757d;
    color: #fff;
}

.match-status.active {
    background-color: #ffc107;
    color: #212529;
}

.match-body {
    display: grid;
    grid-template-columns: minmax(120px, 1fr) 100px minmax(120px, 1fr);
    gap: 10px;
    align-items: center;
}

.team {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    font-weight: 700;
}

.team img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--soft);
    border: 1px solid var(--line);
    flex: 0 0 auto;
}

.team span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.score {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.score-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 6px;
}

.score-label.actual {
    background: #e8e8e8;
    color: var(--text);
}

.score-label.predicted {
    background: var(--accent);
    color: #fff;
}

.score-actual {
    display: grid;
    grid-template-columns: 38px 12px 38px;
    gap: 2px;
    align-items: center;
}

.score-actual span {
    text-align: center;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.score-actual-sep {
    text-align: center;
    color: var(--muted);
}

.score-predicted {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.score-predicted-item {
    display: flex;
    align-items: center;
    gap: 2px;
}

.score-btn {
    width: 35px;
    height: 30px;
    padding: 0;
    border: 1px solid var(--accent);
    border-radius: 4px;
    background: #fff;
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-btn:hover {
    background: var(--accent);
    color: #fff;
}

.score-btn:disabled {
    display: none;
}

.score-predicted input {
    width: 30px;
    height: 30px;
    padding: 0;
    text-align: center !important;
    line-height: 35px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--accent);
    border-radius: 20%;
    background: var(--accent);
    color: #fff;
}

.score-predicted input:disabled {
    opacity: 0.55;
}

.score-predicted input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(199, 22, 28, 0.2);
}

.match-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--line);
    padding-top: 8px;
    margin-top: 4px;
    gap: 6px;
}

.match-footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-points {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.match-points-detail {
    font-size: 11px;
    font-weight: 400;
    opacity: 0.75;
}

.match-points-info {
    display: flex;
    align-items: center;
    width: 20px;
    height: 20px;
    cursor: help;
}

.match-points-info svg {
    width: 100%;
    height: 100%;
}

.btn-save-match {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-save-match:hover:not(:disabled) {
    opacity: 0.85;
}

.btn-save-match:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.match-notification {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    transition: opacity 0.3s;
}

.match-notification.ok {
    background: #d4edda;
    color: #155724;
}

.match-notification.error {
    background: #f8d7da;
    color: #721c24;
}

.match-notification.fade-out {
    opacity: 0;
}

.actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.message {
    min-height: 18px;
    color: var(--muted);
    margin-top: 10px;
}

.message.error {
    color: var(--danger);
}

.message.ok {
    color: var(--accent);
}

.ranking-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.ranking-preview-header h2 {
    margin-bottom: 0;
}

.btn-ranking-details {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-ranking-details:hover {
    background: var(--accent);
    color: #fff;
}

.ranking {
    display: grid;
    gap: 8px;
}

.rank {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 58px;
    gap: 8px;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.rank:last-child {
    border-bottom: 0;
}

.rank.current-player {
    background: var(--accent, #2563eb);
    color: #fff;
    border-radius: 6px;
    padding: 9px 8px;
    margin: 4px -8px;
    border-bottom-color: transparent;
}

.rank.current-player .points {
    color: #fff;
}

.my-position-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--accent, #2563eb);
    color: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.my-position-label {
    flex: 1;
    font-size: 0.9rem;
}

.my-position-value {
    font-size: 1.4rem;
    font-weight: 800;
}

.my-position-points {
    font-size: 0.9rem;
    opacity: 0.85;
}

/* Position badges for phase ranking */
.position-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-align: center;
    min-width: 32px;
}

.position-top5 {
    background: #dc2626;
    color: #fff;
}

.position-top10 {
    background: #f59e0b;
    color: #fff;
}

.position-other {
    background: #9ca3af;
    color: #fff;
}

.rank strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.points {
    text-align: right;
    font-weight: 700;
}

.auth-methods {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.auth-method-btn {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-method-btn.active {
    border-color: var(--accent);
    background: var(--soft);
    color: var(--accent);
}

.auth-method-btn:hover:not(.active) {
    border-color: var(--accent);
}

.auth-section {
    display: none;
}

.auth-section.active {
    display: block;
}

.login-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.login-message {
    text-align: center;
    color: var(--muted);
    margin-bottom: 8px;
}

.login-buttons {
    display: flex;
    gap: 12px;
    width: 100%;
}

.login-buttons button {
    flex: 1;
    padding: 12px 16px;
}

.login-buttons button:first-child {
    background: var(--accent);
}

.login-buttons button:last-child {
    background: var(--muted);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    background: #fff;
    color: #3c4043;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn:hover {
    background: #f8f9fa;
    border-color: #d2d3d4;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.google-btn svg {
    width: 20px;
    height: 20px;
}

.unified-auth {
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 12px;
    border-radius: 12px;
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.google-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dadce0;
    border-radius: 6px;
    background: #fff;
    color: #3c4043;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.google-btn-large:hover {
    background: #f8f9fa;
    border-color: #d2d3d4;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.3);
}

.google-btn-large svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.google-btn-large div {
    flex: 1;
    text-align: left;
}

.email-auth-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.email-auth-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.email-auth-form input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    font-size: 14px;
}

.email-auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(199, 22, 28, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 12px 16px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 6px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }

    .auth-form {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .topbar #auth-status {
        align-self: flex-end;
        order: -2;
    }

    .topbar .brand {
        order: -1;
    }

    .topbar .sponsor-topbar-link,
    .topbar .sponsor-topbar-container {
        order: 0;
        align-self: center;
    }

    .brand {
        align-items: flex-start;
    }

    .brand-logo {
        width: 44px;
    }

    .match-body {
        grid-template-columns: 1fr 80px 1fr;
        gap: 6px;
    }

    .team {
        flex-direction: column;
        text-align: center;
    }

    .mobile-tabs .mobile-tab[data-mobile-tab="ranking"] {
        display: block;
    }

    .layout > aside.panel {
        display: none;
    }
}

.scoring-rules {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.scoring-rules h3 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 0 0 12px;
}

.scoring-rules ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.scoring-rules li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text);
}

.scoring-rules li em {
    color: var(--muted);
    font-style: normal;
}

.rule-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    background: var(--accent);
    color: #fff;
    padding: 0 6px;
}

.rule-badge.bonus {
    background: #1a7f3c;
}

.rule-badge.max {
    background: var(--accent-2);
    color: #fff;
}

/* Qualified team prediction */
.match-qualified {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px dashed var(--line);
    margin-top: 4px;
    flex-wrap: wrap;
}

.qualified-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.qualified-options {
    display: flex;
    gap: 8px;
    flex: 1;
}

.qualified-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: 2px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    flex: 1;
    justify-content: center;
}

.qualified-option:hover {
    border-color: var(--accent);
}

.qualified-option.selected,
.qualified-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(199, 22, 28, 0.08);
    color: var(--accent);
}

.qualified-option input[type="radio"] {
    width: auto;
    margin: 0;
    accent-color: var(--accent);
}

.qualified-option input[type="radio"]:disabled {
    cursor: not-allowed;
}

.qualified-option:has(input:disabled) {
    opacity: 0.55;
    cursor: not-allowed;
}

.qualified-points-earned {
    font-size: 12px;
    font-weight: 700;
    color: #1a7f3c;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .match-qualified {
        flex-direction: column;
        align-items: flex-start;
    }

    .qualified-options {
        width: 100%;
    }
}

/* Ranking Table */
.ranking-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ranking-table th,
.ranking-table td {
    padding: 8px 10px;
    text-align: center;
    border-bottom: 1px solid var(--line);
}

.ranking-table th {
    background: var(--soft);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    white-space: nowrap;
    position: sticky;
    top: 0;
}

.ranking-table th.col-pos {
    width: 36px;
}

.ranking-table th.col-name {
    text-align: left;
}

.ranking-table td.col-name {
    text-align: left;
    font-weight: 600;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-table td.col-pos {
    font-weight: 700;
    color: var(--muted);
}

.ranking-table td.col-total {
    font-weight: 700;
    color: var(--accent);
    font-size: 14px;
}

.ranking-table td.col-phase {
    color: var(--text);
    font-weight: 500;
}

.ranking-table tr.current-player-row {
    background: var(--accent);
    color: #fff;
}

.ranking-table tr.current-player-row td {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.ranking-table tr.current-player-row td.col-total {
    color: #fff;
}

.ranking-table tr.top-3 td.col-pos {
    color: var(--accent);
    font-size: 15px;
}

.ranking-table tbody tr:hover:not(.current-player-row) {
    background: var(--soft);
}

.ranking-country {
    display: inline-block;
    font-size: 11px;
    color: var(--muted);
    margin-left: 4px;
}

.ranking-empty {
    text-align: center;
    padding: 24px 16px;
    color: var(--muted);
}

@media (max-width: 900px) {
    .ranking-table {
        font-size: 12px;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 6px 5px;
    }

    .ranking-table td.col-name {
        max-width: 100px;
    }

    .ranking-country {
        display: none;
    }
}

/* Ranking Phase Navigator */
.ranking-phase-nav {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    gap: 8px;
    padding: 8px 0;
}

.ranking-phase-nav::-webkit-scrollbar {
    display: none;
}

.ranking-phase-nav .tab {
    background: var(--soft);
    color: var(--text);
    white-space: nowrap;
}

.ranking-phase-nav .tab.active {
    background: var(--accent);
    color: #fff;
}

/* Star icon for first place */
.star-icon {
    color: #FFD700;
    font-size: 14px;
    margin-right: 4px;
    display: inline-block;
}

/* Current player row highlight (rank layout) */
.rank.current-player-row {
    background: var(--accent);
    color: #fff;
    border-radius: 6px;
    padding: 9px 8px;
    margin: 4px -8px;
    border-bottom-color: transparent;
}

.rank.current-player-row .points {
    color: #fff;
}

/* Extra row for player outside top N */
.ranking-player-extra-row {
    border-top: 2px dashed var(--line);
    margin-top: 8px;
    padding-top: 8px;
}

.ranking-table tr.ranking-player-extra-row td {
    border-top: 2px dashed var(--line);
}

/* My Points Summary Table */
.my-points-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 16px;
}

.my-points-summary-table th,
.my-points-summary-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.my-points-summary-table th {
    background: var(--soft);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
    white-space: nowrap;
}

.my-points-summary-table td {
    color: var(--text);
}

.my-points-summary-table td:nth-child(2) {
    font-weight: 700;
    text-align: center;
}

.my-points-summary-table td:nth-child(3) {
    text-align: right;
    color: var(--muted);
    font-size: 12px;
}

.my-points-summary-table tr:last-child {
    font-weight: 700;
    border-top: 2px solid var(--line);
}

.my-points-summary-table tr:last-child td {
    border-bottom: none;
    color: var(--accent);
}

/* Donut Chart */
.donut-chart {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
}

.donut-chart-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

/* Donut Legend */
.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text);
}

.donut-legend-item .legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.donut-legend-item .legend-phase {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.donut-legend-item .legend-percentage {
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}
