/* =============================================
   Bolão MC — Copa do Mundo 2026
   Minimalist Dark Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ---------- Variables ---------- */
:root {
    --bg-primary: #09090b;
    --bg-secondary: #0f0f12;
    --bg-card: #141419;
    --bg-card-hover: #1a1a21;
    --bg-input: #18181d;

    --text-primary: #fafafa;
    --text-secondary: #2563eb;
    --text-muted: #ffffffa3;

    --accent: #2563eb;
    --accent-hover: #3b82f6;
    --accent-muted: rgba(59, 130, 246, 0.12);

    --green: #22c55e;
    --green-muted: rgba(34, 197, 94, 0.12);
    --red: #ef4444;
    --red-muted: rgba(239, 68, 68, 0.1);
    --gold: #eab308;
    --gold-muted: rgba(234, 179, 8, 0.12);
    --cyan: #06b6d4;
    --cyan-muted: rgba(6, 182, 212, 0.1);

    --border: rgba(255, 255, 255, 0.129);
    --border-hover: rgba(255, 255, 255, 0.1);

    --radius: 10px;
    --radius-lg: 14px;
    --transition: 0.2s ease;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
}

::selection {
    background: #2563eb;
    color: white;
}

::-webkit-scrollbar {
    width: 5px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

/* ---------- Navbar ---------- */
.navbar-custom {
    background: var(--bg-primary) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.6rem 0;
}

.navbar-brand-custom {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--text-primary) !important;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
}

.navbar-brand-custom .brand-icon {
    font-size: 1.25rem;
}

.nav-link-custom {
    color: var(--text-muted) !important;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 0.75rem !important;
    border-radius: 6px;
    transition: var(--transition);
}

.nav-link-custom:hover {
    color: var(--text-secondary) !important;
}

.nav-link-custom.active {
    color: var(--text-primary) !important;
    background: var(--accent-muted);
}

.navbar-toggler {
    border-color: var(--border) !important;
    padding: 0.3rem 0.5rem;
}

.navbar-toggler-icon {
    filter: invert(0.7);
}

.user-badge {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ---------- Page Header ---------- */
.page-header {
    padding: 2rem 0 1.25rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.15rem;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

@media (max-width: 576px) {
    .page-title {
        font-size: 1.25rem;
    }
}

/* ---------- Cards ---------- */
.card-custom {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.card-custom:hover {
    border-color: var(--border-hover);
}

.card-custom .card-body {
    padding: 1.1rem;
}

/* ---------- Match Card ---------- */
.match-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    scroll-margin-top: 90px;
}

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

.match-card.locked {
    opacity: 0.55;
}

.match-phase {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
}

.match-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.team-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.team-flag {
    font-size: 1.35rem;
    line-height: 1;
}

.team-flag-img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(255, 255, 255, 0.2);
    vertical-align: middle;
}

.vs-separator {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
}

.score-display {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    min-width: 36px;
    font-variant-numeric: tabular-nums;
}

.score-separator {
    font-size: 1rem;
    font-weight: 300;
    color: var(--text-muted);
    padding: 0 0.15rem;
}

/* ---------- Prediction Input ---------- */
.prediction-input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    width: 52px;
    height: 46px;
    padding: 0;
    transition: var(--transition);
    -moz-appearance: textfield;
    appearance: textfield;
    font-variant-numeric: tabular-nums;
}

.prediction-input::-webkit-outer-spin-button,
.prediction-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

.prediction-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.15);
}

.prediction-input:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ---------- Buttons ---------- */
.btn-primary-custom {
    background: var(--accent);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-primary-custom:hover {
    background: var(--accent-hover);
    color: white;
}

.btn-primary-custom:active {
    transform: scale(0.98);
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: var(--transition);
}

.btn-outline-custom:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

/* ---------- Tables ---------- */
.table-custom {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
}

.table-custom thead th {
    background: transparent;
    border-bottom: 1px solid var(--border);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.75rem 1rem;
    white-space: nowrap;
}

.table-custom tbody td {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: var(--transition);
}

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

.table-custom tbody tr.current-user {
    background: var(--accent-muted);
}

/* ---------- Badges ---------- */
.badge-rule {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.badge-PE {
    background: var(--gold-muted);
    color: var(--gold);
}

.badge-GV {
    background: var(--cyan-muted);
    color: var(--cyan);
}

.badge-SG {
    background: var(--accent-muted);
    color: var(--accent-hover);
}

.badge-AE {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.badge-GP {
    background: rgba(161, 161, 170, 0.08);
    color: var(--text-secondary);
}

.badge-VP {
    background: rgba(161, 161, 170, 0.06);
    color: var(--text-muted);
}

.badge-zero {
    background: var(--red-muted);
    color: var(--red);
}

/* ---------- Ranking ---------- */
.rank-number {
    font-size: 0.95rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}

.rank-1 {
    color: #eab308;
}

.rank-2 {
    color: #a1a1aa;
}

.rank-3 {
    color: #d97706;
}

.rank-medal {
    font-size: 1.15rem;
}

.rank-points {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-hover);
    font-variant-numeric: tabular-nums;
}

/* ---------- User Avatar ---------- */
.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: white;
    flex-shrink: 0;
}

.avatar-gradient-1 {
    background: #6d28d9;
}

.avatar-gradient-2 {
    background: #0891b2;
}

.avatar-gradient-3 {
    background: #c2410c;
}

.avatar-gradient-4 {
    background: #059669;
}

.avatar-gradient-5 {
    background: #be185d;
}

.avatar-gradient-6 {
    background: #ca8a04;
}

/* ---------- Auth Pages ---------- */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.25rem;
    width: 100%;
    max-width: 400px;
}

.auth-logo {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
    letter-spacing: -0.3px;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 1.75rem;
}

.form-control-custom {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
    padding: 0.6rem 0.85rem !important;
    font-size: 0.9rem !important;
    transition: var(--transition) !important;
}

.form-control-custom::placeholder {
    color: var(--text-muted) !important;
}

.form-control-custom:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.12) !important;
}

.form-label-custom {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

/* ---------- Status Badges ---------- */
.lock-badge {
    background: var(--red-muted);
    color: var(--red);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.open-badge {
    background: var(--green-muted);
    color: var(--green);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

/* ---------- Stat Cards ---------- */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 0.2rem;
}

/* ---------- Points ---------- */
.points-display {
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.points-positive {
    color: var(--green);
}

.points-zero {
    color: var(--text-muted);
}

/* ---------- Empty State ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    opacity: 0.9;
}

.empty-state-text {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---------- Footer ---------- */
.footer-custom {
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ---------- Scoring Legend ---------- */
.scoring-legend {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
}

.scoring-legend-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.scoring-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.8rem;
}

.scoring-legend-pts {
    font-weight: 600;
    color: var(--accent-hover);
    font-variant-numeric: tabular-nums;
}

/* ---------- Alerts ---------- */
.alert-custom {
    border-radius: 8px;
    border: 1px solid;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.7rem 1rem;
}

.alert-dismissible.alert-custom {
    padding-right: 3rem;
}

.alert-dismissible.alert-custom .btn-close {
    padding: 0.85rem 1rem;
}

.alert-success-custom {
    background: var(--green-muted);
    border-color: rgba(34, 197, 94, 0.15);
    color: var(--green);
}

.alert-info-custom {
    background: var(--accent-muted);
    border-color: rgba(124, 58, 237, 0.15);
    color: var(--accent-hover);
}

.alert-danger-custom {
    background: var(--red-muted);
    border-color: rgba(239, 68, 68, 0.15);
    color: var(--red);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .match-card {
        padding: 0.9rem 1rem;
    }

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

    .team-flag {
        font-size: 1.1rem;
    }

    .prediction-input {
        width: 44px;
        height: 40px;
        font-size: 1rem;
    }

    .score-display {
        font-size: 1.3rem;
    }

    .table-custom {
        font-size: 0.75rem;
    }

    .table-custom thead th {
        font-size: 0.65rem;
        padding: 0.5rem;
    }

    .table-custom tbody td {
        padding: 0.55rem 0.5rem;
    }

    .auth-card {
        padding: 1.5rem;
    }

    .stat-value {
        font-size: 1.35rem;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 1.25rem 0 0.75rem;
    }

    .hide-mobile {
        display: none !important;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
    }
}