:root {
    --primary-color: #4a90e2;
    --secondary-color: #f5f7fa;
    --success-color: #2ecc71;
    --error-color: #e74c3c;
    --text-color: #2c3e50;
    --card-bg: #ffffff;
    --border-radius: 12px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --accent-color: #f39c12;
}

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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    width: 100%;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2rem;
}

.mode-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
}

.mode-btn {
    padding: 10px 25px;
    border-radius: 25px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    font-size: 1rem;
}

.mode-btn.active {
    background-color: var(--primary-color);
    color: white;
}

.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.filter-section p {
    font-weight: bold;
    margin-bottom: 12px;
    color: #666;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.tag-item {
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f2f5;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.tag-item:hover {
    background: #e4e7eb;
}

.tag-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.status-bar {
    display: flex;
    justify-content: space-around;
    background: #fff;
    padding: 12px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.status-item {
    font-weight: bold;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.badge {
    background: var(--accent-color);
    color: white;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.card {
    background-color: var(--card-bg);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

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

.category-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: bold;
}

.difficulty-tag {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.question-text {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 30px;
    text-align: left;
    color: #333;
}

.options-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.option-btn {
    background-color: white;
    border: 2px solid #eaedf0;
    padding: 15px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.05rem;
    transition: all 0.2s;
    text-align: left;
}

.option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
    background-color: #f0f7ff;
}

.option-btn.correct {
    background-color: var(--success-color);
    color: white;
    border-color: var(--success-color);
}

.option-btn.wrong {
    background-color: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.feedback {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px dashed #eee;
    animation: fadeIn 0.4s ease;
}

.explanation-box {
    background-color: #f8fafc;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 1rem;
    border-left: 5px solid var(--accent-color);
}

.explanation-box p {
    margin-bottom: 8px;
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    font-weight: bold;
    transition: opacity 0.2s;
}

.primary-btn.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.primary-btn:hover {
    opacity: 0.9;
}

.stats-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 20px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-color);
}

.text-btn {
    background: none;
    border: none;
    color: #95a5a6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.9rem;
}

.hidden {
    display: none;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

footer {
    text-align: center;
    margin-top: 40px;
    font-size: 0.85rem;
    color: #bdc3c7;
}

@media (max-width: 600px) {
    .options-container {
        grid-template-columns: 1fr;
    }
}
