/* 刷题系统自定义样式 */

/* 验证码图片样式 */
.captcha-image {
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 10px;
}

.captcha-image:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.captcha-container {
    position: relative;
    display: inline-block;
}

.captcha-container::after {
    content: "点击刷新";
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    color: #666;
    pointer-events: none;
}

/* 基础样式 */
:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition-fast: all 0.15s ease-in-out;
    --transition-normal: all 0.3s ease-in-out;
}

/* 全局样式 */
body {
    font-family: 'Segoe UI', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f5f6fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: var(--transition-fast);
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition-normal);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

/* 统计卡片样式 */
.stats-card {
    transition: var(--transition-normal);
    cursor: pointer;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
}

.stats-card .card-body {
    padding: 1.5rem;
}

.stats-card h4 {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* 题目卡片样式 */
.question-card {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--box-shadow);
}

.question-card h4 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

/* 选项样式 */
.form-check {
    padding-left: 1.8rem;
    margin-bottom: 1rem;
}

.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-left: -1.8rem;
    margin-top: 0.2em;
}

.form-check-label {
    font-size: 1.1rem;
    line-height: 1.5;
    cursor: pointer;
    transition: var(--transition-fast);
}

.form-check-label:hover {
    color: var(--primary-color);
}

/* 按钮样式增强 */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.2rem;
    transition: var(--transition-fast);
}

.btn-custom {
    margin: 0.25rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

/* 徽章样式 */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5em 0.8em;
    border-radius: var(--border-radius);
}

/* 进度条样式 */
.progress {
    height: 1.2rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: inset 0 0.1rem 0.1rem rgba(0, 0, 0, 0.1);
}

.progress-bar {
    transition: width 0.6s ease;
}

/* 表格样式 */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background-color: white;
}

.table thead th {
    background-color: var(--light-color);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

/* 分页样式 */
.pagination {
    border-radius: var(--border-radius);
}

.page-link {
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    transition: var(--transition-fast);
}

.page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* 警告框样式 */
.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid;
    box-shadow: var(--box-shadow);
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.1);
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.1);
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(23, 162, 184, 0.1);
}

/* 模态框样式 */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 2px solid #dee2e6;
    background-color: var(--light-color);
}

/* 页脚样式 */
.footer {
    background-color: var(--light-color);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid #dee2e6;
}

/* 首页大标题区域 */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--secondary-color);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .stats-card h4 {
        font-size: 1.5rem;
    }
    
    .question-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .form-check-label {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .btn-custom {
        margin: 0.125rem;
    }
}

/* 工具类 */
.border-left-primary {
    border-left: 4px solid var(--primary-color) !important;
}

.border-left-success {
    border-left: 4px solid var(--success-color) !important;
}

.border-left-danger {
    border-left: 4px solid var(--danger-color) !important;
}

.border-left-warning {
    border-left: 4px solid var(--warning-color) !important;
}

.border-left-info {
    border-left: 4px solid var(--info-color) !important;
}

.text-shadow {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

/* 打印样式 */
@media print {
    .navbar, .footer, .btn, .pagination {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
    }
}
