/* 
 * 刷题系统前台样式
 * 响应式设计，移动端优先
 */

/* 主体布局 */
.main-content {
    padding-bottom: 70px;
}

@media (min-width: 992px) {
    .main-content {
        padding-bottom: 20px;
    }
}

/* 渐变背景 */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* 文字截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.min-w-0 {
    min-width: 0;
}

/* 科目卡片 */
.subject-card {
    transition: transform 0.2s, box-shadow 0.2s;
    border-radius: 12px;
}

.subject-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.subject-icon {
    min-width: 48px;
    min-height: 48px;
}

/* 选项样式 */
.option-item {
    cursor: pointer;
    transition: all 0.15s ease;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    user-select: none;
}

.option-item:hover {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.05);
}

.option-item.selected,
.option-item.border-primary {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.08);
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.option-item:has(input:checked) {
    border-color: #0d6efd;
    background-color: rgba(13, 110, 253, 0.08);
}

/* 答对选项 */
.option-item.border-success {
    border-color: #198754 !important;
    background-color: rgba(25, 135, 84, 0.08) !important;
}

/* 答错选项 */
.option-item.border-danger {
    border-color: #dc3545 !important;
    background-color: rgba(220, 53, 69, 0.08) !important;
}

/* 选项结果标记图标 */
.option-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* 题目内容 */
.question-content {
    line-height: 1.8;
    font-size: 1rem;
    word-break: break-word;
}

/* 底部导航 */
#bottomNav {
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.08);
    padding: 4px 0;
}

#bottomNav .nav-link {
    font-size: 12px;
    padding: 6px 8px;
    color: #6c757d;
    transition: color 0.2s;
}

#bottomNav .nav-link.text-primary {
    color: #0d6efd !important;
}

#bottomNav .nav-link:hover {
    color: #0d6efd;
}

#bottomNav .nav-link i {
    font-size: 20px;
    margin-bottom: 1px;
}

/* 考试卡片 */
.exam-card {
    transition: transform 0.2s;
    border-radius: 12px;
}

.exam-card:hover {
    transform: translateY(-2px);
}

/* 功能按钮卡片 */
.func-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.func-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.func-icon {
    transition: transform 0.2s;
}

.func-card:hover .func-icon {
    transform: scale(1.1);
}

/* 进度条 */
.progress {
    height: 4px;
    border-radius: 4px;
}

/* 分页 */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    font-size: 13px;
    padding: 4px 10px;
}

/* Toast提示 */
.toast-container {
    z-index: 99999;
}

/* 卡片圆角统一 */
.card {
    border-radius: 12px;
}

/* 小屏幕适配 */
@media (max-width: 576px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .question-content {
        font-size: 0.95rem;
    }
    
    .option-item {
        padding: 10px 12px !important;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 8px 16px;
    }
}

/* 列表样式 */
.list-group-item {
    border-color: #f0f0f0;
}

/* Badge统一样式 */
.badge {
    font-weight: 500;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
}

/* 平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* 禁用选择 */
.noselect {
    user-select: none;
    -webkit-user-select: none;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* 答题卡固定在桌面端右侧 */
@media (min-width: 992px) {
    .card-body .btn-sm[style*="width:36px"] {
        width: 38px !important;
        height: 38px !important;
    }
}
