/* --- RESET E FONTE --- */
* { box-sizing: border-box; }

body {
    background-color: #0f1215; 
    color: #f0f0f0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    position: relative; 
    overflow-x: hidden; /* Evita rolagem lateral na página inteira */
}

/* --- CAMADA DE FUNDO COM DESFOQUE --- */
body::before {
    content: "";
    position: fixed;
    top: -10px;
    left: -10px;
    width: calc(100% + 20px);
    height: calc(100% + 20px);
    z-index: -1;
    
    background-image: 
        linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
        url('background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    filter: blur(2px);
}

h1 {
    color: #c8aa6e; 
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 42px;
    margin-bottom: 5px;
    text-shadow: 0 0 10px rgba(200, 170, 110, 0.3);
}

p.subtitle {
    color: #a0a0a0;
    margin-bottom: 30px;
    font-size: 14px;
}

/* --- ÍCONES SOCIAIS --- */
.social-icons {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 200; 
}

.social-icon {
    color: #a0a0a0;
    transition: transform 0.2s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-icon svg {
    width: 28px;
    height: 28px;
    fill: currentColor; 
}

.social-icon:hover {
    color: #c8aa6e; 
    transform: scale(1.1); 
}

@media (max-width: 600px) {
    .social-icons {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 20px;
    }
}

/* --- CONTAINER PRINCIPAL --- */
.container {
    width: 100%;
    max-width: 900px; /* Um pouco mais largo para caber tudo confortavelmente */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* --- BARRA DE PESQUISA --- */
.search-container {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
    max-width: 500px; 
}

input {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    background-color: #1e2328;
    border: 2px solid #3c3c3c;
    color: #f0f0f0;
    border-radius: 4px; 
    outline: none;
    transition: border-color 0.3s;
    text-align: center; 
}

input:focus {
    border-color: #c8aa6e; 
    box-shadow: 0 0 8px rgba(200, 170, 110, 0.2);
}

/* --- SUGESTÕES --- */
#suggestions {
    position: absolute;
    width: 100%;
    background-color: #1e2328;
    border: 1px solid #c8aa6e;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 100;
    border-radius: 0 0 4px 4px;
}

.suggestion-item {
    padding: 10px;
    cursor: pointer;
    text-align: left;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.suggestion-item:hover {
    background-color: #2a3138;
}

/* --- GRID DO JOGO (CABEÇALHO E LINHAS) --- */

/* Ordem Nova: 
   Foto | Gênero | Idade | País | Time | Função | Major | Região | Início
*/
.headers, .guess-row {
    display: grid;
    /* Tamanhos ajustados para caber tudo */
    grid-template-columns: 80px 0.8fr 0.6fr 1fr 1.2fr 1fr 0.6fr 1fr 0.8fr; 
    gap: 6px; 
    width: 100%;
    align-items: center; 
}

/* O resto do CSS continua igual, só certifique-se que o .container está largo o suficiente */
.container {
    width: 100%;
    max-width: 1200px; /* Aumentei para 1200px para caber 9 colunas */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Container dos resultados (com scroll fixo para não desalinhar) */
.results-container {
    display: flex;
    flex-direction: column;
    gap: 6px; 
    width: 100%;
    max-height: 60vh; /* Limita altura se tiver muitos palpites */
    overflow-y: auto; /* Permite rolar */
    
    /* MÁGICA DO ALINHAMENTO: Reserva espaço para a barra de rolagem sempre */
    scrollbar-gutter: stable; 
    padding-right: 4px; /* Um respiro visual */
}

/* O Cabeçalho também precisa respeitar esse espaço extra na direita para alinhar */
.headers {
    font-weight: bold;
    font-size: 12px; /* Fonte levemente menor para ficar elegante */
    color: #a0a0a0;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
    margin-bottom: 8px;
    text-align: center;
    
    /* Compensa o scrollbar-gutter do container de baixo para alinhar perfeitamente */
    padding-right: 14px; /* Aprox largura de uma scrollbar padrão */
}

.header-item {
    position: relative; 
    cursor: help;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-item:hover {
    color: #c8aa6e; 
}

/* Tooltips do Header */
.header-tooltip {
    visibility: hidden;
    width: 140px; 
    background-color: #111;
    color: #c8aa6e;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 1000;
    top: 140%; 
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 11px;
    font-weight: normal;
    text-transform: none;
    line-height: 1.4;
    border: 1px solid #c8aa6e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.header-tooltip::after {
    content: "";
    position: absolute;
    bottom: 100%; 
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent #c8aa6e transparent;
}

.header-item:hover .header-tooltip {
    visibility: visible;
    opacity: 1;
}

/* --- CAIXINHAS (BOXES) --- */
@keyframes flipIn {
    0% { transform: rotateX(90deg); opacity: 0; }
    100% { transform: rotateX(0deg); opacity: 1; }
}

.box {
    background-color: #1e2328; 
    border: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Fonte do texto dentro da caixa */
    font-weight: 600;
    height: 55px; /* Altura fixa para ficar padrão */
    word-break: break-word;
    opacity: 0;
    animation: flipIn 0.5s ease-out forwards;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    position: relative;
    border-radius: 4px; /* Cantos levemente arredondados */
}

/* Cores de Feedback */
.correct { background-color: #2cba52; border-color: #1a8a38; }
.incorrect { background-color: #cd2e3a; border-color: #961b24; }

/* Setas */
.arrow-up::after { content: "↑"; font-size: 16px; margin-left: 5px; display: inline-block; }
.arrow-down::after { content: "↓"; font-size: 16px; margin-left: 5px; display: inline-block; }

/* --- NÚMERO DA TENTATIVA --- */
.attempt-number {
    position: absolute;
    /* Ajustei para ficar bem visível fora da caixa */
    left: -30px; 
    top: 50%;
    transform: translateY(-50%); /* Centraliza verticalmente */
    
    font-size: 14px; 
    color: #888; 
    font-weight: bold;
    width: 25px; /* Largura fixa para alinhar */
    text-align: right; /* Alinha o número encostado na caixa */
}

/* Ajuste na caixa da foto para caber o número e o tooltip */
.player-info {
    position: relative;
    justify-content: center;
    padding: 0;
    cursor: help;
    background-color: transparent !important;
    border: none !important;
    overflow: visible; /* ESSENCIAL: Permite que o número apareça fora */
    
    /* Aumentei a margem esquerda para garantir espaço para o número */
    margin-left: 15px; 
}

.player-photo {
    width: 50px; /* Foto levemente maior */
    height: 50px;
    border: 2px solid #444;
    object-fit: cover;
    border-radius: 6px;
    transition: transform 0.2s;
}

.player-info.correct .player-photo {
    border-color: #2cba52; /* Borda verde na foto se acertar */
}

.player-info:hover .player-photo {
    transform: scale(1.1); /* Zoom ao passar o mouse */
}

/* Tooltip do Jogador */
.player-tooltip {
    visibility: hidden;
    width: auto;
    min-width: 80px;
    background-color: #111;
    color: #c8aa6e;
    text-align: center;
    border-radius: 4px;
    padding: 6px 10px;
    position: absolute;
    z-index: 1000;
    bottom: 110%; /* Acima da foto */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    border: 1px solid #c8aa6e;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.player-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #c8aa6e transparent transparent transparent;
}

.player-info:hover .player-tooltip {
    visibility: visible;
    opacity: 1;
}

.suggestion-photo {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- MENSAGEM DE VITÓRIA --- */
.victory-msg {
    margin-top: 25px;
    text-align: center;
    display: none;
    animation: flipIn 0.5s ease-out forwards;
    background: rgba(44, 186, 82, 0.1); /* Fundo verde bem suave */
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #2cba52;
    width: 100%;
}
.victory-title { color: #2cba52; font-size: 24px; font-weight: bold; margin-bottom: 5px; }
.victory-timer { color: #c8aa6e; font-size: 16px; }

/* --- LEGENDA --- */
.legend-container {
    margin-top: 40px;
    padding: 15px;
    background-color: #111316; 
    border: 1px solid #c8aa6e; 
    border-radius: 4px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.legend-title {
    color: white;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    font-family: serif; 
}

.legend-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-shadow: 1px 1px 2px black;
    border-radius: 4px;
}

.legend-label {
    font-size: 11px;
    color: #ccc;
    text-transform: uppercase;
}

.l-green { background-color: #2cba52; }
.l-orange { background-color: #e68c17; } 
.l-red { background-color: #cd2e3a; }

/* --- JOGADOR DE ONTEM --- */
.yesterday-box {
    margin-top: 20px;
    padding: 8px 20px;
    background-color: rgba(30, 35, 40, 0.8);
    border: 1px solid #444;
    border-radius: 50px; 
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: #b0b0b0;
    transition: border-color 0.3s;
}

.yesterday-box:hover {
    border-color: #c8aa6e; 
}

.y-photo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #c8aa6e;
}

.y-name {
    color: #c8aa6e;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- FOOTER --- */
.community-footer {
    margin-top: 30px;
    margin-bottom: 20px;
    padding: 20px;
    width: 100%;
    max-width: 650px;
    background-color: rgba(17, 19, 22, 0.95); 
    border-top: 3px solid #c8aa6e; 
    border-radius: 0 0 8px 8px; 
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
    color: #b0b0b0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

.furia-highlight {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    font-weight: bold;
    color: #c8aa6e; 
    text-transform: uppercase;
    letter-spacing: 1px;
}

.furia-highlight span { color: #fff; }

/* --- BOTÃO COLABORADORES (NOVO) --- */
.collaborators-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 300; /* Acima de tudo */
}

.collab-btn {
    background: transparent;
    border: 1px solid #c8aa6e; /* Borda Dourada */
    color: #c8aa6e;
    padding: 8px 15px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: bold;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    border-radius: 4px;
    letter-spacing: 1px;
}

.collab-btn:hover {
    background: #c8aa6e;
    color: #0f1215;
    box-shadow: 0 0 10px rgba(200, 170, 110, 0.4);
}

/* Lista Suspensa (Dropdown) */
.collab-list {
    display: none; /* Começa escondido */
    position: absolute;
    top: 45px; /* Logo abaixo do botão */
    left: 0;
    background-color: #1e2328;
    border: 1px solid #c8aa6e;
    border-radius: 4px;
    min-width: 220px;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
    overflow: hidden;
}

.collab-list.show {
    display: flex; /* Mostra quando o JS ativar */
    animation: fadeIn 0.3s ease;
}

.collab-list a {
    color: #f0f0f0;
    text-decoration: none;
    font-size: 13px;
    padding: 12px 15px;
    border-bottom: 1px solid #333;
    transition: background 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collab-list a:last-child {
    border-bottom: none;
}

.collab-list a:hover {
    background-color: #2a3138;
    color: #c8aa6e;
}

.collab-list span.role {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: bold;
    background: #111;
    padding: 2px 6px;
    border-radius: 4px;
}

/* --- ESTILOS DO MENU PRINCIPAL (HOME) --- */

.menu-grid {
    display: grid;
    grid-template-columns: 1fr; /* Uma coluna no celular */
    gap: 20px;
    width: 100%;
    max-width: 600px; /* Largura máxima do menu */
    margin-top: 20px;
}

/* O Cartão do Modo */
.menu-card {
    background-color: rgba(30, 35, 40, 0.9); /* Escuro levemente transparente */
    border: 2px solid #444; /* Borda cinza padrão */
    border-left: 5px solid #c8aa6e; /* Detalhe dourado na esquerda */
    padding: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    text-decoration: none; /* Tira sublinhado do link */
    transition: all 0.3s ease; /* Animação suave */
    position: relative;
    overflow: hidden;
}

/* Efeito ao passar o mouse */
.menu-card:hover {
    transform: translateX(10px); /* Move um pouco pra direita */
    border-color: #c8aa6e; /* Borda toda dourada */
    background-color: rgba(40, 45, 50, 1);
    box-shadow: 0 0 20px rgba(200, 170, 110, 0.2);
}

/* Ícone Redondo na esquerda */
.card-icon {
    width: 50px;
    height: 50px;
    background-color: #111;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #c8aa6e;
    margin-right: 20px;
    flex-shrink: 0; /* Impede o ícone de amassar */
}

.card-icon .material-icons {
    color: #c8aa6e;
    font-size: 28px;
}

/* Texto do Cartão */
.card-content {
    flex-grow: 1; /* Ocupa o espaço do meio */
}

.card-content h2 {
    color: #f0f0f0;
    font-size: 22px;
    margin: 0 0 5px 0;
    text-transform: uppercase;
    font-weight: 800;
    letter-spacing: 1px;
}

.card-content p {
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* Setinha na direita */
.card-arrow {
    color: #444;
    font-weight: bold;
    font-size: 20px;
    transition: color 0.3s;
}

.menu-card:hover .card-arrow {
    color: #c8aa6e;
}

/* Cartão Desabilitado (Em Breve) */
.menu-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    border-left-color: #444;
    filter: grayscale(1); /* Deixa preto e branco */
}

.menu-card.disabled:hover {
    transform: none;
    border-color: #444;
    box-shadow: none;
}

/* Responsivo para PC (2 colunas) */
@media (min-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr 1fr; /* Duas colunas lado a lado */
        max-width: 800px;
    }
}

/* --- LOGO LADO A LADO (SIDE BY SIDE) --- */

.main-logo-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Alinha o centro vertical do texto com a imagem */
    margin-bottom: 10px;
    gap: 15px; /* Espaço entre o texto e a Zeus */
    position: relative;
}

.logo-text {
    color: #c8aa6e; /* Volta a ser dourado normal */
    font-size: 60px; /* Tamanho do título */
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 0 0 15px rgba(200, 170, 110, 0.4);
    /* Removemos o stroke e transparência do modelo anterior */
    -webkit-text-stroke: 0; 
    opacity: 1;
}

.logo-image-side {
    max-width: 120px; /* Tamanho da Zeus (ajuste se quiser maior/menor) */
    height: auto;
    
    /* Um pouco de rotação para ficar estiloso */
    transform: rotate(-15deg); 
    
    /* Sombra para destacar */
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.5));
    transition: transform 0.3s ease;
}

/* Efeito Hover: A Zeus mexe quando passa o mouse no título */
.main-logo-container:hover .logo-image-side {
    transform: rotate(0deg) scale(1.1);
}

/* Ajuste para celular (empilhar se a tela for muito pequena) */
@media (max-width: 600px) {
    .main-logo-container {
        flex-direction: column; /* Um em cima do outro no celular */
        gap: 5px;
    }
    .logo-text { font-size: 40px; }
    .logo-image-side { max-width: 100px; transform: rotate(0deg); }
}

/* AJUSTE PARA CELULAR (Para não encavalar com o título) */
@media (max-width: 600px) {
    .social-icons {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 10px;
    }
    
    .collaborators-container {
        position: relative;
        top: auto;
        left: auto;
        margin-bottom: 20px;
    }
    
    .collab-list {
        left: 50%;
        transform: translateX(-50%);
    }
}