/* ========== 全局样式 ========== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.navbar-brand { font-size: 1.5rem; font-weight: 700; }
.nav-link { font-weight: 500; transition: all 0.3s ease; }
.nav-link:hover { transform: translateY(-2px); }
.nav-link.active { font-weight: 700; }

/* 轮播图样式 */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, #6610f2 100%);
    min-height: 400px;
    display: flex;
    align-items: center;
}
.carousel-item { min-height: 400px; }

/* 卡片悬停效果 */
.hover-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #dee2e6;
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

/* 按钮样式 */
.btn { border-radius: 5px; font-weight: 500; transition: all 0.3s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); }
.btn-sm { border-radius: 3px; }

/* 卡片样式 */
.card {
    border-radius: 10px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}
.card:hover { box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); }
.card-title { font-weight: 600; color: #212529; }

/* 页面标题区域 */
.breadcrumb { background-color: transparent; padding: 0; margin-top: 0.5rem; }
.breadcrumb-item a { color: var(--primary-color); text-decoration: none; }
.breadcrumb-item.active { color: var(--secondary-color); }

/* 图标尺寸 */
.display-5 { font-size: 2.5rem; }
.display-6 { font-size: 2rem; }

/* 标签页样式 */
.nav-tabs .nav-link { color: #495057; font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--primary-color); font-weight: 700; }
.nav-pills .nav-link { color: #495057; font-weight: 500; margin: 0 0.25rem; }
.nav-pills .nav-link.active { background-color: var(--primary-color); color: white; }

/* 徽章样式 */
.badge { padding: 0.35rem 0.65rem; font-size: 0.75rem; font-weight: 600; }

/* 表单样式 */
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25); }
.input-group-text { background-color: #f8f9fa; border-right: none; }

/* 表格样式 */
.table th { font-weight: 600; background-color: #f8f9fa; }
.table-hover tbody tr:hover { background-color: rgba(13, 110, 253, 0.05); }

/* 页脚样式 */
footer { margin-top: auto; }
footer a:hover { color: white !important; }

/* 模态框样式 */
.modal-header { background-color: var(--primary-color); color: white; }
.modal-header .btn-close { filter: invert(1); }

/* 列表组样式 */
.list-group-item-action { transition: all 0.3s ease; }
.list-group-item-action:hover { background-color: #f8f9fa; }
.list-group-item.active { background-color: var(--primary-color); border-color: var(--primary-color); }

/* 警告框 */
.alert-info { background-color: #e7f3ff; border-color: #b3d9ff; color: #004085; }

/* 分页样式 */
.pagination .page-link { color: var(--primary-color); border-radius: 5px; margin: 0 3px; }
.pagination .page-item.active .page-link { background-color: var(--primary-color); border-color: var(--primary-color); }
.pagination .page-link:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }

/* 加载动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.5s ease-in-out; }

/* 平滑滚动 */
html { scroll-behavior: smooth; }

/* 自定义滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #888; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }

/* 工具提示 */
.tooltip-inner { background-color: #333; border-radius: 4px; padding: 0.5rem 1rem; }

/* 空状态 */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state i { font-size: 4rem; color: #dee2e6; margin-bottom: 1rem; }

/* 价格样式 */
.price { color: var(--danger-color); font-weight: 700; font-size: 1.25rem; }
.price-original { text-decoration: line-through; color: #999; font-size: 0.9rem; margin-left: 0.5rem; }

/* 统计数字 */
.stat-number { font-size: 2rem; font-weight: 700; color: var(--primary-color); }
.stat-label { font-size: 0.875rem; color: var(--secondary-color); }

/* 标签 */
.tag { display: inline-block; padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 600; border-radius: 3px; margin-right: 0.5rem; margin-bottom: 0.5rem; }

/* 头像 */
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 80px; height: 80px; }

/* 进度条 */
.progress { height: 8px; border-radius: 4px; background-color: #e9ecef; }
.progress-bar { background-color: var(--primary-color); border-radius: 4px; }

/* 手型指针 */
.cursor-pointer { cursor: pointer; }

/* 文本截断 */
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-truncate-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ========== 在线测试样式 ========== */
.question-container { min-height: 400px; }
.option-item {
    cursor: pointer; transition: all 0.3s ease;
    padding: 15px; margin-bottom: 10px;
    border: 2px solid #dee2e6; border-radius: 8px;
}
.option-item:hover { background-color: #f8f9fa; border-color: var(--primary-color); }
.option-item.selected { background-color: #e7f3ff; border-color: var(--primary-color); }
.option-item.correct { background-color: #d1e7dd; border-color: var(--success-color); }
.option-item.wrong { background-color: #f8d7da; border-color: var(--danger-color); }

.sidebar-item { cursor: pointer; transition: all 0.3s ease; }
.sidebar-item:hover { background-color: #f8f9fa; }
.sidebar-item.active { background-color: #e7f3ff; border-left: 3px solid var(--primary-color); }

.progress-bar-custom { transition: width 0.5s ease; }
.note-textarea { resize: vertical; min-height: 100px; }
.timer { font-size: 1.2rem; font-weight: bold; }
.btn-submit { font-weight: 600; padding: 0.5rem 1.5rem; }

/* 响应式 */
@media (max-width: 768px) {
    .hero-banner { min-height: 300px; }
    .hero-banner h1 { font-size: 1.75rem; }
    .hero-banner .lead { font-size: 1rem; }
    .carousel-item { min-height: 300px; }
    .display-5 { font-size: 2rem; }
    .display-6 { font-size: 1.75rem; }
    .navbar-brand { font-size: 1.25rem; }
    section { padding: 2rem 0; }
    .card { margin-bottom: 1rem; }
}
@media (max-width: 576px) {
    .hero-banner { min-height: 250px; }
    .hero-banner h1 { font-size: 1.5rem; }
    .btn-lg { font-size: 0.9rem; padding: 0.5rem 1rem; }
    .container { padding-left: 15px; padding-right: 15px; }
}
