:root {
    --neon-gold: #FFD700;
    --neon-orange: #FF8C00;
    --dark-blue-bg: #000020;
    --container-bg: #101030;
    --text-color: #F0F0F0;
    --font-family: 'Inconsolata', 'Consolas', monospace;
}

body {
    background-color: var(--dark-blue-bg);
    color: var(--text-color);
    font-family: var(--font-family);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden; /* Prevent scrollbars */
}

.header {
    position: absolute; top: 15px; font-size: 1.1em;
    color: var(--neon-gold); text-shadow: 0 0 5px var(--neon-gold);
}

.game-container {
    width: 90%; max-width: 800px;
    background-color: var(--container-bg);
    padding: 20px; border-radius: 15px;
    border: 2px solid var(--neon-gold);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.3);
    text-align: center;
}

.game-title {
    color: var(--neon-orange); font-size: 2.5em; margin-bottom: 10px;
    text-shadow: 0 0 10px var(--neon-orange);
}

.stats-container {
    display: flex; justify-content: space-between;
    font-size: 1.5em; margin-bottom: 10px; padding: 0 10px;
}
#score, #high-score { color: var(--neon-gold); }
#lives { color: var(--neon-orange); }

#game-board {
    width: 100%; height: 500px;
    background-color: var(--dark-blue-bg);
    border: 2px solid var(--neon-gold);
    border-radius: 10px;
    position: relative; /* Crucial for positioning words */
    overflow: hidden; /* Hide words that go past the edge */
    margin-bottom: 20px;
}

.word {
    position: absolute;
    color: #fff;
    font-size: 1.8em;
    padding: 5px 10px;
    background-color: rgba(0,0,0,0.5);
    border-radius: 5px;
    white-space: nowrap; /* Prevent words from wrapping */
}

.input-area {
    display: flex;
}

#typing-input {
    flex-grow: 1; padding: 15px; font-size: 1.5em;
    background-color: var(--dark-blue-bg);
    border: 2px solid var(--neon-gold); border-radius: 8px;
    color: #fff; text-align: center;
    font-family: var(--font-family);
}
#typing-input:focus {
    outline: none;
    box-shadow: 0 0 15px var(--neon-gold);
}

/* Popup Styles */
.popup-container { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.9); justify-content: center; align-items: center; }
.popup-container.show { display: flex; }
.popup-box { background: var(--container-bg); padding: 40px; border-radius: 15px; text-align: center; border: 2px solid var(--neon-orange); box-shadow: 0 0 25px var(--neon-orange); }
#play-again-button { padding: 15px 30px; font-size: 1.2em; background-color: var(--neon-gold); color: var(--dark-blue-bg); border: none; border-radius: 8px; cursor: pointer; font-weight: bold; }