* { box-sizing: border-box; }
body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}
.game-container {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
    padding: 30px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.4);
    text-align: center;
    max-width: 450px;
    width: 90%;
}
h1 { margin: 0 0 5px; font-size: 2em; }
.subtitle { color: #a0aec0; margin: 0 0 20px; font-size: 0.9em; }
#scrambled {
    font-size: 2.5em;
    font-weight: bold;
    letter-spacing: 8px;
    margin: 20px 0;
    color: #68d391;
    text-shadow: 0 0 20px rgba(104,211,145,0.3);
    min-height: 60px;
}
#guess {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border: 2px solid #4a5568;
    border-radius: 10px;
    background: rgba(0,0,0,0.3);
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    outline: none;
    transition: border-color 0.2s;
}
#guess:focus { border-color: #68d391; }
#guess::placeholder { color: #718096; text-transform: none; letter-spacing: normal; }
.btn-row { display: flex; gap: 10px; justify-content: center; margin: 15px 0; }
.btn {
    padding: 12px 24px;
    font-size: 1em;
    background: #4a5568;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn:hover { background: #5a6578; transform: translateY(-2px); }
.btn.primary { background: #68d391; color: #1a1a2e; }
.btn.primary:hover { background: #48bb78; }
.btn.small { padding: 8px 16px; font-size: 0.9em; }
#message {
    min-height: 30px;
    font-size: 1.2em;
    font-weight: bold;
    margin: 15px 0;
}
#message.correct { color: #68d391; animation: pop 0.4s; }
#message.wrong { color: #fc8181; animation: shake 0.4s; }
.stats {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
}
.stat { text-align: center; }
.stat .label { display: block; font-size: 0.8em; color: #a0aec0; }
.stat .value { display: block; font-size: 1.5em; font-weight: bold; }
.stat .lives { color: #fc8181; }
.stat .timer { color: #f6e05e; }
.controls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
select {
    padding: 8px 16px;
    font-size: 0.9em;
    background: #4a5568;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 100;
}
.modal.hidden { display: none; }
.modal-content {
    background: #1a1a2e;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    min-width: 250px;
}
.modal-content h2 { margin-top: 0; }
.modal-content ul { list-style: none; padding: 0; margin: 20px 0; }
.modal-content li { padding: 8px; border-bottom: 1px solid #4a5568; }
.music-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(45,55,72,0.95);
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85em;
}
.music-controls button {
    padding: 6px 12px;
    margin: 2px;
    background: #4a5568;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}
.music-controls button:hover { background: #5a6578; }
.music-controls .song-name { color: #a0aec0; margin-top: 6px; font-size: 0.85em; }
@keyframes pop { 50% { transform: scale(1.1); } }
@keyframes shake { 25%,75% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.shake { animation: shake 0.4s; }
