/* ============================================================
   PHP在线考试系统 - 前台样式
   青绿色系渐变UI，PC+H5自适应
   ============================================================ */

:root {
    --primary: #009688;
    --primary-light: #4db6ac;
    --primary-dark: #00796b;
    --primary-lighter: #e0f2f1;
    --gradient: linear-gradient(135deg, #009688 0%, #4db6ac 100%);
    --gradient-dark: linear-gradient(135deg, #00796b 0%, #009688 100%);
    --bg: #f0f4f8;
    --card-bg: #ffffff;
    --text: #263238;
    --text-secondary: #607d8b;
    --text-light: #90a4ae;
    --border: #e0e0e0;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #f44336;
    --info: #2196f3;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0, 150, 136, 0.08);
    --shadow-hover: 0 6px 20px rgba(0, 150, 136, 0.15);
    --shadow-lg: 0 8px 30px rgba(0, 150, 136, 0.12);
    --nav-height: 64px;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 14px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    display: block;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--gradient);
    box-shadow: 0 2px 10px rgba(0, 150, 136, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.navbar-container {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand:hover {
    color: #fff;
    opacity: 0.9;
}

.navbar-brand .logo-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    transition: var(--transition);
}

.navbar-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

.navbar-nav .btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: #fff;
}

.navbar-nav .btn-outline:hover {
    background: rgba(255, 255, 255, 0.15);
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-user .user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}

.navbar-user .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 16px;
    overflow: hidden;
}

.navbar-user .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
}

/* ============================================================
   主内容区
   ============================================================ */
.main-content {
    flex: 1;
    margin-top: var(--nav-height);
    padding: 24px;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

.page-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 24px 16px;
}

/* ============================================================
   卡片
   ============================================================ */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-body {
    padding: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ============================================================
   首页 - Hero区域
   ============================================================ */
.hero-section {
    background: var(--gradient);
    color: #fff;
    padding: 60px 24px;
    text-align: center;
    border-radius: 0 0 30px 30px;
    margin-bottom: 32px;
}

.hero-section h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 2px;
}

.hero-section p {
    font-size: 16px;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    max-width: 800px;
    margin: -40px auto 0;
    position: relative;
    z-index: 10;
}

.hero-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.hero-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 150, 136, 0.2);
    color: var(--text);
}

.hero-card .icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

.hero-card .icon.material {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-card .icon.exam {
    background: var(--gradient);
}

.hero-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.hero-card p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ============================================================
   区块标题
   ============================================================ */
.section-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 24px;
    background: var(--gradient);
    border-radius: 2px;
}

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

.section-header .section-title {
    margin-bottom: 0;
}

.section-header .more-link {
    color: var(--primary);
    font-size: 14px;
}

/* ============================================================
   列表网格
   ============================================================ */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* ============================================================
   资料卡片
   ============================================================ */
.material-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.material-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: var(--text);
}

.material-card .cover {
    width: 100%;
    height: 160px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 40px;
    overflow: hidden;
}

.material-card .cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.material-card .info {
    padding: 16px;
}

.material-card .info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card .info p {
    font-size: 13px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 12px;
    color: var(--text-light);
}

.material-card .tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-lighter);
    color: var(--primary);
    border-radius: 4px;
    font-size: 12px;
}

/* ============================================================
   考试卡片
   ============================================================ */
.exam-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.exam-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(2px);
}

.exam-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

.exam-card .desc {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.exam-card .meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.exam-card .meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.exam-card .status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-ended {
    background: #ffebee;
    color: #c62828;
}

.status-pending {
    background: #fff3e0;
    color: #e65100;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}

.btn-primary {
    background: var(--gradient);
    color: #fff;
}

.btn-primary:hover {
    background: var(--gradient-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 150, 136, 0.3);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #d32f2f;
    color: #fff;
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #388e3c;
    color: #fff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 13px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   表单
   ============================================================ */
.form-card {
    max-width: 440px;
    margin: 40px auto;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.form-card .form-header {
    background: var(--gradient);
    color: #fff;
    padding: 32px 24px;
    text-align: center;
}

.form-card .form-header h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-card .form-header p {
    font-size: 14px;
    opacity: 0.85;
}

.form-card .form-body {
    padding: 32px 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    transition: var(--transition);
    background: #fff;
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 150, 136, 0.1);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

/* ============================================================
   标签页
   ============================================================ */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
}

.tab {
    flex: 1;
    padding: 12px 16px;
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 3px solid transparent;
    transition: var(--transition);
    margin-bottom: -2px;
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* ============================================================
   提示消息
   ============================================================ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-danger {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}

.alert-warning {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffcc80;
}

.alert-info {
    background: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
}

/* ============================================================
   分页
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text);
    border: 1px solid var(--border);
    background: #fff;
    transition: var(--transition);
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pagination .active {
    background: var(--gradient);
    color: #fff;
    border-color: var(--primary);
}

.pagination .disabled {
    color: var(--text-light);
    cursor: not-allowed;
    background: #f5f5f5;
}

/* ============================================================
   考试答题页面
   ============================================================ */
.exam-header {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.exam-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.exam-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.exam-timer.warning {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    animation: pulse 1s infinite;
}

.exam-timer.danger {
    background: linear-gradient(135deg, #f44336 0%, #d32f2f 100%);
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.question-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
}

.question-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--gradient);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    margin-right: 8px;
}

.question-type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.question-type.single {
    background: #e3f2fd;
    color: #1565c0;
}

.question-type.multi {
    background: #fff3e0;
    color: #e65100;
}

.question-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    margin: 12px 0 16px;
    line-height: 1.6;
}

.question-score {
    float: right;
    color: var(--text-light);
    font-size: 13px;
    font-weight: normal;
}

.option-list {
    list-style: none;
}

.option-item {
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-item:hover {
    border-color: var(--primary-light);
    background: var(--primary-lighter);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.option-item.selected {
    border-color: var(--primary);
    background: var(--primary-lighter);
}

.option-label {
    font-size: 15px;
    color: var(--text);
    flex: 1;
}

.exam-sidebar {
    position: sticky;
    top: 80px;
}

.question-nav {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.question-nav h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

.question-nav-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.question-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--border);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text);
}

.question-nav-item:hover {
    border-color: var(--primary);
}

.question-nav-item.answered {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.question-nav-item.current {
    border-color: var(--primary);
    border-width: 3px;
}

/* ============================================================
   考试结果页
   ============================================================ */
.result-summary {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.result-score {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.2;
}

.result-score.pass {
    color: var(--success);
}

.result-score.fail {
    color: var(--danger);
}

.result-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.result-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.result-stat {
    text-align: center;
}

.result-stat .value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text);
}

.result-stat .label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.result-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 16px;
}

.result-badge.pass {
    background: #e8f5e9;
    color: #2e7d32;
}

.result-badge.fail {
    background: #ffebee;
    color: #c62828;
}

.answer-review {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 16px;
    border-left: 4px solid var(--border);
}

.answer-review.correct {
    border-left-color: var(--success);
}

.answer-review.wrong {
    border-left-color: var(--danger);
}

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

.answer-review .review-status {
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.answer-review .review-status.correct {
    background: #e8f5e9;
    color: #2e7d32;
}

.answer-review .review-status.wrong {
    background: #ffebee;
    color: #c62828;
}

.answer-review .review-answer {
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    font-size: 14px;
}

.answer-review .review-answer.your {
    background: #f5f5f5;
    color: var(--text);
}

.answer-review .review-answer.correct-answer {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ============================================================
   个人中心
   ============================================================ */
.profile-header {
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 24px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    border: 3px solid rgba(255, 255, 255, 0.3);
    flex-shrink: 0;
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-info h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.profile-info p {
    font-size: 14px;
    opacity: 0.85;
}

/* ============================================================
   表格
   ============================================================ */
.table-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: var(--primary-lighter);
    color: var(--primary-dark);
    font-weight: 600;
    font-size: 14px;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text);
}

.table tbody tr:hover {
    background: #fafafa;
}

.table .text-center {
    text-align: center;
}

/* ============================================================
   筛选栏
   ============================================================ */
.filter-bar {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-bar .form-control {
    width: auto;
    min-width: 160px;
}

/* ============================================================
   详情页
   ============================================================ */
.detail-header {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 20px;
}

.detail-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.detail-content {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 32px;
    font-size: 15px;
    line-height: 1.8;
    color: var(--text);
    min-height: 200px;
}

.detail-content h1,
.detail-content h2,
.detail-content h3 {
    margin: 20px 0 12px;
    color: var(--text);
}

.detail-content p {
    margin-bottom: 12px;
}

.detail-content img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 12px 0;
}

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

.empty-state .icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 16px;
}

/* ============================================================
   底部
   ============================================================ */
.footer {
    background: #263238;
    color: rgba(255, 255, 255, 0.6);
    padding: 24px;
    text-align: center;
    font-size: 13px;
    margin-top: auto;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
   工具类
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-muted { color: var(--text-light); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
   H5 移动端适配
   ============================================================ */
@media (max-width: 768px) {
    :root {
        --nav-height: 56px;
    }

    .navbar-container {
        padding: 0 12px;
    }

    .navbar-brand {
        font-size: 16px;
    }

    .navbar-nav {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 8px 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    .navbar-nav.show {
        display: flex;
    }

    .navbar-nav a {
        color: var(--text);
        padding: 12px 24px;
        border-radius: 0;
        width: 100%;
    }

    .navbar-nav a:hover {
        background: var(--primary-lighter);
    }

    .navbar-nav .btn-outline {
        border: none;
    }

    .navbar-user {
        gap: 8px;
    }

    .navbar-user .user-name {
        display: none;
    }

    .navbar-toggle {
        display: block;
    }

    .main-content {
        padding: 12px;
    }

    .page-container {
        padding: 12px 8px;
    }

    .hero-section {
        padding: 40px 16px;
        border-radius: 0 0 20px 20px;
    }

    .hero-section h1 {
        font-size: 24px;
    }

    .hero-section p {
        font-size: 14px;
    }

    .hero-cards {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: -30px;
    }

    .hero-card {
        padding: 20px 16px;
    }

    .hero-card .icon {
        width: 48px;
        height: 48px;
        font-size: 22px;
    }

    .hero-card h3 {
        font-size: 17px;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 18px;
    }

    .form-card {
        margin: 16px 8px;
    }

    .form-card .form-header {
        padding: 24px 16px;
    }

    .form-card .form-body {
        padding: 20px 16px;
    }

    .exam-header {
        padding: 16px;
    }

    .exam-header h2 {
        font-size: 16px;
    }

    .exam-timer {
        font-size: 16px;
        padding: 8px 16px;
    }

    .question-card {
        padding: 16px;
    }

    .question-title {
        font-size: 15px;
    }

    .option-item {
        padding: 10px 12px;
    }

    .exam-layout {
        flex-direction: column;
    }

    .exam-sidebar {
        position: static;
        order: -1;
    }

    .question-nav-grid {
        grid-template-columns: repeat(8, 1fr);
    }

    .result-summary {
        padding: 24px 16px;
    }

    .result-score {
        font-size: 42px;
    }

    .result-stats {
        gap: 20px;
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
    }

    .table {
        display: block;
        overflow-x: auto;
    }

    .filter-bar {
        padding: 12px;
    }

    .filter-bar .form-control {
        width: 100%;
    }

    .detail-content {
        padding: 16px;
        font-size: 14px;
    }

    .detail-header h1 {
        font-size: 20px;
    }

    .btn {
        padding: 8px 18px;
        font-size: 13px;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 14px;
    }

    .exam-card .meta {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 20px;
    }

    .question-nav-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .result-stats {
        flex-direction: column;
        gap: 12px;
    }
}
