/* RESET E BASE */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 50px;
}

/* TELAS */
.screen { display: none; animation: fadeIn 0.3s ease-in-out; }
.screen.active { display: block; }

/* BOAS VINDAS */
.welcome-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}
.welcome-actions .btn-secondary {
    width: 100%; 
    flex: none;
    margin-top: 0;
}

/* INPUTS */
.input-group { margin-bottom: 20px; text-align: left; }
label { display: block; margin-bottom: 5px; font-weight: bold; color: #bdc3c7; }
input[type="text"], input[type="number"], select {
    width: 100%; padding: 12px; margin: 5px 0; border-radius: 8px;
    border: 1px solid #333; background-color: #2c3e50; color: #fff; font-size: 1rem; box-sizing: border-box;
}
input:focus, select:focus { outline: none; border-color: #e74c3c; background-color: #34495e; }

/* GRID DE CATEGORIAS */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.cat-btn {
    background-color: #34495e; color: #95a5a6;
    border: 1px solid #455a64; border-radius: 20px;
    padding: 8px 16px; font-size: 0.9rem; cursor: pointer;
    transition: all 0.2s; margin-top: 0; width: auto; flex: 0 1 auto;
}
.cat-btn.active {
    background-color: #27ae60; color: white; border-color: #2ecc71;
    font-weight: bold; box-shadow: 0 2px 5px rgba(46, 204, 113, 0.3);
}
.cat-btn:hover { transform: translateY(-2px); }

/* SETTINGS */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 20px; text-align: left; }

/* BOTÕES GERAIS */
button {
    background-color: #e74c3c; color: white; padding: 15px 20px; border: none; border-radius: 12px;
    font-size: 1.1rem; font-weight: bold; margin-top: 20px; cursor: pointer; width: 100%;
    transition: background-color 0.2s, transform 0.1s; box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
button:hover { background-color: #c0392b; }
button:active { transform: scale(0.98); }

/* UTILITÁRIOS */
.hidden { display: none !important; }
.highlight-name { color: #f1c40f; font-size: 2.5rem; margin: 20px 0; text-shadow: 0 2px 4px rgba(0,0,0,0.3); }
#secretWord { font-size: 3rem; color: #2ecc71; margin: 20px 0; word-break: break-word; }
.hint-text { color: #95a5a6; font-size: 0.9rem; margin-top: 10px; font-style: italic; background: rgba(255,255,255,0.05); padding: 5px 10px; border-radius: 20px; display: inline-block; }

/* VOTAÇÃO */
.voting-grid { display: flex; flex-direction: column; gap: 10px; }
.voting-grid button { background-color: #34495e; margin: 0; border: 1px solid #455a64; }
.voting-grid button:hover { background-color: #e74c3c; border-color: #c0392b; }

/* PLACAR */
.score-item {
    background: #2c3e50; padding: 15px; margin: 8px 0; border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center; border-left: 5px solid #e74c3c;
}
.score-item span { font-size: 1.1rem; }
.score-item strong { color: #f1c40f; font-size: 1.2rem; }
#word-reveal { background: rgba(231, 76, 60, 0.2); padding: 10px; border-radius: 8px; margin: 15px 0; border: 1px solid #e74c3c; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ADD JOGADOR */
.add-player-container { display: flex; gap: 10px; }
#newPlayerInput { flex: 1; margin: 0; }
#btnAdd { width: 60px; margin: 0; background-color: #27ae60; font-size: 1.5rem; padding: 0; display: flex; align-items: center; justify-content: center; }
.players-list { list-style: none; padding: 0; margin: 15px 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.player-tag { background-color: #34495e; padding: 8px 15px; border-radius: 20px; display: flex; align-items: center; gap: 10px; font-size: 1rem; border: 1px solid #455a64; animation: fadeIn 0.3s; }
.btn-remove { background: none; border: none; color: #e74c3c; font-weight: bold; cursor: pointer; font-size: 1.2rem; padding: 0; margin: 0; width: auto; box-shadow: none; }
.btn-remove:hover { color: #ff6b6b; background: none; }

/* MODAL E REGRAS */
.modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.9); display: flex; justify-content: center; align-items: center;
    z-index: 1000; animation: fadeIn 0.2s;
}
.modal-content {
    background-color: #2c3e50; padding: 30px; border-radius: 15px;
    width: 85%; max-width: 400px; border: 2px solid #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.4); text-align: center;
}
.rules-text {
    text-align: left; color: #bdc3c7; margin: 20px 0; font-size: 1rem; line-height: 1.5;
}
.rules-text hr { border: 0; border-top: 1px solid #455a64; margin: 15px 0; }
.rules-text strong { color: #fff; }

/* BOTÕES SECUNDÁRIOS */
.button-row { display: flex; gap: 10px; margin-top: 10px; }
.btn-secondary {
    background-color: transparent; border: 2px solid #7f8c8d; color: #bdc3c7;
    padding: 8px 15px; font-size: 0.9rem; width: auto; margin-top: 0; flex: 1;
    display: flex; justify-content: center; align-items: center;
}
.btn-secondary:hover { background-color: rgba(255, 255, 255, 0.1); color: #fff; border-color: #fff; }