@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

/* --- VARIÁVEIS DE TEMA --- */
:root {
    /* Cores da Copa */
    --primary: #004a99;      /* Azul FIFA */
    --secondary: #00a859;    /* Verde */
    --copa-red: #ed1c24;     /* Vermelho */
    --copa-purple: #8b5cf6;  /* Roxo */
    --gold: #fbbf24;

    /* Tema Claro (Padrão) */
    --bg-page: #f1f5f9;      /* Cinza bem clarinho para dar contraste com o card branco */
    --bg-card: #ffffff;      /* Card totalmente branco */
    --border-card: #e2e8f0;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --input-text: #0f172a;
}

body.dark-theme {
    /* Tema Escuro */
    --bg-page: #0a0f1e;
    --bg-card: #1e293b;
    --border-card: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: #0f172a;
    --input-border: #334155;
    --input-text: #ffffff;
}

/* --- ESTILOS BASE --- */
body {
    background-color: var(--bg-page);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.auth-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.glass-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 28px;
    padding: 40px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
}

body.dark-theme .glass-card {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.copa-logo {
    max-width: 160px;
    height: auto;
    margin-bottom: 20px;
}

/* --- FORMULÁRIO E INPUTS --- */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group i {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary); /* Ícone agora tem a cor oficial da copa para destaque */
    font-size: 1.1rem;
    z-index: 10;
}

input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 15px 15px 15px 52px; /* Padding extra para não bater no ícone */
    color: var(--input-text);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.1);
}

/* --- BOTÃO (CORRIGIDO PARA NÃO FICAR TRANSPARENTE) --- */
.btn-auth {
    width: 100%;
    /* Gradiente sólido e vibrante */
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border: none;
    border-radius: 12px;
    padding: 16px;
    color: #ffffff !important; /* Força o texto branco sempre */
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 74, 153, 0.3);
}

.btn-auth:hover {
    transform: translateY(-2px);
    filter: brightness(1.1);
    box-shadow: 0 6px 15px rgba(0, 74, 153, 0.4);
}

/* --- TEMA SWITCHER --- */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
}

.theme-switch-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    color: var(--text-main);
    padding: 10px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.auth-footer {
    margin-top: 25px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

/* --- ESTILOS DO PAINEL & NAVBAR --- */
.painel-body {
    display: block; /* Remove o flex do body para o painel */
    padding-top: 90px;
    background-color: var(--bg-page);
}

.navbar {
    background-color: var(--bg-card);
    height: 75px;
    width: 100%;
    position: fixed;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
}

.nav-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-sair {
    background: var(--copa-red);
    color: white !important;
    padding: 8px 18px;
    border-radius: 8px;
}

/* --- MENU MOBILE --- */
.menu-btn {
    display: none;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 2000;
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .menu-btn { display: flex; justify-content: center; align-items: center; }
}

.side-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 1500;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    padding-top: 100px;
}

.side-menu.active { right: 0; }

.side-links { list-style: none; padding: 0; }
.side-links li { padding: 15px 30px; border-bottom: 1px solid var(--border-card); }
.side-links a { text-decoration: none; color: var(--text-main); font-weight: 600; display: flex; gap: 15px; }

/* --- GRID DO ÁLBUM --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.grupo-section {
    margin-bottom: 40px;
}

.grupo-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    border-left: 5px solid var(--secondary);
    padding-left: 15px;
}

.grid-selecoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.selecao-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.selecao-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-weight: 700;
    text-transform: uppercase;
}

.bandeira {
    width: 35px;
    height: 25px;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.figurinhas-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.figurinha {
    aspect-ratio: 1/1;
    background: var(--bg-page);
    border: 1px solid var(--border-card);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: 0.2s;
}

.figurinha.colada {
    background: var(--secondary);
    color: white;
    border-color: var(--secondary);
    transform: scale(1.05);
    box-shadow: 0 3px 8px rgba(0, 168, 89, 0.3);
}

/* Reset para Menus */
.nav-links, .side-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

/* Container do Painel */
.painel-container {
    padding: 100px 20px 40px; /* Espaço para o header fixo */
    max-width: 1100px;
    margin: 0 auto;
}

.welcome-box { margin-bottom: 30px; }

/* Seções de Grupos */
.grupo-section { margin-bottom: 50px; }
.grupo-title {
    font-size: 1.4rem;
    color: var(--primary);
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 20px;
}

/* Grid de Cards */
.grid-selecoes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.selecao-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.selecao-info { margin-bottom: 12px; font-size: 0.9rem; }

/* Figurinhas */
.figurinhas-grid {
    display: flex;
    justify-content: center;
}

.figurinha-item {
    width: 60px;
    height: 80px;
    background: var(--input-bg);
    border: 2px dashed var(--input-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-weight: bold;
    color: var(--text-muted);
}

.figurinha-item.colada {
    background: var(--secondary);
    border-style: solid;
    border-color: var(--secondary);
    color: white;
    transform: scale(1.05);
}

/* Botão Sanduíche */
.menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 2000;
}

.menu-btn span {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 10px;
    transition: all 0.3s ease;
}

/* Menu Lateral (Mobile) */
.side-menu {
    position: fixed;
    top: 0;
    right: -100%; /* Começa escondido */
    width: 250px;
    height: 100vh;
    background-color: var(--bg-card);
    z-index: 1500;
    transition: 0.4s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    padding-top: 80px;
}

.side-menu.active {
    right: 0; /* Mostra o menu */
}

.side-links {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.side-links li a {
    padding: 20px;
    display: block;
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--border-card);
    font-weight: 600;
}

/* Mostrar sanduíche apenas no celular */
@media (max-width: 768px) {
    .menu-btn { display: flex; }
    .nav-links { display: none; }
}