/* ========================================
   English Vocabulary Game - Eye-care Dark Mode
   ======================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root { --bg-primary: #1e1e2e; --bg-secondary: #2c3e50; --success-color: #4ade80; --error-color: #f87171; --glass-bg: rgba(255, 255, 255, 0.08); --glass-border: rgba(255, 255, 255, 0.12); --text-primary: #f1f5f9; --text-secondary: rgba(241, 245, 249, 0.7); --shadow-light: 0 8px 32px rgba(0, 0, 0, 0.2); --shadow-medium: 0 15px 40px rgba(0, 0, 0, 0.3); }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif; min-height: 100vh; overflow-x: hidden; color: var(--text-primary); background: var(--bg-primary); }
.bg-gradient { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%); z-index: -1; }
.status-bar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 15px 25px; background: rgba(0, 0, 0, 0.3); backdrop-filter: blur(10px); z-index: 100; }
.question-progress { font-size: 1rem; font-weight: 600; color: var(--text-secondary); }
.score-container { display: flex; align-items: center; gap: 6px; }
.score-label { font-size: 0.9rem; color: var(--text-secondary); }
.score-value { font-size: 1.5rem; font-weight: bold; color: var(--success-color); }
.score-total { font-size: 1rem; color: var(--text-secondary); }
.progress-bar { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: rgba(255, 255, 255, 0.1); }
.progress-fill { height: 100%; width: 0%; background: var(--success-color); transition: width 0.5s ease; }
.glass-card { background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--glass-border); border-radius: 20px; box-shadow: var(--shadow-medium); padding: 40px; max-width: 520px; width: 90%; }
.game-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 80px 20px 20px; }
.screen { display: none; width: 100%; justify-content: center; }
.screen.active { display: flex; }
.game-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 8px; color: var(--text-primary); }
.game-subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 35px; font-size: 1rem; }
.unit-selector { margin-bottom: 30px; }
.unit-selector label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 0.9rem; color: var(--text-secondary); }
.unit-select { width: 100%; padding: 15px 20px; font-size: 1rem; border: 1px solid var(--glass-border); border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: var(--text-primary); cursor: pointer; transition: all 0.3s ease; appearance: none; }
.unit-select:focus { outline: none; border-color: var(--success-color); background-color: rgba(255, 255, 255, 0.08); }
.unit-select option { background: var(--bg-secondary); color: var(--text-primary); }
.btn-start, .btn-restart { width: 100%; padding: 16px 30px; font-size: 1.1rem; font-weight: 600; color: #1e1e2e; background: var(--success-color); border: none; border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; transition: all 0.2s ease; }
.btn-start:hover, .btn-restart:hover { background: #86efac; transform: translateY(-2px); }
.btn-start:active, .btn-restart:active { transform: translateY(0); }
.question-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.unit-badge { background: rgba(74, 222, 128, 0.2); color: var(--success-color); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; }
.question-number { font-size: 0.9rem; color: var(--text-secondary); }
.question-content { text-align: center; margin-bottom: 30px; }
.story-text { font-size: 1.25rem; line-height: 1.8; margin-bottom: 20px; color: var(--text-primary); padding: 20px; background: rgba(255, 255, 255, 0.03); border-radius: 12px; border-left: 3px solid var(--success-color); }
.hint-btn { padding: 10px 20px; font-size: 0.9rem; font-weight: 500; color: var(--text-secondary); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--glass-border); border-radius: 20px; cursor: pointer; transition: all 0.2s ease; margin-bottom: 15px; }
.hint-btn:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-primary); }
.hint-btn.hidden { display: none; }
.hint-text { font-size: 1rem; color: #fbbf24; font-style: italic; padding: 12px 20px; background: rgba(251, 191, 36, 0.1); border-radius: 10px; margin-top: 10px; }
.hint-text.hidden { display: none; }
.options-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.option-btn { padding: 18px 15px; font-size: 1rem; font-weight: 600; color: var(--text-primary); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; cursor: pointer; transition: all 0.15s ease; }
.option-btn:hover { background: rgba(255, 255, 255, 0.15); border-color: rgba(255, 255, 255, 0.25); transform: scale(1.02); }
.option-btn.correct { background: var(--success-color) !important; border-color: var(--success-color) !important; color: #1e1e2e !important; }
.option-btn.wrong { background: var(--error-color) !important; border-color: var(--error-color) !important; color: #1e1e2e !important; }
.feedback-overlay { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0); z-index: 200; pointer-events: none; transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); }
.feedback-overlay.show { transform: translate(-50%, -50%) scale(1); }
.feedback-content { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 50px; background: rgba(0, 0, 0, 0.85); backdrop-filter: blur(10px); border-radius: 16px; }
.feedback-icon { font-size: 3.5rem; }
.feedback-text { font-size: 1.3rem; font-weight: bold; }
.feedback-content.correct { background: rgba(74, 222, 128, 0.9); color: #1e1e2e; }
.feedback-content.wrong { background: rgba(248, 113, 113, 0.9); color: #1e1e2e; }
.error-flash { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(248, 113, 113, 0.2); pointer-events: none; opacity: 0; z-index: 150; transition: opacity 0.1s ease; }
.error-flash.show { opacity: 1; }
.result-card { text-align: center; }
.result-icon { font-size: 4.5rem; margin-bottom: 15px; }
.result-title { font-size: 1.8rem; margin-bottom: 20px; color: var(--text-primary); }
.result-stats { display: flex; justify-content: center; margin-bottom: 15px; }
.final-score-display { display: flex; align-items: baseline; gap: 4px; }
.final-score-display .stat-value { font-size: 4rem; font-weight: 800; color: var(--success-color); }
.final-score-display .stat-total { font-size: 1.5rem; color: var(--text-secondary); }
.result-message { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 30px; }
@media (max-width: 500px) { .glass-card { padding: 25px; } .game-title { font-size: 1.6rem; } .story-text { font-size: 1.1rem; padding: 15px; } .options-grid { grid-template-columns: 1fr; } .option-btn { padding: 16px; } .final-score-display .stat-value { font-size: 3rem; } }