:root {
    --primary: #00f2fe;
    --secondary: #4facfe;
    --accent: #f093fb;
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --success: #22c55e;
    --gold: #fbbf24;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
}

.background-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(circle at 20% 30%, rgba(79, 172, 254, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(240, 147, 251, 0.15) 0%, transparent 40%);
    z-index: -1;
}

.watermark {
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    height: 80vh;
    background-image: url('https://i.imgur.com/your-logo-path.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

header {
    padding: 1.5rem 5%;
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    text-decoration: none;
    color: var(--text-main);
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo span {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-br span {
    background: linear-gradient(to right, #22c55e, #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

.prize-badge {
    font-size: 0.85rem;
    margin-left: 0.8rem;
    color: var(--gold);
    border: 1px solid var(--gold);
    padding: 3px 12px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    display: inline-block;
    background: rgba(251, 191, 36, 0.05);
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
    animation: glow-gold 2s infinite alternate;
}

.prize-badge.in-menu {
    display: block;
    margin: 1rem 1.5rem;
    text-align: center;
}

@keyframes glow-gold {
    from {
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
        border-color: rgba(251, 191, 36, 0.5);
    }
    to {
        box-shadow: 0 0 15px rgba(251, 191, 36, 0.6);
        border-color: var(--gold);
    }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: 0.3s;
    font-size: 1rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
    text-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
}

button {
    padding: 0.6rem 1.5rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-primary {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    color: #000;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.4);
}

.btn-secondary {
    background: var(--glass);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

#hero {
    text-align: center;
    padding: 4rem 0;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

#hero h1 span {
    display: block;
    background: linear-gradient(to right, #fff, var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

#hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 3rem;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#content-area {
    margin-top: 0.5rem;
    min-height: 400px;
}

/* Loader */
.loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Group Cards */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.group-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    transition: 0.3s;
}

.group-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.group-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
    color: var(--secondary);
}

.team-row {
    display: grid;
    grid-template-columns: 50px 1fr 60px;
    /* Largura fixa para Pos e Pts, flexível para o Nome */
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.team-row.header {
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
}

.team-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Match Cards */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.match-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 2rem;
}

.bet-section {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.bet-title {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.4rem;
    text-align: center;
}

.bet-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.bet-inputs input {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: white;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.user-bet-display {
    text-align: center;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.user-bet-display strong {
    color: var(--primary);
    font-size: 0.95rem;
    margin-left: 0.3rem;
}

.btn-save-mini {
    width: auto;
    padding: 0.3rem 1rem;
    font-size: 0.65rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    border-radius: 4px;
    cursor: pointer;
    transition: 0.3s;
    margin: 0 auto;
    display: block;
}

.match-info {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.group-tag {
    background: var(--glass);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--glass-border);
    color: var(--secondary);
    font-weight: 600;
}

.team-bet {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.team-bet.right {
    flex-direction: row-reverse;
}

.team-bet img {
    width: 40px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
}

.score-input {
    width: 60px;
    height: 50px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.score-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.vs {
    font-weight: 800;
    color: var(--text-muted);
}

.mini-score input {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
    -moz-appearance: textfield !important;
}

/* Remove setas de número para Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.mini-score input:focus {}

/* Phase Navigator (Topo) */
.phase-navigator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin: 0.5rem 0 1.5rem 0;
    width: 100%;
}

.phase-navigator.br-style {
    background: linear-gradient(to right, rgba(0, 242, 254, 0.05), transparent);
    border-left: 4px solid var(--primary);
}

.nav-arrow {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: 0.3s;
}

.nav-arrow:hover {
    background: var(--primary);
    color: #000;
}

.phase-display {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: #fff;
    min-width: 250px;
    text-align: center;
}

/* Round Switcher (Dentro do Grupo) */
.round-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.05);
    border-bottom: 1px solid var(--glass-border);
}

.round-switcher span {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.round-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0 5px;
    font-weight: 800;
    font-size: 1.2rem;
}

/* Bottom Dashboard (Ranking + Artilharia) */
.bottom-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 5rem;
    padding-top: 4rem;
    border-top: 1px solid var(--glass-border);
}

/* Layout Dashboard (Tabela + Jogos) */
.group-section {
    margin-bottom: 1.5rem;
}

.group-name {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
}

.group-layout {
    display: grid;
    grid-template-columns: 1fr 550px;
    gap: 1rem;
    align-items: stretch;
    width: 100%;
}

/* Tabelas Modernas */
.group-table-container {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 0.8rem;
    border: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    overflow-x: auto; /* Adicionado para evitar quebra no mobile */
}

.modern-table {
    width: 100%;
    height: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    padding: 0.5rem 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    border-bottom: 1px solid var(--glass-border);
}

.modern-table td {
    padding: 0.5rem 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    font-weight: 600;
}

.team-cell {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.flag-img {
    width: 28px;
    height: 20px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Standings Table — Classificação Completa */
.standings-table th {
    text-align: center;
    font-size: 0.7rem;
    padding: 0.5rem 0.3rem;
    letter-spacing: 0.5px;
}

.standings-table td {
    text-align: center;
    font-size: 0.95rem;
    padding: 0.45rem 0.3rem;
}

.standings-table .team-cell {
    text-align: left;
    gap: 0.5rem;
    min-width: 0;
}

.pos-cell {
    text-align: center;
}

.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 800;
    background: var(--glass);
    color: var(--text-muted);
    border: 1px solid var(--glass-border);
}

.pos-badge.pos-1 {
    background: linear-gradient(135deg, #22c55e22, #22c55e44);
    color: #22c55e;
    border-color: #22c55e;
}

.pos-badge.pos-2 {
    background: linear-gradient(135deg, #3b82f622, #3b82f644);
    color: #60a5fa;
    border-color: #3b82f6;
}

.pts-cell {
    color: var(--primary);
    font-size: 1rem;
}

.sg-positive {
    color: #4ade80;
    font-weight: 700;
}

.sg-negative {
    color: #f87171;
    font-weight: 700;
}

.row-1st {
    background: rgba(34, 197, 94, 0.04);
}

.row-2nd {
    background: rgba(59, 130, 246, 0.04);
}

.team-name-short {
    display: none;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Em telas pequenas, mostrar sigla em vez do nome completo */
@media (max-width: 900px) {
    .team-name-full { display: none; }
    .team-name-short { display: inline; }

    .standings-table th,
    .standings-table td { font-size: 0.75rem; padding: 0.4rem 0.2rem; }
}

/* Mini Cards de Jogos */
.group-matches-container {
    display: flex;
    flex-direction: column;
    max-width: 550px;
    width: 100%;
    background: var(--bg-card);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}

.mini-match-card {
    background: transparent;
    padding: 0.8rem 1rem;
    border: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s;
}

.mini-match-card:last-child {
    border-bottom: none;
}

.mini-match-card:hover {
    border-color: var(--secondary);
}

.mini-match-card.live {
    border: 1px solid var(--primary);
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.3);
    position: relative;
    overflow: hidden;
}

.mini-match-card.live::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
}

.live-pulse {
    animation: pulse-live 1.5s infinite, pulse-border 2s infinite;
}

@keyframes pulse-live {
    0% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navegação de Rodadas */
.round-switcher {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    width: 100%;
}

.round-switcher span {
    font-weight: 800;
    color: var(--primary);
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.round-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.round-btn:hover {
    background: var(--primary);
    color: #000;
    transform: scale(1.1);
}

/* Container do Mata-Mata */
.bracket-container {
    padding: 1rem 0;
}

.bracket-column {
    display: flex;
    flex-direction: column;
}

.mini-match-info {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
}

.mini-teams {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.mini-team {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.mini-team.right {
    flex-direction: row-reverse;
    text-align: right;
}

.mini-team img {
    width: 24px;
    height: 18px;
    border-radius: 2px;
}

.real-score {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--secondary);
    min-width: 40px;
    text-align: center;
    line-height: 1;
}

.mini-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mini-score input {
    width: 45px;
    height: 45px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    text-align: center;
    font-weight: 800;
    font-size: 1.3rem;
}

.btn-save-mini {
    width: 100%;
    margin-top: 1rem;
    padding: 0.4rem;
    font-size: 0.7rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
}

.btn-save-mini:hover {
    background: var(--primary);
    color: #000;
}

.real-score {
    background: var(--primary);
    color: #000;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.user-bet-result {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 0.8rem;
}

.status-tag {
    color: var(--success) !important;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Removida a duplicata de .live-pulse */

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(0, 242, 254, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0);
    }
}

.mini-match-card.live {
    border: 1px solid var(--primary);
    background: linear-gradient(145deg, rgba(0, 242, 254, 0.05), rgba(0, 0, 0, 0));
}

.mini-match-card.live .status-tag {
    color: var(--primary) !important;
}

.ranking-me {
    background: rgba(0, 242, 254, 0.1) !important;
    border-radius: 8px;
}

.ranking-me .team-name {
    color: var(--primary) !important;
    font-weight: 700;
}

.ranking-full {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.points-badge {
    background: var(--primary);
    color: var(--bg-body);
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-weight: 800;
    font-size: 0.8rem;
    min-width: 30px;
    text-align: center;
}

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

    .bottom-dashboard {
        grid-template-columns: 1fr;
    }
}

footer {
    text-align: center;
    padding: 4rem 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    margin: 10% auto;
    padding: 2.5rem;
    border-radius: 24px;
    width: 90%;
    max-width: 450px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.modal-content h2 span {
    color: var(--primary);
}

.close-modal {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--text-main);
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.1);
}

.w-100 {
    width: 100%;
}

/* Hamburguer button (hidden on desktop) */
.hamburger-btn {
    display: none;
    background: none;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.45rem 0.6rem;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Nav overlay (mobile backdrop) */
.nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 499;
}

.nav-overlay.open {
    display: block;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    /* Header */
    header {
        padding: 0.7rem 4%;
    }

    nav {
        gap: 0.5rem;
    }

    /* Logo menor */
    .logo-group {
        gap: 0.5rem;
    }

    .logo {
        font-size: 1.3rem;
        letter-spacing: -0.5px;
    }

    .prize-badge {
        display: none; /* Esconde no topo, mostra no menu */
    }

    .prize-badge.in-menu {
        display: block;
    }

    /* Mostrar hambúrguer */
    .hamburger-btn {
        display: flex;
    }

    /* Nav drawer lateral */
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 72%;
        max-width: 270px;
        height: 100dvh;
        background: rgba(10, 18, 36, 0.98);
        backdrop-filter: blur(16px);
        border-right: 1px solid var(--glass-border);
        flex-direction: column;
        gap: 0;
        padding: 4.5rem 0 2rem;
        z-index: 500;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links li {
        border-bottom: 1px solid var(--glass-border);
    }

    .nav-links a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1.05rem;
    }

    /* Auth buttons no mobile - mover para o menu drawer se quiser sumir do topo */
    .auth-buttons {
        gap: 0.35rem;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .auth-buttons button {
        padding: 0.4rem 0.65rem;
        font-size: 0.72rem;
        border-radius: 8px;
        white-space: nowrap;
    }

    #user-name-display {
        font-size: 0.75rem !important;
        max-width: 65px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        margin-right: 0.3rem !important;
    }

    /* Phase navigator */
    .phase-navigator {
        padding: 0.5rem 0.6rem;
        margin: 0.3rem 0 0.8rem 0;
    }

    .phase-display {
        font-size: 0.9rem;
        min-width: 0;
        flex: 1;
        letter-spacing: 0.5px;
    }

    .phase-subtitle {
        font-size: 0.6rem;
    }

    .nav-arrow {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
        padding: 0;
    }

    /* Grupos */
    .group-name {
        font-size: 1.25rem;
        margin-bottom: 0.8rem;
    }

    .group-section {
        margin-bottom: 1rem;
    }

    /* Tabela de classificação */
    .modern-table td {
        font-size: 0.82rem;
        padding: 0.38rem 0.28rem;
    }

    .modern-table th {
        font-size: 0.68rem;
        padding: 0.38rem 0.28rem;
    }

    .flag-img {
        width: 20px;
        height: 14px;
    }

    .team-cell {
        gap: 0.5rem;
    }

    /* Mini cards de jogo */
    .mini-match-card {
        padding: 0.6rem 0.7rem;
    }

    .mini-team {
        font-size: 0.78rem;
        gap: 0.3rem;
    }

    .mini-team img {
        width: 18px;
        height: 13px;
    }

    .real-score {
        font-size: 1.1rem;
        width: 32px;
        height: 32px;
    }

    .mini-score {
        gap: 0.6rem;
    }

    .mini-match-card.live::after {
        content: 'AO VIVO';
        position: absolute;
        top: 5px;
        right: 10px;
        font-size: 0.6rem;
        color: var(--primary);
        font-weight: 800;
        animation: pulse-live 1s infinite;
    }

    /* Round switcher */
    .round-switcher span {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }

    /* Modal geral */
    .modal-content {
        margin: 1.5vh auto;
        padding: 1rem;
        border-radius: 15px;
        width: 96%;
    }

    /* Admin modal */
    #admin-modal .modal-content {
        max-width: 100%;
        width: 98%;
        padding: 1rem 0.6rem;
    }

    .admin-user-row {
        grid-template-columns: 1fr auto;
    }

    .admin-user-row > div:last-child {
        grid-column: 1 / -1;
        padding-top: 0.3rem;
    }

    .admin-match-row {
        gap: 0.4rem;
        padding: 0.5rem 0.4rem;
        font-size: 0.78rem;
    }

    /* Hero */
    #hero h1 {
        font-size: 2.5rem;
    }

    .hero-stats {
        gap: 1.5rem;
    }

    .match-card {
        gap: 0.5rem;
    }

    .team-name {
        font-size: 0.8rem;
    }

    /* Footer */
    footer {
        padding: 2rem 1rem;
        font-size: 0.8rem;
    }
}

.modal-content {
    background: var(--bg-card);
    margin: 2vh auto;
    padding: 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    width: 95%;
    max-width: 350px;
    max-height: 95vh;
    overflow-y: auto;
    color: #fff;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Scrollbar Personalizada e Discreta */
.modal-content::-webkit-scrollbar,
.admin-tab-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-thumb,
.admin-tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 243, 255, 0.3);
    /* Cor do tema com transparência */
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-track,
.admin-tab-content::-webkit-scrollbar-track {
    background: transparent;
}

.admin-tab-content {
    max-height: 450px;
    overflow-y: auto;
    padding-right: 5px;
}

/* Painel Admin Styles */
.admin-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 1rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.admin-user-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr auto;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    gap: 1rem;
}

.admin-match-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    align-items: center;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
    border-radius: 8px;
    gap: 1rem;
}

.admin-match-row input {
    width: 40px;
    height: 40px;
    background: var(--bg-body);
    border: 1px solid var(--glass-border);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    font-weight: 700;
}

.status-pago {
    color: var(--success);
    font-weight: 700;
}

.status-pendente {
    color: #ffa500;
    font-weight: 700;
}

.btn-admin-action {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.8rem;
}

.btn-approve {
    background: var(--success);
    color: #000;
}

.btn-update {
    background: var(--primary);
    color: #000;
}

/* ===== Login com Google ===== */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: #fff;
    color: #333;
    border: 1.5px solid #ddd;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    margin-bottom: 1rem;
    font-family: 'Outfit', sans-serif;
}

.btn-google:hover {
    background: #f5f5f5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.btn-google img {
    flex-shrink: 0;
}

/* Divisor "ou" entre Google e email/senha */
.divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}