* { box-sizing: border-box; }
html, body { height: 100%; width: 100%; margin: 0; padding: 0; }
body { overflow-y: auto; }

.app-wrapper { height: 100%; width: 100%; display: flex; flex-direction: column; background: #f5f1e8; color: #1a1a1a; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

.header { padding: 2rem; text-align: center; border-bottom: 3px solid #000; }
.header h1 { margin: 0; font-size: 2.5rem; font-weight: 900; letter-spacing: 2px; color: #000; text-shadow: none; }
.header p { margin: 0.5rem 0 0 0; font-size: 1rem; color: #666; }

.nav-buttons { display: flex; gap: 1rem; justify-content: center; padding: 1.5rem; flex-wrap: wrap; }
.nav-btn { padding: 0.75rem 1.5rem; border: 2px solid #000; background: transparent; color: #000; font-weight: 600; cursor: pointer; border-radius: 4px; transition: all 0.3s; font-size: 0.95rem; }
.nav-btn:hover { background: #000; color: #f5f1e8; }
.nav-btn.active { background: #000; color: #f5f1e8; }

.content { flex: 1; overflow-y: auto; padding: 2rem; }

.puzzle-section { display: none; }
.puzzle-section.active { display: block; }

.crossword-layout { display: grid; grid-template-columns: auto 1fr; gap: 2rem; align-items: start; }
.crossword-grid { display: grid; grid-template-columns: repeat(var(--crossword-cols, 13), minmax(32px, 40px)); gap: 4px; margin: 2rem 0; max-width: 100%; overflow-x: auto; }
.crossword-cell { width: 40px; height: 40px; border: 2px solid #000; background: #fff; display: flex; align-items: center; justify-content: center; font-weight: bold; color: #000; font-size: 1rem; text-align: center; text-transform: uppercase; cursor: text; transition: all 0.2s; }
.crossword-cell:focus { outline: none; background: #f0f0f0; box-shadow: 0 0 8px #000; }
.crossword-cell.blocked { background: #000; border-color: #000; cursor: default; }
.crossword-cell.incorrect { background: #fee2e2; border-color: #ef4444; }

.clues-container { display: contents; }
.clues-section h3 { color: #000; font-size: 1.2rem; margin-bottom: 1rem; border-bottom: 2px solid #000; padding-bottom: 0.5rem; }
.clue { margin-bottom: 1rem; font-size: 0.95rem; }
.clue-num { color: #000; font-weight: bold; }

.wordle-container { max-width: 500px; margin: 2rem auto; }
.wordle-guesses { display: grid; gap: 0.5rem; margin-bottom: 2rem; }
.wordle-guess { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.5rem; }
.wordle-letter { width: 50px; height: 50px; border: 2px solid #000; background: #fff; color: #000; font-weight: bold; font-size: 1.2rem; display: flex; align-items: center; justify-content: center; text-transform: uppercase; cursor: text; }
.wordle-letter:focus { outline: none; border-color: #000; background: #f0f0f0; }
.wordle-letter.correct { background: #22c55e; border-color: #22c55e; color: #fff; }
.wordle-letter.present { background: #eab308; border-color: #eab308; color: #000; }
.wordle-letter.absent { background: #666; border-color: #666; color: #fff; }
.wordle-letter:disabled { background: #e5e7eb; color: #999; border-color: #ccc; cursor: not-allowed; }
.wordle-letter.correct:disabled { background: #22c55e; border-color: #22c55e; color: #fff; opacity: 1; }
.wordle-letter.present:disabled { background: #eab308; border-color: #eab308; color: #000; opacity: 1; }
.wordle-letter.absent:disabled { background: #666; border-color: #666; color: #fff; opacity: 1; }

.keyboard { display: grid; grid-template-columns: repeat(10, 1fr); gap: 0.4rem; margin: 2rem 0; grid-auto-rows: auto; }
.key.enter-key { grid-column: 9 / 11; }
.key { padding: 0.6rem; background: #fff; border: 2px solid #000; color: #000; cursor: pointer; border-radius: 4px; font-weight: 600; transition: all 0.2s; font-size: 0.85rem; }
.key:hover { background: #1a5f8a; }
.key.correct { background: #22c55e; color: #1a1a2e; border-color: #22c55e; }
.key.present { background: #eab308; color: #1a1a2e; border-color: #eab308; }
.key.absent { background: #444; color: #888; border-color: #444; opacity: 0.5; }

.message { padding: 1rem; margin: 1rem 0; border-radius: 4px; text-align: center; font-weight: 600; }
.message.success { background: #22c55e; color: #1a1a2e; }
.message.error { background: #ef4444; color: #fff; }

.quiz-question { margin-bottom: 2rem; padding: 1.5rem; background: #f5f1e8; border: 2px solid #000; border-radius: 4px; }
.quiz-question-text { font-weight: 700; color: #000; margin-bottom: 1rem; font-size: 1.1rem; }
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option { padding: 0.75rem 1rem; border: 2px solid #000; background: #fff; color: #000; cursor: pointer; border-radius: 4px; transition: all 0.2s; text-align: left; font-weight: 500; }
.quiz-option:hover { background: #000; color: #f5f1e8; }
.quiz-option.selected { background: #000; color: #f5f1e8; border-color: #000; }
.quiz-option.correct { background: #22c55e; border-color: #22c55e; color: #1a1a2e; }
.quiz-option.incorrect { background: #ef4444; border-color: #ef4444; color: #fff; }
.quiz-option:disabled { cursor: not-allowed; }

.quiz-progress { margin-bottom: 1.5rem; text-align: center; color: #000; font-weight: 600; }
.quiz-progress-bar { width: 100%; height: 8px; background: #e5e7eb; border-radius: 4px; margin-top: 0.5rem; overflow: hidden; }
.quiz-progress-fill { height: 100%; background: #000; transition: width 0.3s; }

.button-group { display: flex; gap: 1rem; justify-content: center; margin: 2rem 0; }
.btn { padding: 0.75rem 1.5rem; background: #000; color: #f5f1e8; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; transition: all 0.3s; }
.btn:hover { background: #333; }
.btn:disabled { background: #666; cursor: not-allowed; }

@keyframes fall {
to {
transform: translateY(100vh) rotateZ(360deg);
opacity: 0;
}
}

body { box-sizing: border-box; }

@media (max-width: 900px) {
.content { padding: 1rem; }
.crossword-layout { grid-template-columns: 1fr; }
.crossword-grid { grid-template-columns: repeat(var(--crossword-cols, 13), minmax(28px, 36px)); }
.crossword-cell { width: 36px; height: 36px; font-size: 0.9rem; }
.keyboard { grid-template-columns: repeat(7, 1fr); }
.key.enter-key { grid-column: span 2; }
}
