:root {
    --worldcup-bg: #f5f1e8;
    --worldcup-surface: rgba(255, 255, 255, 0.88);
    --worldcup-surface-strong: #ffffff;
    --worldcup-border: rgba(20, 24, 38, 0.12);
    --worldcup-text: #101728;
    --worldcup-muted: #5a6578;
    --worldcup-accent: #b91c1c;
    --worldcup-accent-soft: #fee2e2;
    --worldcup-success: #0f766e;
    --worldcup-success-soft: #ccfbf1;
    --worldcup-warning: #92400e;
    --worldcup-warning-soft: #fef3c7;
    --worldcup-shadow: 0 18px 40px rgba(16, 23, 40, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Noto Sans KR", sans-serif;
    color: var(--worldcup-text);
    background:
            radial-gradient(circle at top left, rgba(185, 28, 28, 0.12), transparent 28%),
            linear-gradient(180deg, #fcfaf6 0%, var(--worldcup-bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.worldcup-page {
    padding: 24px 16px 48px;
}

.worldcup-hero,
.worldcup-section {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.worldcup-hero {
    position: relative;
    overflow: hidden;
    padding: 32px 24px;
    border-radius: 28px;
    background: linear-gradient(135deg, #7f1d1d 0%, #111827 100%);
    color: #fffaf5;
    box-shadow: var(--worldcup-shadow);
}

.worldcup-hero::after {
    content: "";
    position: absolute;
    inset: auto -64px -100px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(12px);
}

.worldcup-hero__eyebrow {
    font-family: "Oswald", sans-serif;
    letter-spacing: 0.16em;
    font-size: 0.82rem;
    opacity: 0.82;
}

.worldcup-hero__title {
    margin: 12px 0 10px;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.08;
}

.worldcup-hero__description {
    max-width: 760px;
    margin: 0;
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 250, 245, 0.88);
}

.worldcup-hero__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.worldcup-stat-card {
    position: relative;
    z-index: 1;
    padding: 18px 18px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.worldcup-stat-card__label {
    display: block;
    font-size: 0.84rem;
    color: rgba(255, 250, 245, 0.76);
}

.worldcup-stat-card__value {
    display: block;
    margin-top: 8px;
    font-size: 1.15rem;
}

.worldcup-selected-team {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.worldcup-selected-team img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.38);
}

.worldcup-selected-team .worldcup-stat-card__value {
    margin-top: 0;
}

.worldcup-section {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid var(--worldcup-border);
    border-radius: 24px;
    background: var(--worldcup-surface);
    backdrop-filter: blur(8px);
    box-shadow: var(--worldcup-shadow);
}

.worldcup-section__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.worldcup-section__header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.worldcup-section__header p {
    margin: 0;
    color: var(--worldcup-muted);
    line-height: 1.7;
}

.worldcup-team-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.worldcup-team-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 108px;
    padding: 14px 14px 12px;
    border: 1px solid var(--worldcup-border);
    border-radius: 16px;
    background: var(--worldcup-surface-strong);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.worldcup-team-tab:hover {
    transform: translateY(-2px);
    border-color: rgba(185, 28, 28, 0.36);
    box-shadow: 0 10px 24px rgba(16, 23, 40, 0.08);
}

.worldcup-team-tab.is-selected {
    border-color: rgba(185, 28, 28, 0.5);
    background: linear-gradient(180deg, #fff7f4 0%, #ffffff 100%);
}

.worldcup-team-tab__flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    background: #f8fafc;
    border: 1px solid rgba(16, 23, 40, 0.08);
    overflow: hidden;
}

.worldcup-team-tab__flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.worldcup-team-tab__text {
    min-width: 0;
}

.worldcup-team-tab__code {
    display: block;
    font-family: "Oswald", sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    color: var(--worldcup-accent);
}

.worldcup-team-tab__name {
    display: block;
    margin-top: 6px;
    font-weight: 700;
    word-break: keep-all;
}

.worldcup-empty-state {
    padding: 24px;
    border-radius: 18px;
    border: 1px dashed rgba(16, 23, 40, 0.18);
    background: rgba(255, 255, 255, 0.72);
}

.worldcup-empty-state strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1rem;
}

.worldcup-empty-state p {
    margin: 0;
    color: var(--worldcup-muted);
    line-height: 1.7;
}

.worldcup-squad-groups {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.worldcup-position-group {
    padding: 18px;
    border: 1px solid var(--worldcup-border);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.75);
}

.worldcup-position-group__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.worldcup-position-group__header h3 {
    margin: 0;
    font-size: 1.12rem;
}

.worldcup-position-group__header span {
    color: var(--worldcup-muted);
    font-size: 0.9rem;
}

.worldcup-player-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.worldcup-player-card {
    overflow: hidden;
    padding: 0 16px 16px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid rgba(16, 23, 40, 0.08);
}

.worldcup-player-card__photo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 190px;
    margin: 0 -16px 14px;
    background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
}

.worldcup-player-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.worldcup-player-card__photo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--worldcup-accent-soft);
    color: var(--worldcup-accent);
    font-size: 1.8rem;
    font-weight: 800;
}

.worldcup-player-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.worldcup-player-card__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--worldcup-accent-soft);
    color: var(--worldcup-accent);
    font-family: "Oswald", sans-serif;
    font-size: 1.05rem;
}

.worldcup-player-card__position {
    color: var(--worldcup-muted);
    font-size: 0.88rem;
}

.worldcup-player-card__name {
    display: block;
    margin-top: 14px;
    font-size: 1.05rem;
}

.worldcup-player-card__details {
    margin: 14px 0 0;
}

.worldcup-player-card__details div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid rgba(16, 23, 40, 0.06);
}

.worldcup-player-card__details dt,
.worldcup-player-card__details dd {
    margin: 0;
    font-size: 0.92rem;
}

.worldcup-player-card__details dt {
    color: var(--worldcup-muted);
}

.worldcup-player-card__details dd {
    text-align: right;
    word-break: keep-all;
}

.worldcup-note-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.worldcup-note-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid rgba(16, 23, 40, 0.1);
    font-size: 0.9rem;
}

.worldcup-performance-table-wrap {
    overflow-x: auto;
}

.worldcup-performance-table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
}

.worldcup-performance-table th,
.worldcup-performance-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(16, 23, 40, 0.08);
    text-align: center;
}

.worldcup-performance-table thead th {
    font-size: 0.92rem;
    color: var(--worldcup-muted);
    background: rgba(255, 255, 255, 0.72);
    position: sticky;
    top: 0;
}

.worldcup-performance-table tbody th {
    text-align: left;
    font-size: 0.95rem;
    white-space: nowrap;
}

.worldcup-performance-table tr.is-selected {
    background: rgba(185, 28, 28, 0.05);
}

.worldcup-result-badge {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-width: 58px;
    padding: 8px 10px;
    border-radius: 999px;
    background: rgba(16, 23, 40, 0.06);
    color: var(--worldcup-text);
    font-size: 0.88rem;
    font-weight: 700;
}

.worldcup-result-badge.is-champion {
    background: linear-gradient(135deg, #fde68a 0%, #f59e0b 100%);
    color: #5b2d00;
}

.worldcup-result-badge.is-runner-up {
    background: linear-gradient(135deg, #e5e7eb 0%, #cbd5e1 100%);
    color: #1f2937;
}

.worldcup-result-badge.is-top-four {
    background: var(--worldcup-accent-soft);
    color: var(--worldcup-accent);
}

.worldcup-result-badge.is-knockout {
    background: var(--worldcup-success-soft);
    color: var(--worldcup-success);
}

.worldcup-result-badge.is-group {
    background: var(--worldcup-warning-soft);
    color: var(--worldcup-warning);
}

.worldcup-result-badge.is-empty {
    background: rgba(16, 23, 40, 0.05);
    color: var(--worldcup-muted);
}

@media (max-width: 960px) {
    .worldcup-hero__summary,
    .worldcup-player-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 720px) {
    .worldcup-page {
        padding: 14px 12px 36px;
    }

    .worldcup-hero,
    .worldcup-section {
        padding: 20px 16px;
        border-radius: 20px;
    }

    .worldcup-hero__summary,
    .worldcup-player-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .worldcup-team-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .worldcup-player-card__photo {
        height: 220px;
    }

}
