.game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-color);
    z-index: 2000;
    display: none;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.game-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-main);
}

.game-progress-container {
    width: 100%;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    margin-bottom: 30px;
}

.game-progress-bar {
    height: 100%;
    background: var(--primary-color);
    border-radius: 5px;
    width: 0%;
    transition: width 0.3s ease;
}

.game-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
    text-align: center;
}

.game-question b {
    color: var(--primary-color);
    font-weight: 700;
}

body.dark-mode .game-question b {
    color: var(--primary-color);
}

.game-answer-area {
    min-height: 100px;
    width: 100%;
    border-bottom: 2px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-content: flex-start;
    padding: 10px;
    border-radius: 8px;
}

body.dark-mode .game-answer-area {
    background: rgba(255, 255, 255, 0.05);
}

.game-word-bank {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.game-word {
    padding: 10px 15px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    user-select: none;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--text-main);
}

.game-word:hover {
    background: var(--border-color);
}

.game-word.selected {
    opacity: 0.3;
    pointer-events: none;
}

.game-word.placed {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

body.dark-mode .game-word.placed {
    color: #000;
}

.game-controls {
    margin-top: 40px;
    width: 100%;
}

.game-check-btn {
    width: 100%;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
}

body.dark-mode .game-check-btn {
    color: #000;
}

.game-check-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.game-feedback {
    margin-top: 20px;
    font-weight: bold;
    height: 24px;
}

.game-feedback.correct { color: #4caf50; }
.game-feedback.wrong { color: #f44336; }

.game-finished {
    text-align: center;
}

.game-score {
    font-size: 3em;
    font-weight: bold;
    color: var(--primary-color);
    margin: 20px 0;
}
