/* --- BASE GERAL (Dark Mode) --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

header {
    margin-top: 40px;
    text-align: center;
}

h1 { font-size: 3rem; margin: 0; font-weight: 700; }
h1 span { color: #a8a8a8; }

.container {
    width: 90%;
    max-width: 500px;
    text-align: center;
    margin-top: 30px;
    padding-bottom: 50px;
}

/* --- FORMULÁRIOS E INPUTS --- */
input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    background-color: #2c2c2c;
    border: 2px solid #3e3e3e;
    color: white;
    border-radius: 8px;
    outline: none;
    box-sizing: border-box;
    margin-bottom: 10px;
}

input[type="text"]:focus { border-color: #6fcf97; }

/* Botão Padrão (Enviar Palavra) */
button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #6fcf97;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    transition: background 0.2s;
}
button:hover { background-color: #58b980; }

/* --- LISTA DE PALAVRAS E CARDS --- */
.word-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.guess-card {
    display: flex;
    justify-content: space-between;
    padding: 12px 20px;
    border-radius: 6px;
    background: #2c2c2c;
    border: 1px solid #333;
    font-weight: 500;
}

/* Cores dos Rankings */
.rank-green { background-color: #27ae60; color: white; border-color: #219150; }
.rank-yellow { background-color: #f1c40f; color: black; border-color: #d4ac0d; }
.rank-red { background-color: #c0392b; color: white; border-color: #a93226; }

/* --- ÁREA DE VITÓRIA --- */
.victory-container {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    padding: 40px 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.3);
    animation: popIn 0.5s ease-out;
    color: white;
}

.victory-title {
    /* CLAMP: Tamanho dinâmico (Mínimo 1.5rem, Ideal 5vw, Máximo 3rem) */
    font-size: clamp(1.5rem, 5vw, 3rem);
    font-weight: 900;
    color: #fff;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    line-height: 1.3; /* Espaçamento para não encavalar texto longo */
    text-shadow: 2px 2px 0px #1e8449;
    word-wrap: break-word;
}

.victory-subtitle {
    font-size: 1.2rem;
    color: #e8f8f5;
    margin: 0;
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* --- BOTÕES DE AÇÃO (Compartilhar / Jogar Novamente) --- */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap; /* Permite quebrar linha em telas muito pequenas */
}

.btn-reset {
    background-color: white;
    color: #27ae60;
    border: 2px solid white;
    flex: 1; /* Ocupa espaço igual */
}
.btn-reset:hover { background-color: #f0f0f0; border-color: #f0f0f0; }

.btn-share {
    background-color: #2980b9;
    color: white;
    border: 2px solid #2980b9;
    flex: 1; /* Ocupa espaço igual */
}
.btn-share:hover { background-color: #3498db; border-color: #3498db; }

/* --- ÁREA DE GABARITO E DICAS --- */
.gabarito-section {
    text-align: left;
}

/* Botão de Dica (Roxo) - Caso use no futuro */
.btn-hint {
    background-color: #8e44ad;
    color: white;
    border: 1px solid #732d91;
    border-radius: 20px;
    width: auto;
    padding: 8px 20px;
    font-size: 0.9rem;
}
.btn-hint:hover { background-color: #9b59b6; }

/* --- PAINEL ADMIN --- */
.admin-panel {
    background: #1e1e1e;
    padding: 20px;
    border-radius: 10px;
    margin-top: 50px;
    text-align: left;
}

.alert {
    padding: 15px;
    background: #2980b9;
    margin-bottom: 20px;
    border-radius: 5px;
    color: white;
    font-weight: bold;
}

/* Ajustes para Mobile */
@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    .victory-container { padding: 30px 15px; }
    .action-buttons { flex-direction: column; } /* Botões um embaixo do outro no celular */
}