:root {
    --bg: #070707;
    --glass: rgba(255, 255, 255, 0.08);
    --glass-strong: rgba(255, 255, 255, 0.15);
    --text: #ffffff;
    --muted: #c5c5c5;
    --accent: #3ea6ff;
    --danger: #ff6e6e;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    color: var(--text);
    background-color: #000000;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        url('../../img/fondo.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: 72px;
    display: flex;
    flex-direction: column;
}

body.auth-page {
    padding-top: 0;
}

h1, h2, h3, .brand {
    font-family: 'Oswald', sans-serif;
    letter-spacing: 0.4px;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 1.2em;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings:
        'FILL' 0,
        'wght' 600,
        'GRAD' 0,
        'opsz' 24;
}

.topbar {
    margin: 0;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 20;
    border-radius: 0;
}

.brand {
    text-decoration: none;
    color: var(--text);
    font-size: 1.4rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    font-size: 2rem;
    color: var(--text);
}

.burger {
    background: transparent;
    border: 1px solid var(--glass-strong);
    border-radius: 10px;
    color: var(--text);
    font-size: 1.1rem;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.side-menu {
    position: fixed;
    top: 66px;
    right: 16px;
    width: 250px;
    padding: 12px;
    display: none;
    flex-direction: column;
    gap: 8px;
    z-index: 11;
}

.side-menu.open {
    display: flex;
}

.side-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid transparent;
}

.menu-icon {
    font-size: 1.15rem;
}

.side-menu a:hover {
    border-color: var(--glass-strong);
}

.container {
    max-width: 980px;
    margin: 12px auto 30px;
    padding: 0 12px;
    display: grid;
    gap: 14px;
    width: 100%;
    flex: 1 0 auto;
}

.site-footer {
    padding: 16px 12px 22px;
    text-align: center;
    color: var(--muted);
    flex-shrink: 0;
    margin-top: auto;
}

.site-footer small {
    font-size: 0.75rem;
}

.site-footer a {
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.dashboard-layout {
    display: grid;
    gap: 14px;
}

.right-panels {
    display: grid;
    gap: 14px;
    align-content: start;
}

.glass {
    background: var(--glass);
    backdrop-filter: blur(11px);
    -webkit-backdrop-filter: blur(11px);
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
}

.topbar.glass {
    border-radius: 0;
}

.card {
    padding: 16px;
}

.card-title {
    font-size: 1.6rem;
    margin: 0 0 8px;
}

.muted {
    color: var(--muted);
}

.form-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.two-cols {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.9rem;
}

input, select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: var(--text);
    padding: 10px;
}

.btn {
    display: inline-block;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--glass-strong);
    color: var(--text);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--accent);
    border-color: transparent;
    color: #08121d;
    font-weight: 700;
}

.full {
    grid-column: 1 / -1;
}

.auth-card {
    align-self: start;
    width: min(100%, 560px);
    max-width: 560px;
    margin: 0 auto 24px;
    padding: 34px 28px;
}

.auth-emblem {
    display: flex;
    justify-content: center;
    margin: 44px auto 16px;
}

.auth-emblem .material-symbols-outlined {
    font-size: 4.4rem;
    color: var(--text);
    filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.4));
    font-variation-settings:
        'FILL' 0,
        'wght' 700,
        'GRAD' 0,
        'opsz' 48;
}

.auth-card h1 {
    margin: 0 0 34px;
}

.auth-card .form-grid {
    gap: 18px;
    margin-top: 0;
}

.auth-card label {
    gap: 10px;
}

.auth-card input {
    padding: 14px;
}

.auth-card .btn-primary {
    margin-top: 2px;
    padding: 14px 16px;
    background: rgba(24, 86, 55, 0.86);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.08);
}

.auth-links {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.vote-form {
    max-width: 620px;
    margin: 18px auto 0;
    justify-items: center;
}

.vote-form label {
    width: min(100%, 240px);
    text-align: center;
    font-weight: 700;
}

.vote-form input {
    text-align: center;
}

.vote-form .btn-vote {
    justify-self: center;
    min-width: 180px;
}

.match-list, .ranking-list {
    display: grid;
    gap: 16px;
    margin-top: 14px;
}

.match-item, .ranking-item {
    border: none;
    border-radius: 12px;
    padding: 20px 18px;
    background: rgba(0, 0, 0, 0.25);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

.teams {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    justify-content: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.15rem;
    margin: 12px 0 14px;
    padding: 16px 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    line-height: 1.3;
}

.vs {
    color: var(--muted);
    font-weight: 500;
    align-self: center;
}

.meta {
    font-size: 0.88rem;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.45;
}

.vote-link {
    margin-top: 16px;
    display: flex;
    justify-content: center;
}

.btn-vote {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 10px 18px;
}

.btn-icon {
    font-size: 1.25rem;
}

.ranking-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ranking-icon {
    font-size: 1.15rem;
    color: var(--text);
}

.ranking-full-link {
    justify-self: center;
    margin-top: 2px;
}

.ranking-page {
    max-width: 720px;
    margin: 0 auto;
    width: 100%;
}

.content-page {
    max-width: 820px;
    margin: 0 auto;
    width: 100%;
}

.legal-content {
    display: grid;
    gap: 12px;
    color: var(--muted);
    line-height: 1.65;
}

.legal-content p {
    margin: 0;
}

.chip {
    display: inline-block;
    font-size: 0.8rem;
    border-radius: 999px;
    padding: 6px 14px;
    background: rgba(62, 166, 255, 0.2);
    margin-bottom: 4px;
}

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

.match-item {
    text-align: center;
}

.team-label {
    display: flex;
    min-width: 0;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.team-name {
    max-width: 100%;
    font-size: clamp(0.9rem, 1.5vw, 1.2rem);
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-align: center;
}

.flag-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18) inset;
    flex-shrink: 0;
}

.flag-ARG {
    background: linear-gradient(to bottom, #7fc8ff 0 33%, #ffffff 33% 66%, #7fc8ff 66% 100%);
}

.flag-AUS {
    background: linear-gradient(135deg, #012169 0 70%, #ffffff 70% 78%, #e4002b 78% 100%);
}

.flag-BIH {
    background: linear-gradient(135deg, #002f6c 0 70%, #fcd116 70% 100%);
}

.flag-MEX {
    background: linear-gradient(to right, #006847 0 33%, #ffffff 33% 66%, #ce1126 66% 100%);
}

.flag-BRA {
    background: linear-gradient(135deg, #009b3a, #006f2b);
}

.flag-CAN {
    background: linear-gradient(to right, #d52b1e 0 28%, #ffffff 28% 72%, #d52b1e 72% 100%);
}

.flag-CHE {
    background: linear-gradient(#d52b1e, #d52b1e);
}

.flag-CIV {
    background: linear-gradient(to right, #f77f00 0 33%, #ffffff 33% 66%, #009e60 66% 100%);
}

.flag-CUW {
    background: linear-gradient(to bottom, #002b7f 0 72%, #f9e814 72% 82%, #002b7f 82% 100%);
}

.flag-CZE {
    background: linear-gradient(135deg, #11457e 0 45%, #ffffff 45% 70%, #d7141a 70% 100%);
}

.flag-DEU {
    background: linear-gradient(to bottom, #000000 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
}

.flag-ECU {
    background: linear-gradient(to bottom, #ffdd00 0 50%, #034ea2 50% 75%, #ed1c24 75% 100%);
}

.flag-ESP {
    background: linear-gradient(to bottom, #aa151b 0 25%, #f1bf00 25% 75%, #aa151b 75% 100%);
}

.flag-FRA {
    background: linear-gradient(to right, #0055a4 0 33%, #ffffff 33% 66%, #ef4135 66% 100%);
}

.flag-HTI {
    background: linear-gradient(to bottom, #00209f 0 50%, #d21034 50% 100%);
}

.flag-JPN {
    background: radial-gradient(circle at center, #bc002d 0 28%, #ffffff 29% 100%);
}

.flag-KOR {
    background: radial-gradient(circle at center, #c60c30 0 28%, #ffffff 29% 100%);
}

.flag-MAR {
    background: linear-gradient(#c1272d, #c1272d);
}

.flag-NLD {
    background: linear-gradient(to bottom, #ae1c28 0 33%, #ffffff 33% 66%, #21468b 66% 100%);
}

.flag-PRY {
    background: linear-gradient(to bottom, #d52b1e 0 33%, #ffffff 33% 66%, #0038a8 66% 100%);
}

.flag-QAT {
    background: linear-gradient(to right, #ffffff 0 28%, #8a1538 28% 100%);
}

.flag-SCO {
    background: linear-gradient(135deg, #ffffff 0 12%, #0065bd 12% 42%, #ffffff 42% 58%, #0065bd 58% 88%, #ffffff 88% 100%);
}

.flag-SWE {
    background: linear-gradient(to right, #006aa7 0 32%, #fecc00 32% 44%, #006aa7 44% 100%);
}

.flag-TUN {
    background: radial-gradient(circle at center, #ffffff 0 28%, #e70013 29% 100%);
}

.flag-TUR {
    background: linear-gradient(#e30a17, #e30a17);
}

.flag-URU {
    background: repeating-linear-gradient(to bottom, #ffffff 0 2px, #78b4ff 2px 4px);
}

.flag-USA {
    background: repeating-linear-gradient(to bottom, #b22234 0 2px, #ffffff 2px 4px);
}

.flag-ZAF {
    background: linear-gradient(135deg, #007a4d 0 35%, #ffb612 35% 45%, #ffffff 45% 55%, #de3831 55% 100%);
}

.flag-generic {
    background: linear-gradient(135deg, rgba(62, 166, 255, 0.35), rgba(255, 255, 255, 0.18));
}

@media (min-width: 960px) {
    .container {
        max-width: 1240px;
    }

    .dashboard-layout {
        grid-template-columns: minmax(0, 1.8fr) minmax(300px, 1fr);
        align-items: start;
    }

    .fixture-panel .match-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
