/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1890ff;
    --primary-dark: #096dd9;
    --success: #52c41a;
    --warning: #faad14;
    --danger: #ff4d4f;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --text-dark: #333;
    --text-gray: #666;
    --text-light: #999;
    --border: #e8e8e8;
    --shadow: 0 2px 12px rgba(0,0,0,0.1);
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

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

/* 头部导航 */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary);
}

nav {
    display: flex;
    gap: 5px;
}

.nav-btn {
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-gray);
    font-size: 0.95rem;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.3s;
}

.nav-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

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

.date-time {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 主内容区 */
main {
    padding: 30px 20px;
    min-height: calc(100vh - 140px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 首页样式 */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 50px 30px;
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: 30px;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 50px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 快捷入口 */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.quick-card {
    background: var(--bg-white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.quick-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.quick-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.quick-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* 备考小贴士 */
.tips-section h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.tip-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.tip-card h4 {
    color: var(--primary);
    margin-bottom: 8px;
}

.tip-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* 区域头部 */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: var(--text-dark);
}

.filter-group {
    display: flex;
    gap: 10px;
}

.filter-group select {
    padding: 8px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--bg-white);
}

/* 题目列表 */
.question-list,
.case-list,
.shiti-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.question-card,
.case-card,
.shiti-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
}

.question-card:hover,
.case-card:hover,
.shiti-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.question-card {
    border-left: 4px solid var(--primary);
}

.case-card {
    border-left: 4px solid var(--success);
}

.shiti-card {
    border-left: 4px solid var(--warning);
}

.card-title {
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-tags {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.tag {
    padding: 3px 10px;
    background: var(--bg-light);
    color: var(--text-gray);
    font-size: 0.8rem;
    border-radius: 20px;
}

.tag-year {
    background: #e6f7ff;
    color: var(--primary);
}

/* 每日一练 */
.btn-refresh {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
}

.btn-refresh:hover {
    background: var(--primary-dark);
}

.daily-question {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.daily-question .question-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.daily-question .options {
    margin-bottom: 20px;
}

.daily-question .option-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: var(--bg-light);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.3s;
}

.daily-question .option-item:hover {
    background: #e6f7ff;
}

.daily-question .option-item.selected {
    background: var(--primary);
    color: white;
}

.daily-question .btn-primary {
    width: 100%;
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--text-dark);
}

.close-btn {
    width: 30px;
    height: 30px;
    border: none;
    background: var(--bg-light);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 50%;
    color: var(--text-gray);
}

.modal-body {
    padding: 20px;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* 按钮 */
.btn-primary {
    padding: 10px 25px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    padding: 10px 25px;
    background: var(--bg-light);
    color: var(--text-gray);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.95rem;
}

/* 答案样式 */
.answer-section {
    background: #f6ffed;
    border: 1px solid var(--success);
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 15px;
}

.answer-section h4 {
    color: var(--success);
    margin-bottom: 10px;
}

.answer-section p {
    color: var(--text-dark);
    line-height: 1.8;
}

/* 页脚 */
footer {
    background: var(--text-dark);
    color: white;
    padding: 25px 0;
    text-align: center;
    margin-top: 50px;
}

footer p {
    margin-bottom: 5px;
}

.footer-note {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 响应式 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        height: auto;
        padding: 15px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
        margin: 10px 0;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .date-time {
        display: none;
    }

    .hero {
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat-num {
        font-size: 1.8rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .modal-content {
        width: 95%;
        margin: 10px;
    }
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px;
    color: var(--text-light);
}

.empty-state p {
    margin-bottom: 15px;
}
