/* ========================================= */
/* 1. VARIÁVEIS E RESET (IDENTIDADE STRAYS) */
/* ========================================= */
:root {
    --primary-gold: #FFD700;     
    --gold-dim: rgba(234, 179, 8, 0.9);
    --accent-green: #10b981;
    --accent-red: #ef4444;       
    --bg-dark: #0f1116;          
    --bg-card: #15171e;          
    --bg-hover: #1c1f26;         
    --border-subtle: rgba(255, 255, 255, 0.05);
    --border-highlight: rgba(255, 255, 255, 0.1);
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-display: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    overflow-x: hidden; /* Evita rolagem lateral indesejada no celular */
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-gold); }

a { text-decoration: none; color: inherit; transition: 0.2s; }

/* ========================================= */
/* 2. SIDEBAR (MENU LATERAL RESPONSIVO)      */
/* ========================================= */
.sidebar {
    position: fixed; left: 0; top: 0; width: 260px; height: 100vh;
    background: rgba(15, 17, 22, 0.98);
    border-right: 1px solid var(--border-subtle);
    display: flex; flex-direction: column; z-index: 100;
    backdrop-filter: blur(12px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* MOBILE FIRST: Começa escondida na esquerda */
    transform: translateX(-100%);
}

/* OVERLAY (Fundo escuro no celular) */
.sidebar-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); 
    backdrop-filter: blur(4px); z-index: 90;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.sidebar-overlay.active { opacity: 1; pointer-events: auto; }

/* Estilos internos da Sidebar (Mantidos do seu original) */
.logo { padding: 32px 24px; }
.logo h1 { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: -1px; color: white; }
.logo-accent { color: var(--primary-gold); }

.sidebar-back-link {
    display: flex; align-items: center; gap: 10px;
    color: #666; font-size: 12px; font-weight: 700;
    margin-bottom: 15px; text-transform: uppercase; cursor: pointer;
}
.sidebar-back-link:hover { color: var(--primary-gold); }

.menu { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 4px; }

.menu-item {
    display: flex; align-items: center; gap: 12px; padding: 12px 16px;
    border-radius: 8px; color: var(--text-secondary); text-decoration: none;
    font-weight: 500; transition: all 0.2s; font-size: 14px; cursor: pointer;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.05); color: white; }
.menu-item.active {
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary-gold);
    border-left: 3px solid var(--primary-gold);
}

.sidebar-footer { padding: 24px; border-top: 1px solid var(--border-subtle); margin-top: auto; }
.footer-links { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.footer-links a { font-size: 11px; color: var(--text-secondary); font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary-gold); }
.copyright { font-size: 10px; color: #555; line-height: 1.4; }

/* Botão Toggle Sidebar (Hambúrguer) */
.sidebar-toggle {
    position: fixed; top: 15px; left: 15px; 
    background: #FFD700; border: 1px solid #333; color: white;
    width: 40px; height: 40px; border-radius: 8px; cursor: pointer;
    z-index: 101; display: flex; align-items: center; justify-content: center;
    transition: left 0.3s ease, transform 0.2s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}
.sidebar-toggle:hover { transform: scale(1.05); }

/* ========================================= */
/* 3. LAYOUT PRINCIPAL (Adaptável)           */
/* ========================================= */
.main-content {
    margin-left: 0; 
    width: 100%;
    min-height: 100vh; 
    padding-bottom: 80px;
    transition: margin-left 0.3s ease;
    /* Adicione isso se não tiver: */
    overflow-x: hidden; 
}

/* Ajuste de padding para não bater no botão toggle no celular */
#page-content { padding: 80px 20px 24px 20px; max-width: 1400px; margin: 0 auto; }

/* Top Bar (Botões Auth) */
.top-bar {
    position: sticky; top: 0; z-index: 40;
    display: flex; justify-content: flex-end; align-items: center;
    padding: 15px 20px; background: transparent; pointer-events: none;
}
.top-bar .auth-buttons, .top-bar .user-logged-area { pointer-events: auto; }

/* ========================================= */
/* MEDIA QUERIES (COMPORTAMENTO DESKTOP)     */
/* ========================================= */
@media (min-width: 768px) {
    /* 1. Define a largura padrão no PC */
    .sidebar { 
        transform: translateX(0); 
        width: 260px; /* Garante a largura correta */
    }
    
    /* 2. AQUI ESTAVA O ERRO: Mudamos de .hidden para .desktop-closed */
    .sidebar.desktop-closed { 
        transform: translateX(-100%); /* Move a sidebar totalmente para a esquerda */
    }

    /* 3. Ajuste do Conteúdo Principal */
    .main-content { 
        margin-left: 260px; /* Espaço quando a sidebar está aberta */
        width: calc(100% - 260px); /* Garante que não estoure a tela */
    }
    
    /* Quando a sidebar fecha, o conteúdo expande */
    .main-content.expanded { 
        margin-left: 0; 
        width: 100%;
    }

    /* 4. Ajuste do Botão (Move junto com a sidebar ou fica no canto) */
    .sidebar-toggle { 
        left: 275px; /* Posição quando aberto (260px sidebar + 15px gap) */
    }
    
    .sidebar-toggle.btn-collapsed { 
        left: 20px; /* Posição quando a sidebar está fechada */
    }
    
    /* Esconde overlay no PC */
    .sidebar-overlay { display: none !important; }
}

.sidebar .logo {
        /* Empurra a logo para baixo para não bater no botão de menu */
        padding-top: 80px !important; 
    }

/* MOBILE: Comportamento quando a classe .hidden é REMOVIDA (Menu Aberto) */
@media (max-width: 768px) {
    /* 1. Sidebar começa FECHADA no mobile */
    .sidebar { 
        transform: translateX(-100%); 
        width: 80%; /* Ocupa 80% da tela para ficar bonito */
        max-width: 300px;
        z-index: 10000; /* Garante que fique acima de tudo */
    }

    /* 2. Classe que o seu sidebar-toggle.js adiciona */
    .sidebar.mobile-open { 
        transform: translateX(0); /* Traz a sidebar para a tela */
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    /* 3. Ajuste do botão toggle para ficar sempre visível */
    .sidebar-toggle {
        display: flex !important;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 10001; /* Acima da sidebar */
        background-color: #FFD700; /* Garante fundo para ver o ícone */
    }

    /* 4. Overlay (fundo escuro) */
    .sidebar-overlay {
        display: block !important; /* Força aparecer no mobile */
        z-index: 9999;
    }

    .sidebar .logo {
    display: flex;
    flex-direction: column; /* Mantém o botão "Voltar" em cima da logo */
    align-items: center;    /* Centraliza tudo */
    justify-content: center;
    padding: 24px 20px;
}

.sidebar-logo-img {
    width: 100%;           /* Ocupa a largura disponível */
    max-width: 150px;      /* Tamanho máximo para não estourar (ajuste conforme necessário) */
    height: auto;          /* Mantém a proporção */
    object-fit: contain;   /* Garante que a imagem não distorça */
    display: block;
}
}
    /* 2. CORREÇÃO DO ESPAÇO NO TOPO DO SITE */
    /* Reduz o padding padrão de 80px para 20px no celular, subindo o conteúdo */
    #page-content {
        padding-top: 0px !important; /* Use !important para garantir que sobrescreva o desktop */
        padding-bottom: 80px; /* Mantém espaço embaixo para rolagem */
    }
    
    /* Ajuste extra opcional: garante que o título não tenha margem excessiva no mobile */
    .tournament-header {
        margin-top: 0;
    }

/* ========================================= */
/* 4. ELEMENTOS UI (BOTÕES E CARDS)         */
/* ========================================= */

/* Botões */
.btn-primary {
    background: var(--primary-gold); color: black; border: none;
    padding: 10px 24px; border-radius: 8px; font-weight: 700; font-size: 13px;
    text-transform: uppercase; cursor: pointer; transition: all 0.2s;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}
.btn-primary:hover { transform: translateY(-2px); background: white; }

.btn-outline {
    background: transparent; border: 1px solid #333; color: var(--text-secondary);
    padding: 10px 24px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer;
    transition: all 0.2s; display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline:hover { border-color: var(--primary-gold); color: white; background: rgba(255, 215, 0, 0.05); }

/* --- NOVO HEADER DO TORNEIO (Estilo React) --- */
.tournament-header {
    position: relative; height: 320px; border-radius: 24px; overflow: hidden;
    margin-bottom: 32px; border: 1px solid var(--border-subtle);
}
.header-bg {
    position: absolute; inset: 0; background-size: cover; background-position: center;
    transition: transform 0.7s;
}
.tournament-header:hover .header-bg { transform: scale(1.02); }
.header-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to right, #0f1116 0%, rgba(15, 17, 22, 0.8) 50%, transparent 100%);
}
.header-content {
    position: relative; z-index: 10; height: 100%; padding: 40px;
    display: flex; flex-direction: column; justify-content: space-between;
}
/* Layout Desktop do Header */
@media (min-width: 768px) {
    .header-content { flex-direction: row; align-items: flex-end; }
}

.header-info { display: flex; align-items: center; gap: 24px; width: 100%; }
.header-logo-box {
    width: 100px; height: 100px; border-radius: 16px; overflow: hidden;
    border: 2px solid #333; box-shadow: 0 10px 30px rgba(0,0,0,0.5); flex-shrink: 0;
}
.header-logo-box img { width: 100%; height: 100%; object-fit: cover; }

.header-texts h1 { font-size: 32px; font-weight: 800; color: white; line-height: 1.1; margin-bottom: 8px; }
.status-badge {
    display: inline-block; padding: 4px 12px; background: rgba(234, 179, 8, 0.9);
    color: black; font-size: 11px; font-weight: 800; border-radius: 20px;
    text-transform: uppercase; letter-spacing: 0.5px;
    box-shadow: 0 0 15px rgba(234, 179, 8, 0.3);
}

.header-stats {
    display: flex; flex-direction: column; gap: 24px; align-items: flex-end; min-width: 300px;
}
.stat-card-glass {
    background: rgba(0, 0, 0, 0.4); backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.05); padding: 16px; border-radius: 12px; width: 100%;
}
.stat-row { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 8px; color: #ccc; }
.stat-highlight { color: white; font-weight: 700; }

/* Barra de Progresso */
.progress-container { width: 100%; height: 8px; background: #333; border-radius: 4px; background: #222; overflow: hidden; }
.progress-bar { height: 100%; background: var(--primary-gold); box-shadow: 0 0 10px var(--primary-gold); }

/* --- ABAS DE NAVEGAÇÃO --- */
.nav-tabs {
    display: flex; gap: 32px; border-bottom: 1px solid var(--border-subtle); margin-bottom: 32px; overflow-x: auto;
}
.nav-tab {
    background: none; border: none; padding-bottom: 16px; font-size: 14px; font-weight: 500;
    color: var(--text-secondary); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
}
.nav-tab:hover { color: #ddd; border-bottom-color: #333; }
.nav-tab.active { color: white; border-bottom-color: var(--primary-gold); }

/* --- CONTEÚDO DAS ABAS --- */

/* 1. Visão Geral */
.info-cards-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px;
}
.info-card-react {
    background: var(--bg-card); border: 1px solid var(--border-subtle); padding: 20px;
    border-radius: 12px; display: flex; gap: 16px; align-items: center;
    transition: border-color 0.2s;
}
.info-card-react:hover { border-color: #333; }
.ic-icon { color: var(--text-secondary); }
.ic-content h3 { font-size: 12px; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; }
.ic-content p { font-size: 14px; color: white; font-weight: 700; }

/* Grid Principal (3 Colunas) */
.overview-grid-react { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media(min-width: 1024px) { .overview-grid-react { grid-template-columns: 3fr 3fr 6fr; } }

/* Prêmios */
.prize-box-react { background: var(--bg-card); border-radius: 12px; border: 1px solid var(--border-subtle); padding: 4px; }
.prize-item { display: flex; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.prize-item:last-child { border-bottom: none; }
.p-place { font-weight: 700; color: #ccc; font-size: 14px; }
.p-place.highlight { color: white; }
.p-amount { font-weight: 700; color: white; }
.p-desc { font-size: 10px; color: #555; text-transform: uppercase; display: block; margin-top: 2px; }

/* Discord Button Grande */
.discord-big-btn {
    margin-top: 20px; width: 100%; background: #5865F2; color: white;
    padding: 16px; border-radius: 12px; display: flex; align-items: center; gap: 12px;
    transition: all 0.2s; border: none; cursor: pointer; text-align: left;
}
.discord-big-btn:hover { background: #4752c4; transform: translateY(-2px); }
.discord-icon-bg { background: rgba(255,255,255,0.2); padding: 8px; border-radius: 8px; }

/* Menu Interativo */
.menu-list-react { display: flex; flex-direction: column; gap: 8px; }
.menu-btn-react {
    width: 100%; text-align: left; padding: 16px; border-radius: 8px;
    background: var(--bg-card); border: 1px solid var(--border-subtle);
    color: #ccc; font-weight: 600; font-size: 14px; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: all 0.2s;
}
.menu-btn-react:hover { background: var(--bg-hover); }
.menu-btn-react.active {
    background: #ca8a04; border-color: #ca8a04; color: black; box-shadow: 0 4px 15px rgba(202, 138, 4, 0.2);
}
.menu-meta { font-size: 10px; text-transform: uppercase; opacity: 0.7; display: block; margin-top: 4px; }

/* Conteúdo Dinâmico */
.dynamic-content-area p { color: #9ca3af; margin-bottom: 16px; line-height: 1.6; }
.dynamic-content-area strong { color: white; }

/* 2. Aba Partidas (Cards Estilo React) */
.matches-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 16px; }
.match-card-new {
    background: var(--bg-card); border: 1px solid transparent; border-radius: 12px;
    overflow: hidden; transition: all 0.2s;
}
.match-card-new:hover { border-color: #333; }

.mc-header {
    background: #1c1f26; padding: 12px 20px; display: flex; justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle); font-size: 12px;
}
.mc-live { color: var(--accent-red); font-weight: 700; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

.mc-content { padding: 24px; display: flex; align-items: center; justify-content: space-between; }
.mc-team { display: flex; align-items: center; gap: 12px; flex: 1; }
.mc-team.reverse { flex-direction: row-reverse; text-align: right; }
.mc-logo { width: 40px; height: 40px; border-radius: 50%; background: #222; padding: 2px; }
.mc-logo img { width: 100%; height: 100%; border-radius: 50%; }
.mc-name { font-weight: 600; font-size: 14px; color: white; }

.mc-vs {
    display: flex; flex-direction: column; align-items: center; padding: 0 20px;
}
.vs-tag {
    font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 4px;
    text-transform: uppercase; margin-top: 4px;
}
.tag-live { background: var(--accent-red); color: white; }
.tag-scheduled { background: #333; color: #ccc; }

/* style.css */

/* BRACKET WRAPPER */
.bracket-wrapper {
    display: flex;
    justify-content: center; /* Centraliza na tela */
    padding: 40px;
    overflow-x: auto; /* Permite rolar se for muito grande */
}

/* COLUNA DA RODADA */
.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    margin: 0 40px; /* Aumentei o espaço lateral para caber as linhas */
}

/* Caixa da Partida */
.match-box {
    background: #15171e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 230px;
    height: 80px; /* Altura fixa é OBRIGATÓRIA */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px;
    position: relative;
    z-index: 20; /* Fica na frente das linhas */
}
.match-box:hover {
    border-color: #FFD700;
}

/* CONECTORES (LINHAS) */
.bracket-round {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    margin: 0 40px; /* Aumentei o espaço lateral para caber as linhas */
}

/* Caixa da Partida */
.match-box {
    background: #15171e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 230px;
    height: 80px; /* Altura fixa é OBRIGATÓRIA */
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 12px;
    position: relative;
    z-index: 20; /* Fica na frente das linhas */
}

/* --- LINHAS CONECTORAS (O SEGREDO) --- */

/* Linha da Direita (Saída) */
.connector-right {
    position: absolute;
    right: -40px; /* Tem que ser igual à margem negativa */
    width: 40px;  /* Largura da linha */
    border-right: 2px solid #6b7280; /* COR DA LINHA (Cinza) */
    pointer-events: none;
    z-index: 10;
}

/* Curva para baixo (Quando o time está em cima) */
.connector-right.down {
    top: 50%;
    border-top: 2px solid #6b7280;
    border-bottom: none;
    border-top-right-radius: 12px;
}

/* Curva para cima (Quando o time está embaixo) */
.connector-right.up {
    bottom: 50%;
    border-bottom: 2px solid #6b7280;
    border-top: none;
    border-bottom-right-radius: 12px;
}

/* Linha da Esquerda (Entrada) */
.connector-left {
    position: absolute;
    left: -40px;
    top: 50%;
    width: 40px;
    height: 2px;
    background-color: #6b7280; /* COR DA LINHA */
    z-index: 10;
}

/* Input do Placar */
.score-input {
    width: 24px;
    height: 20px;
    background: #000;
    border: 1px solid #333;
    color: white;
    text-align: center;
    border-radius: 4px;
}
/* ========================================= */
/* 5. UTILITÁRIOS (ADICIONE ISTO AO FINAL)   */
/* ========================================= */

.hidden-section {
    display: none !important;
}

/* Animação suave para quando a aba aparecer */
.animate-fadeIn {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================= */
/* 6. PÁGINAS DE AUTH (LOGIN/CADASTRO)       */
/* ========================================= */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
    background-color: var(--bg-dark);
}

.auth-container {
    width: 100%;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.auth-card {
    background: #0f1116;
    border-radius: 16px;
    display: flex;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-subtle);
    min-height: 550px;
}


.auth-form-side {
    flex: 1;
    padding: 40px 50px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}


.auth-image-side {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}


@media (max-width: 768px) {
    .auth-card { flex-direction: column; }
    .auth-image-side { display: none; }
}


.auth-title { font-size: 22px; font-weight: 800; color: white; margin-bottom: 4px; text-align: center; }
.auth-subtitle { color: var(--text-secondary); font-size: 13px; margin-bottom: 32px; text-align: center; }

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

.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { color: #ccc; font-size: 11px; font-weight: 700; }
.form-input {
    width: 100%; background: #1c1f26; border: 1px solid #333; color: white;
    padding: 12px 14px; border-radius: 6px; font-size: 13px; outline: none; transition: 0.2s;
}
.form-input:focus { border-color: #6d28d9; }


.forgot-password {
    text-align: right; font-size: 11px; color: #888; text-decoration: none; margin-top: -4px;
}
.forgot-password:hover { color: white; }


.btn-auth {
    width: 100%; background: #6d28d9; color: white; border: none; padding: 12px;
    border-radius: 6px; font-weight: 700; font-size: 14px; cursor: pointer; transition: 0.2s; margin-top: 8px;
}
.btn-auth:hover { background: #5b21b6; }

.divider {
    display: flex; align-items: center; text-align: center; margin: 24px 0;
    color: #444; font-size: 10px; font-weight: 700; text-transform: uppercase;
}
.divider::before, .divider::after { content: ''; flex: 1; border-bottom: 1px solid #222; }
.divider span { padding: 0 10px; }

.btn-google {
    width: 100%; background: #1c1f26; color: white; border: 1px solid #333; padding: 12px;
    border-radius: 6px; font-weight: 600; font-size: 13px; cursor: pointer; display: flex;
    align-items: center; justify-content: center; gap: 10px; transition: 0.2s;
}
.btn-google:hover { background: #252830; border-color: #555; }

.auth-footer { text-align: center; font-size: 12px; color: #888; margin-top: 24px; }
.auth-footer a { color: #6d28d9; font-weight: 700; text-decoration: none; }

/* ========================================= */
/* HEADER LOGADO (PERFIL E NOTIFICAÇÃO)      */
/* ========================================= */

.user-logged-area {
    display: flex;
    align-items: center;
    gap: 24px;
    pointer-events: auto; 
}


.notification-btn {
    position: relative;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    color: #ccc; cursor: pointer;
    transition: color 0.2s;
}
.notification-btn:hover { color: white; }
.notif-dot {
    position: absolute; top: 10px; right: 10px;
    width: 8px; height: 8px;
    background: var(--primary-gold);
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}


.user-profile-widget {
    display: flex; align-items: center; gap: 12px;
    background: rgba(255, 255, 255, 0.03); 
    border: 1px solid var(--border-subtle);
    padding: 6px 16px 6px 6px;
    border-radius: 50px; 
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.user-profile-widget:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}


.user-avatar-box {
    width: 36px; height: 36px;
    background: #4F46E5; 
    border-radius: 10px; 
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold; color: white;
}
.user-avatar-box img { width: 100%; height: 100%; object-fit: cover; }


.user-info-text {
    display: flex; flex-direction: column;
    line-height: 1.1;
    margin-right: 4px;
}
.u-name {
    font-size: 13px; font-weight: 700; color: white;
}
.u-nick {
    font-size: 11px; color: #888; text-transform: lowercase;
}

.chevron-down { color: #666; }


.user-dropdown {
    position: absolute; top: 120%; right: 0;
    width: 160px;
    background: #1c1f26;
    border: 1px solid #333;
    border-radius: 12px;
    padding: 8px;
    display: none; 
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
}
.user-dropdown.show { display: flex; }

.user-dropdown a {
    padding: 10px; font-size: 13px; color: #ccc;
    border-radius: 6px; text-decoration: none;
}
.user-dropdown a:hover { background: rgba(255,255,255,0.05); color: white; }
.user-dropdown .divider { height: 1px; background: #333; margin: 4px 0; }

/* Animação do Modal */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fadeInUp {
    animation: fadeInUp 0.3s ease-out;
}

/* ========================================= */
/* NOTIFICAÇÕES (TOAST) ESTILO RIOT/STRAYS   */
/* ========================================= */

.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Deixa clicar através se não tiver toast */
}

.toast {
    background: #10b981; /* Verde Sucesso */
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    min-width: 300px;
    transform: translateX(100%); /* Começa fora da tela */
    animation: slideInToast 0.4s forwards ease-out;
    pointer-events: auto;
    border: 1px solid rgba(255,255,255,0.1);
}

.toast-icon {
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes slideInToast {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutToast {
    to { transform: translateX(120%); opacity: 0; }
}

/* ========================================= */
/* NOTIFICAÇÕES (DROPDOWN DO SINO)           */
/* ========================================= */

.notification-dropdown {
    position: absolute;
    top: 50px;
    right: -10px;
    width: 320px;
    background: #1c1f26;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    display: none; /* Escondido por padrão */
    flex-direction: column;
    overflow: hidden;
    animation: fadeInDropdown 0.2s ease-out;
}

.notification-dropdown.show { display: flex; }

.notif-header {
    padding: 12px 16px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #15171e;
}
.notif-header h3 { font-size: 13px; font-weight: 800; color: white; text-transform: uppercase; }
.notif-clear { font-size: 10px; color: #888; cursor: pointer; }
.notif-clear:hover { color: #ff4655; }

.notif-list {
    max-height: 300px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    gap: 12px;
    transition: background 0.2s;
    position: relative;
}
.notif-item:hover { background: rgba(255,255,255,0.02); }
.notif-item.unread { background: rgba(234, 179, 8, 0.05); border-left: 3px solid #eab308; }

.notif-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #333;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: white;
}
.notif-icon.invite { background: #6d28d9; } /* Roxo */
.notif-icon.match { background: #ef4444; }  /* Vermelho */
.notif-icon.info { background: #3b82f6; }   /* Azul */

.notif-content { flex: 1; }
.notif-title { font-size: 13px; font-weight: 700; color: white; margin-bottom: 2px; }
.notif-msg { font-size: 11px; color: #9ca3af; line-height: 1.4; margin-bottom: 6px; }
.notif-time { font-size: 10px; color: #555; }

/* Botões de Ação (Aceitar/Recusar) */
.notif-actions { display: flex; gap: 8px; margin-top: 8px; }
.btn-accept {
    background: #10b981; color: white; border: none; padding: 4px 10px;
    border-radius: 4px; font-size: 10px; font-weight: 800; cursor: pointer;
}
.btn-decline {
    background: #333; color: #ccc; border: none; padding: 4px 10px;
    border-radius: 4px; font-size: 10px; font-weight: 800; cursor: pointer;
}
.btn-accept:hover { background: #059669; }
.btn-decline:hover { background: #444; color: white; }

@keyframes fadeInDropdown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Efeito Dourado Premium para Botões */
.btn-gold-premium {
    background: linear-gradient(135deg, #FFD700 0%, #FDB931 100%);
    color: black;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 4px 15px rgba(253, 185, 49, 0.4);
    transition: all 0.3s ease;
}
.btn-gold-premium:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(253, 185, 49, 0.6);
}

/* Ajuste do botão de ocultar sidebar para ser menor */
.sidebar-toggle {
    width: 32px !important; 
    height: 32px !important; 
    top: 15px !important;
}
.sidebar-toggle svg { width: 16px; height: 16px; }

.toast.error {
    background-color: #ef4444; /* Vermelho */
    border-color: rgba(255, 255, 255, 0.1);
}

.glass-effect {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 215, 0, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* ========================================= */
/* 7. PROTEÇÃO CONTRA CLIQUE DUPLO (CRÍTICO) */
/* ========================================= */
button:disabled, 
button[disabled],
.btn-disabled {
    pointer-events: none !important;
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(100%);
}
/* ========================================= */
/* 8. AJUSTES ESPECÍFICOS PARA MOBILE        */
/* ========================================= */

@media (max-width: 768px) {
    /* Ajuste de Fontes Gigantes na Home */
    h1.text-5xl, h1.text-7xl { font-size: 2.5rem !important; line-height: 1.1; }
    
    /* Header do Torneio */
    .tournament-header { height: auto; min-height: 400px; display: flex; flex-direction: column; }
    .header-content { flex-direction: column; align-items: flex-start; padding: 20px; }
    .header-info { flex-direction: column; align-items: flex-start; gap: 15px; }
    .header-stats { align-items: flex-start; width: 100%; margin-top: 20px; }
    
    /* Brackets (Permitir rolagem horizontal) */
    #bracket-container {
        justify-content: flex-start;
        padding: 20px;
    }
    .bracket-wrapper { padding: 10px; }
    
    /* Tabelas e Listas */
    .overflow-x-auto { -webkit-overflow-scrolling: touch; }
    
    /* Modais (Ocupar tela toda) */
    .bg-\[\#15171e\].w-full {
        width: 95% !important;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Login/Cadastro */
    .auth-card { flex-direction: column; height: auto; min-height: auto; }
    .auth-image-side { display: none; } /* Esconde a imagem lateral no celular */
    .auth-form-side { padding: 30px 20px; }
    
    /* Grids */
    .grid-cols-3, .grid-cols-4, .grid-cols-5 {
        grid-template-columns: 1fr !important; /* Força 1 coluna em tudo que for grid complexo */
    }
    /* Exceção para grids pequenos (tipo placar) */
    .grid-cols-2 { grid-template-columns: 1fr 1fr; } 
    
    /* Cards de Partidas */
    .match-card-new { min-width: 100%; }
}
