* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: system-ui, -apple-system, sans-serif;
    background: #f5f5f5;
    padding: 20px 20px 40px;
}

.container {
    width: 90%;
    max-width: 600px;
    text-align: center;
}

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

.chapters {
    position: relative;
    display: inline-block;
}

.chapters-btn {
    font-size: clamp(1rem, 4vw, 1.5rem);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.chapters-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 100;
    font-size: clamp(1rem, 4vw, 1.5rem);
}

.chapters-dropdown.show {
    display: block;
}

.chapter-option {
    padding: 10px 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.chapter-option:hover {
    background: #f5f5f5;
}

.chapter-option.active {
    color: #4CAF50;
    font-weight: bold;
    background: #e8f5e9;
}

.mode-btn {
    background: none;
    border: 2px solid #333;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: bold;
    transition: all 0.2s;
}

.mode-btn.hard {
    background: #333;
    color: white;
}

.lang-btn {
    background: none;
    border: 2px solid #333;
    border-radius: 20px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: clamp(0.8rem, 3vw, 1rem);
    font-weight: bold;
    transition: all 0.2s;
}

  .question {
    font-size: clamp(0.5rem, 6vw, 2.8rem);
    font-weight: bold;
    margin-bottom: 40px;
    color: #333;
    word-wrap: break-word;
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
}

.choice {
    padding: 20px 10px;
    font-size: clamp(1.2rem, 5vw, 2.5rem);
    font-weight: bold;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.choice:hover {
    border-color: #666;
    transform: scale(1.02);
}

.choice.correct {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.choice.incorrect {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.choice:disabled {
    cursor: not-allowed;
}

.hard-mode {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.answer-input {
    width: 100%;
    padding: 20px 10px;
    font-size: clamp(1.2rem, 5vw, 2.5rem);
    font-weight: bold;
    text-align: center;
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
}

.answer-input:focus {
    outline: none;
    border-color: #333;
}

.answer-input.correct {
    background: #4CAF50;
    border-color: #4CAF50;
    color: white;
}

.answer-input.incorrect {
    background: #f44336;
    border-color: #f44336;
    color: white;
}

.submit-btn {
    padding: 15px;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    border: 2px solid #333;
    border-radius: 10px;
    background: #333;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.submit-btn:hover {
    background: #555;
}

.submit-btn:disabled {
    background: #999;
    border-color: #999;
    cursor: not-allowed;
}

.hard-mode-buttons {
    display: flex;
    gap: 15px;
}

.hard-mode-buttons .submit-btn {
    flex: 1;
}

.help-btn {
    padding: 15px;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    border: 2px solid #2196F3;
    border-radius: 10px;
    background: #2196F3;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.help-btn:hover {
    background: #1976D2;
}

.answer-input.help {
    background: #BBDEFB;
    border-color: #2196F3;
    color: #1976D2;
}

.stats {
    margin-top: 40px;
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: clamp(0.8rem, 3vw, 1rem);
    background: #e0e0e0;
    color: #333;
    border-radius: 8px;
}

.stats-text {
    text-align: left;
}

.reset-btn {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
}

.reset-btn:hover {
    color: #333;
}

.stats-btn {
    background: none;
    border: none;
    color: #666;
    text-decoration: underline;
    cursor: pointer;
    font-size: inherit;
    margin-left: 10px;
}

.stats-btn:hover {
    color: #333;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.stats-table th, .stats-table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
}

.stats-table th {
    background: #333;
    color: white;
    white-space: nowrap;
}

.stats-table td:first-child {
    text-align: left;
    font-weight: bold;
}

.back-btn {
    padding: 15px 30px;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: bold;
    border: 2px solid #333;
    border-radius: 10px;
    background: #333;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #555;
}