/* ========== 全局样式 ========== */
:root {
    --primary-color: #0d6efd;
    --primary-light: #e7f1ff;
}

body {
    background-color: #f5f7fa;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.nav-spacer {
    height: 60px;
}

/* ========== 导航栏 ========== */
.navbar-brand {
    font-size: 1.25rem;
}

/* ========== 卡片 ========== */
.card {
    border-radius: 0.75rem;
}

.quick-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.12) !important;
}

/* ========== 答题选项 ========== */
.cursor-pointer {
    cursor: pointer;
    transition: all 0.15s;
}
.cursor-pointer:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-color) !important;
}

.answer-option label,
.exam-option,
.exam-option-multiple {
    transition: all 0.15s;
}

.answer-option label:hover,
.answer-option label.selected,
.exam-option.selected,
.exam-option-multiple.selected {
    background-color: var(--primary-light) !important;
    border-color: var(--primary-color) !important;
}

.answer-option label.selected,
.exam-option.selected,
.exam-option-multiple.selected {
    border-width: 2px !important;
    font-weight: 600;
}

/* ========== 倒计时动画 ========== */
.blink {
    animation: blink 1s infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========== 表格 ========== */
.table > :not(caption) > * > * {
    padding: 0.6rem 0.75rem;
}

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1020;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* ========== 表单 ========== */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ========== 移动端优化 ========== */
@media (max-width: 768px) {
    .nav-spacer {
        height: 56px;
    }

    .card {
        border-radius: 0.5rem;
    }

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    h4 {
        font-size: 1.1rem;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1rem;
    }

    /* 移动端导航栏菜单 */
    .navbar-collapse {
        max-height: 60vh;
        overflow-y: auto;
    }

    .navbar-nav {
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    /* 小屏幕进一步压缩 */
    .card-body {
        padding: 0.75rem;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .table {
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.8rem;
    }
}

/* ========== 知识点树缩进 ========== */
.ms-3 {
    margin-left: 1.25rem !important;
}

/* ========== 图标按钮 ========== */
.btn-outline-primary:active,
.btn-outline-danger:active,
.btn-outline-success:active {
    transform: scale(0.95);
}

/* ========== 进度条动画 ========== */
.progress-bar {
    transition: width 0.5s ease;
}
