:root {
    --bg: #0f172a;
    --p1: #f97316;
    --p2: #0ea5e9;
    --correct: #22c55e;
    --wrong: #ef4444;
    --text: #f8fafc;
}

body {
    font-family: 'Poppins', sans-serif;
    margin: 0; background: var(--bg); color: var(--text);
    overflow: hidden; height: 100vh;
}

.glow-text {
    font-family: 'Righteous', cursive;
    font-size: 3.5rem;
    color: #fff;
    text-shadow: 0 0 15px rgba(255,255,255,0.4);
    margin: 10px 0;
}

.main-wrapper { height: 100%; display: flex; justify-content: center; align-items: center; padding: 20px; box-sizing: border-box; }

.panel { background: rgba(255,255,255,0.05); padding: 40px; border-radius: 40px; border: 1px solid rgba(255,255,255,0.1); text-align: center; }

.setup-controls { display: flex; gap: 30px; margin: 30px 0; }
.control-box label { display: block; margin-bottom: 8px; font-weight: bold; color: var(--p2); }
select { padding: 12px; font-size: 1.1rem; border-radius: 10px; background: #1e293b; color: white; border: 2px solid var(--p2); }

.big-btn { padding: 18px 50px; font-size: 1.4rem; font-weight: bold; border-radius: 50px; border: none; cursor: pointer; transition: 0.3s; }
.start-btn { background: var(--correct); color: white; box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
.start-btn:disabled { background: #475569; cursor: not-allowed; box-shadow: none; }

.end-now-btn { background: var(--wrong); color: white; border: none; padding: 10px 25px; border-radius: 10px; font-weight: bold; cursor: pointer; font-size: 1rem; }

#game-area { width: 100%; height: 100%; display: flex; flex-direction: column; }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 30px; background: rgba(0,0,0,0.4); border-radius: 20px; margin-bottom: 20px; }
.timer-box { font-size: 3rem; font-family: 'Righteous'; color: #fbbf24; }

.players-container { display: flex; flex: 1; gap: 20px; }
.player-side { flex: 1; border-radius: 30px; padding: 25px; display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,0.03); border-bottom: 8px solid rgba(255,255,255,0.1); }
#p1-side { border-color: var(--p1); }
#p2-side { border-color: var(--p2); }

.player-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.p-name { font-size: 1.4rem; font-weight: bold; }
.score-badge { font-size: 2.2rem; font-family: 'Righteous'; }

.word-card { background: white; color: #0f172a; width: 100%; height: 160px; display: flex; justify-content: center; align-items: center; border-radius: 25px; margin-bottom: 25px; transition: 0.3s; }
.current-word { font-size: 3.2rem; font-weight: 700; text-transform: uppercase; text-align: center; }

.correct-flash { background: var(--correct) !important; color: white !important; transform: scale(1.03); }
.wrong-flash { background: var(--wrong) !important; color: white !important; }

.options-grid { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; }
.options-grid button { padding: 22px; font-size: 1.4rem; border-radius: 18px; border: none; background: #1e293b; color: white; cursor: pointer; border: 2px solid transparent; }

.modal { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.98); z-index: 100; justify-content: center; align-items: center; }
.modal-content { background: #1e293b; padding: 30px; border-radius: 40px; width: 95%; height: 90%; display: flex; flex-direction: column; align-items: center; border: 2px solid var(--p2); }
.final-score-row { display: flex; justify-content: center; gap: 50px; font-size: 3.5rem; font-family: 'Righteous'; margin: 10px 0; }
.p1-res { color: var(--p1); }
.p2-res { color: var(--p2); }

.result-scroll-area { flex: 1; width: 100%; overflow-y: auto; padding: 20px; background: rgba(0,0,0,0.3); border-radius: 20px; margin-bottom: 20px; }
#word-list-container { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 15px; }

.word-item-card { 
    background: #334155; padding: 25px; border-radius: 15px; cursor: pointer; 
    transition: 0.3s; text-align: center; font-size: 1.4rem; border-left: 6px solid var(--p2);
}
.word-item-card .tr-text { color: #fbbf24; display: none; font-weight: bold; margin-top: 10px; border-top: 1px solid #475569; padding-top: 5px; }
.word-item-card.revealed .tr-text { display: block; animation: slideDown 0.3s; }

@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.reload-btn { background: var(--p2); color: white; }