:root {
    --bg: #0F172A;
    --card: #1E293B;
    --green: #22C55E;
    --purple: #8B5CF6;
    --lava: #F97316;
    --text: #E2E8F0;
    --muted: #94A3B8;
    --correct: #10B981;
    --wrong: #EF4444;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #0B1226, var(--bg));
    color: var(--text);
    min-height: 100vh;
    padding-bottom: 50px;
}

.nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: rgba(30, 41, 59, 0.8);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.nav-btn {
    color: var(--green);
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    color: var(--muted);
    font-size: 14px;
}

/* Home View */
.type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.type-card {
    background: var(--card);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.type-card:hover {
    transform: translateY(-5px);
    border-color: var(--green);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.type-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.type-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
}
.type-desc {
    font-size: 12px;
    color: var(--muted);
}

/* Question View */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.back-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: var(--text);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.back-btn:hover {
    background: rgba(255,255,255,0.2);
}

.progress {
    font-size: 14px;
    color: var(--green);
    font-weight: bold;
    background: rgba(34, 197, 94, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
}

.article-view {
    background: var(--card);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.15);
}

.article-view h2 {
    font-size: 22px;
    margin-bottom: 20px;
    text-align: center;
    color: var(--green);
}

.content {
    line-height: 1.8;
    margin: 20px 0;
    white-space: pre-line;
    font-size: 16px;
    color: #CBD5E1;
    background: rgba(0,0,0,0.2);
    padding: 20px;
    border-radius: 12px;
}

.question-block {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px dashed rgba(255,255,255,0.1);
}

.question-block:last-child {
    border-bottom: none;
}

.question-box {
    background: rgba(139, 92, 246, 0.1);
    border-left: 4px solid var(--purple);
    padding: 20px;
    border-radius: 0 12px 12px 0;
    margin: 15px 0;
}

.question-box strong {
    color: var(--purple);
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
}

/* 保证 A B C D 选项换行并且行距舒适 */
.question-box p {
    white-space: pre-wrap;
    line-height: 1.8;
    font-size: 15px;
}

.action-btn {
    background: var(--card);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.action-btn:hover {
    background: var(--green);
    color: #0F172A;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.3);
}

.secondary-btn {
    border-color: var(--purple);
    color: var(--purple);
}

.secondary-btn:hover {
    background: var(--purple);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.answer-analysis {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    white-space: pre-line;
    line-height: 1.8;
}

.analysis-title {
    color: var(--green);
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hidden {
    display: none !important;
}