/* 知识竞赛系统样式 - 避免与现有系统冲突 */

/* 竞赛列表卡片 */
.quiz-list-card {
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}

.quiz-list-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.quiz-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.quiz-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.quiz-info-item i {
    width: 20px;
    margin-right: 8px;
    color: #6c757d;
}

/* 竞赛详情 */
.quiz-detail-header {


    padding: 30px;
    border-radius: 10px;
    margin-bottom: 20px;

}

.quiz-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.quiz-stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.quiz-stat-value {
    font-size: 24px;
    font-weight: bold;
    display: block;
    color: #2a5298;
}

.quiz-stat-label {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    display: block;
}

/* 答题页面 */
.quiz-answer-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 计时器 */
.quiz-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 16px;
}

.quiz-timer-badge i {
    font-size: 18px;
    color: #6c757d;
    flex-shrink: 0;
}

.quiz-timer-badge:has(.quiz-timer.warning) {
    color: #ff9800;
}

.quiz-timer-badge:has(.quiz-timer.warning) i {
    color: #ff9800;
}

.quiz-timer-badge:has(.quiz-timer.danger) {
    color: #f44336;
    animation: timer-blink 1s ease-in-out infinite;
}

.quiz-timer-badge:has(.quiz-timer.danger) i {
    color: #f44336;
}

.quiz-timer {
    font-size: 20px;
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    letter-spacing: 1px;
    line-height: 1;
    display: inline-block;
}

/* 进度条包装 */
.quiz-progress-wrapper {
    width: 100%;
}

@keyframes timer-blink {
    0%, 100% { 
        opacity: 1;
    }
    50% { 
        opacity: 0.7;
    }
}

/* 题目导航 */
.quiz-nav-panel {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quiz-nav-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

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

.quiz-nav-item {
    width: 100%;
    padding: 8px;
    border: 2px solid #dee2e6;
    background: white;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 14px;
}

.quiz-nav-item:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 答题状态标识 */
.quiz-nav-item.answered {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.quiz-nav-item.current {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.quiz-nav-item.unanswered {
    background: white;
    border-color: #dee2e6;
    color: #495057;
}

/* 题目卡片 */
.quiz-question-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.quiz-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.quiz-question-number {
    font-size: 18px;
    font-weight: bold;
    color: #007bff;
}

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

.quiz-type-single {
    background: #28a745;
    color: white;
}

.quiz-type-multiple {
    background: #007bff;
    color: white;
}

.quiz-type-judge {
    background: #ffc107;
    color: #333;
}

.quiz-question-content {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #333;
}

.quiz-question-score {
    display: inline-block;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
    color: #6c757d;
}

/* 选项样式 */
.quiz-options-container {
    margin-top: 20px;
}

.quiz-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    margin-bottom: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-option:hover {
    border-color: #007bff;
    background: #f8f9ff;
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
    margin-top: 4px;
    margin-right: 12px;
    cursor: pointer;
}

.quiz-option-label {
    flex: 1;
    cursor: pointer;
    user-select: none;
}

.quiz-option-order {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: #e9ecef;
    border-radius: 50%;
    margin-right: 10px;
    font-weight: bold;
    font-size: 14px;
}

.quiz-option.selected {
    border-color: #007bff;
    background: #e7f3ff;
}

.quiz-option.selected .quiz-option-order {
    background: #007bff;
    color: white;
}

/* 成绩页面 */
.quiz-result-header {
    text-align: center;
    padding: 40px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 30px;
}

.quiz-result-score {
    font-size: 48px;
    font-weight: bold;
    margin: 20px 0;
}

.quiz-result-status {
    font-size: 24px;
    margin-bottom: 10px;
}

.quiz-result-status.passed {
    color: #28a745;
}

.quiz-result-status.failed {
    color: #dc3545;
}

.quiz-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.quiz-stat-card {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quiz-stat-number {
    font-size: 32px;
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.quiz-stat-number.correct {
    color: #28a745;
}

.quiz-stat-number.wrong {
    color: #dc3545;
}

.quiz-stat-number.accuracy {
    color: #007bff;
}

/* 答案解析 */
.quiz-answer-review {
    margin-top: 30px;
}

.quiz-review-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

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

.quiz-review-status {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.quiz-review-status.correct {
    background: #d4edda;
    color: #155724;
}

.quiz-review-status.wrong {
    background: #f8d7da;
    color: #721c24;
}

.quiz-option.correct-answer {
    border-color: #28a745;
    background: #d4edda;
}

.quiz-option.wrong-answer {
    border-color: #dc3545;
    background: #f8d7da;
}

.quiz-option.user-selected {
    position: relative;
}

.quiz-option.user-selected::before {
    content: "你的答案";
    position: absolute;
    top: -10px;
    right: 10px;
    background: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.quiz-explanation {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.quiz-explanation-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #007bff;
}

/* 答题记录列表 */
.quiz-record-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    transition: transform 0.2s;
}

.quiz-record-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

.quiz-record-status.completed {
    background: #28a745;
    color: white;
}

.quiz-record-status.in-progress {
    background: #007bff;
    color: white;
}

.quiz-record-status.timeout {
    background: #dc3545;
    color: white;
}

/* 按钮样式 */
.quiz-btn-primary {
    background: linear-gradient(135deg, #5189f0 0%, #1e68e9 100%);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
}

.quiz-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(42, 82, 152, 0.4);
    color: white;
}

.quiz-btn-submit {
    background: #28a745;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    color: white;
    font-weight: 500;
    transition: all 0.3s;
}

.quiz-btn-submit:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

/* 提示信息 */
.quiz-hint {
    padding: 12px 20px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    margin-bottom: 20px;
}

.quiz-hint i {
    margin-right: 8px;
    color: #856404;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .quiz-nav-panel {
        position: relative;
        top: 0;
        max-height: none;
        margin-bottom: 20px;
    }
    
    .quiz-nav-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quiz-stats-grid,
    .quiz-stats-row {
        grid-template-columns: 1fr;
    }
    
    .quiz-result-score {
        font-size: 36px;
    }
}

/* 动画 */
@keyframes quiz-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quiz-fade-in {
    animation: quiz-fade-in 0.5s ease-out;
}

/* 加载动画 */
.quiz-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: quiz-spin 1s linear infinite;
}

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

/* 进度条 */
.quiz-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.quiz-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 10px;
    transition: width 0.3s;
}

/* 题目状态图例 */
.quiz-legend {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.quiz-legend-item {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.quiz-legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    margin-right: 6px;
}

.quiz-legend-box.answered {
    background: #28a745;
}

.quiz-legend-box.current {
    background: #007bff;
}

.quiz-legend-box.unanswered {
    background: white;
    border: 2px solid #dee2e6;
}

/* 统计页面样式 */
/* 统计卡片 */
.quiz-stat-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.quiz-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.quiz-stat-card-body {
    padding: 24px;
    text-align: center;
}

.quiz-stat-card-value {
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 8px;
    line-height: 1;
}

.quiz-stat-card-label {
    font-size: 13px;
    color: #6c757d;
}

/* 统计卡片颜色变体 */
.quiz-stat-card-primary .quiz-stat-card-value {
    color: #5189f0;
}

.quiz-stat-card-success .quiz-stat-card-value {
    color: #28a745;
}

.quiz-stat-card-info .quiz-stat-card-value {
    color: #17a2b8;
}

.quiz-stat-card-warning .quiz-stat-card-value {
    color: #ffc107;
}

/* 简约表格样式 */
.quiz-simple-table {
    font-size: 14px;
}

.quiz-simple-table thead th {
    background: #ffffff;
    border-top: none;
    border-bottom: 2px solid #e9ecef;
    color: #495057;
    font-weight: 600;
    font-size: 13px;
    padding: 16px 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quiz-simple-table tbody td {
    padding: 14px 12px;
    vertical-align: middle;
    border-top: 1px solid #f0f0f0;
}

.quiz-simple-table tbody tr:hover {
    background-color: #f8f9fa;
}

.quiz-simple-table tbody tr:first-child td {
    border-top: none;
}


.quiz-leaderboard-card {
    border-bottom: 1px solid #e2e4e6;
}

