/* 答题卡组件样式 - [屏蔽标记] 暂时隐藏答题卡 */

/* 答题卡容器 */
.answer-card-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2000;
    /* [屏蔽标记] 暂时隐藏答题卡 */
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* 切换按钮 */
.answer-card-toggle {
    position: fixed;
    top: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    backdrop-filter: blur(8px);
    color: #6b7280;
    z-index: 2001;
    opacity: 1;
    visibility: visible;
}

.answer-card-toggle:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #3b82f6;
    color: #3b82f6;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.answer-card-toggle:active {
    transform: scale(0.95);
}

/* 侧边栏打开时隐藏切换按钮 */
.answer-card-container.visible .answer-card-toggle {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* 答题卡徽章 */
.answer-card-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 11px;
    font-weight: 600;
    display: none;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 遮罩层 */
.answer-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.answer-card-container.visible .answer-card-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

/* 侧边栏 */
.answer-card-sidebar {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border-left: 1px solid rgba(229, 231, 235, 0.8);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12), -4px 0 12px rgba(0, 0, 0, 0.08);
}

.answer-card-container.visible .answer-card-sidebar {
    transform: translateX(0);
}

/* 答题卡头部 */
.answer-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(249, 250, 251, 0.8);
}

.answer-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    flex: 1;
}

.answer-card-close {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 40px;
    min-height: 40px;
}

.answer-card-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    transform: scale(1.05);
}

.answer-card-close:active {
    transform: scale(0.95);
    background: rgba(239, 68, 68, 0.15);
}

/* 关闭按钮增强视觉提示 */
.answer-card-close::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 10px;
    background: linear-gradient(45deg, transparent, rgba(239, 68, 68, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.answer-card-close:hover::before {
    opacity: 1;
}

/* 统计信息 */
.answer-card-statistics {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(249, 250, 251, 0.5);
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.stat-value {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.stat-correct {
    color: #10b981;
}

.stat-incorrect {
    color: #ef4444;
}

/* 答题卡内容 */
.answer-card-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.answer-card-questions {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* 控制区域 - 移到底部 */
.control-section {
    padding: 16px 24px;
    border-top: 1px solid rgba(229, 231, 235, 0.8);
    background: rgba(249, 250, 251, 0.8);
    margin-top: 20px;
}

/* 批改按钮 */
.check-answers-btn {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
    margin-bottom: 12px;
}

.check-answers-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

/* 开始批改按钮样式 */
.answer-check-button {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.25), 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
}

.answer-check-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.answer-check-button:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(37, 99, 235, 0.35), 0 3px 10px rgba(0, 0, 0, 0.15);
}

.answer-check-button:hover::before {
    left: 100%;
}

.answer-check-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2), 0 1px 4px rgba(0, 0, 0, 0.1);
}

.answer-check-button:focus {
    outline: none;
    box-shadow: 0 3px 12px rgba(37, 99, 235, 0.25), 0 0 0 3px rgba(37, 99, 235, 0.3);
}

.answer-check-button:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.answer-check-button:disabled::before {
    display: none;
}



/* 底部统计信息样式 */
.answer-card-statistics-bottom {
    margin-top: 16px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.stat-group {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.stat-group .stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-group .stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 4px;
    font-weight: 500;
}

.stat-group .stat-value {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-group .stat-total {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.stat-correct {
    color: #059669;
}

.stat-incorrect {
    color: #dc2626;
}

.stat-hesitant {
    color: #8b7355;
}

/* 题目容器 */
.questions-container {
    padding: 0 12px;
}

/* 题目分组 */
.question-group {
    margin-bottom: 24px;
}

.question-group:last-child {
    margin-bottom: 0;
}

.group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 12px 8px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.6);
}

.group-name {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.group-range {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* 题目网格 */
.questions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    padding: 0 12px;
}

/* 简化题目项 - 保持固定尺寸 */
.question-item-simple {
    padding: 8px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    position: relative;
    background: white;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    max-height: 56px; /* 固定最大高度，防止变化 */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* 基础hover效果 - 仅在非特殊状态时应用（统一使用新状态类） */
body .answer-card-questions .question-item-simple:not(.qs-answered):not(.qs-hesitant):not(.qs-unanswered):hover {
    border-color: #667eea;
    background: #f8fafc;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.15);
}

/* 已答题状态 - 统一使用新状态类 */
body .answer-card-questions .question-item-simple.qs-answered {
    background-color: rgba(34, 197, 94, 0.08);
    border-color: rgba(34, 197, 94, 0.3);
    color: #059669;
}

body .answer-card-questions .question-item-simple.qs-answered:hover {
    background-color: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.2);
}

/* 正确状态 */
.question-item-simple.correct {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.4);
    color: #059669;
}

.question-item-simple.correct:hover {
    background-color: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(34, 197, 94, 0.25);
}

/* 错误状态 */
.question-item-simple.incorrect {
    background-color: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.question-item-simple.incorrect:hover {
    background-color: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.2);
}

/* 犹豫状态 - 统一使用新状态类 */
body .answer-card-questions .question-item-simple.qs-hesitant {
    background-color: rgba(251, 245, 221, 0.8);
    border-color: rgba(217, 195, 104, 0.5);
    color: #8b7355;
}

body .answer-card-questions .question-item-simple.qs-hesitant:hover {
    background-color: rgba(251, 245, 221, 1);
    border-color: rgba(217, 195, 104, 0.7);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(217, 195, 104, 0.3);
}

body .answer-card-questions .question-item-simple.qs-hesitant .question-number {
    color: #8b7355;
    font-weight: 600;
}

.question-number {
    display: block;
    font-weight: 700;
    margin-bottom: 4px;
    color: #374151;
    font-size: 13px;
}

.question-answer {
    display: block;
    font-size: 15px;
    font-weight: bold;
    color: #1f2937;
}

/* 角标式状态显示 */
.status-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 25;
}

/* 高亮期间角标增强效果 */
.question-item-simple.question-checking .status-badge {
    z-index: 35;
    border: 3px solid white;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 3px 8px rgba(0, 0, 0, 0.3);
    animation: badgeHighlight 200ms ease-out;
    opacity: 1;
    transform: scale(1.1);
}

/* 角标高亮动画 */
@keyframes badgeHighlight {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.2), 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4), 0 4px 12px rgba(0, 0, 0, 0.4);
    }
    100% {
        transform: scale(1.1);
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3), 0 3px 8px rgba(0, 0, 0, 0.3);
    }
}

.status-badge.correct {
    background: #10b981;
    color: white;
}

.status-badge.incorrect {
    background: #ef4444;
    color: white;
}

/* 移除旧的覆盖层样式 */
.status-overlay {
    display: none;
}

.status-overlay.correct,
.status-overlay.incorrect {
    display: none;
}

.status-icon,
.correct-answer-hint {
    display: none;
}

/* 移除旧的状态样式，因为现在使用角标 */
.status-correct,
.status-incorrect,
.correct-answer {
    display: none;
}

/* 题目项 */
.question-item {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(229, 231, 235, 0.5);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.question-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.question-item:active {
    background: rgba(59, 130, 246, 0.1);
}

.question-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.question-status {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 状态样式 */
.status-unanswered .question-status {
    color: #9ca3af;
}

.status-answered .question-status {
    color: #3b82f6;
}

.status-correct .question-status {
    color: #10b981;
}

.status-incorrect .question-status {
    color: #ef4444;
}

/* 答案显示 */
.question-answers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-answer,
.reference-answer {
    display: flex;
    align-items: center;
    gap: 8px;
}

.answer-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
    min-width: 60px;
}

.answer-content {
    font-size: 14px;
    color: #1f2937;
    font-weight: 500;
}

.reference-answer .answer-content {
    color: #ef4444;
    font-weight: 600;
}

/* 空状态 */
.answer-card-empty {
    padding: 40px 24px;
    text-align: center;
    color: #9ca3af;
}

.answer-card-empty p {
    margin: 0;
    font-size: 14px;
}

/* 当答题卡打开时调整PDF区域 */
body.answer-card-open #pdf-viewer {
    margin-right: 380px;
    transition: margin-right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 平板适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .answer-card-toggle {
        width: 54px;
        height: 54px;
        top: 78px;
        right: 18px;
        opacity: 1;
        visibility: visible;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 平板端侧边栏打开时也隐藏切换按钮 */
    .answer-card-container.visible .answer-card-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .answer-card-sidebar {
        width: 360px;
    }

    .question-item {
        padding: 14px 20px;
    }

    .question-number {
        font-size: 15px;
    }

    .answer-content {
        font-size: 14px;
    }

    body.answer-card-open #pdf-viewer {
        margin-right: 360px;
    }

    /* 开始批改按钮平板设备适配 */
    .answer-check-button {
        padding: 14px 18px;
        font-size: 15px;
        border-radius: 10px;
    }
}

/* 移动设备适配 (最大768px) */
@media (max-width: 768px) {
    .answer-card-toggle {
        width: 52px;
        height: 52px;
        top: 76px;
        right: 16px;
        opacity: 1;
        visibility: visible;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 移动端侧边栏打开时也隐藏切换按钮 */
    .answer-card-container.visible .answer-card-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .answer-card-sidebar {
        width: 100%;
        max-width: 400px;
    }

    .answer-card-header {
        padding: 16px 20px;
    }
    
    /* 移动端关闭按钮优化 */
    .answer-card-close {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }

    .answer-card-statistics {
        padding: 16px 20px;
    }

    .question-item {
        padding: 16px 20px;
    }

    .question-number {
        font-size: 16px;
    }

    .answer-label {
        min-width: 50px;
        font-size: 11px;
    }

    .answer-content {
        font-size: 13px;
    }

    /* 移动设备上不调整PDF区域 */
    body.answer-card-open #pdf-viewer {
        margin-right: 0;
    }

    /* 开始批改按钮移动设备适配 */
    .answer-check-button {
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 10px;
    }
}

/* 小屏幕设备适配 (最大480px) */
@media (max-width: 480px) {
    .answer-card-toggle {
        width: 48px;
        height: 48px;
        top: 72px;
        right: 12px;
        opacity: 1;
        visibility: visible;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* 小屏设备侧边栏打开时也隐藏切换按钮 */
    .answer-card-container.visible .answer-card-toggle {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    
    .answer-card-sidebar {
        width: 100%;
    }

    .answer-card-header {
        padding: 12px 16px;
    }

    .answer-card-title {
        font-size: 16px;
    }
    
    /* 小屏设备关闭按钮优化 */
    .answer-card-close {
        min-width: 40px;
        min-height: 40px;
        padding: 10px;
    }

    .answer-card-statistics {
        padding: 12px 16px;
    }

    .stat-item {
        margin-bottom: 8px;
    }

    .stat-label {
        font-size: 13px;
    }

    .stat-value {
        font-size: 15px;
    }

    .question-item {
        padding: 12px 16px;
    }

    .question-header {
        margin-bottom: 8px;
    }

    .question-number {
        font-size: 15px;
    }

    .question-answers {
        gap: 6px;
    }

    .answer-label {
        min-width: 45px;
        font-size: 10px;
    }

    .answer-content {
        font-size: 12px;
    }

    /* 开始批改按钮小屏设备适配 */
    .answer-check-button {
        padding: 13px 18px;
        font-size: 14px;
        border-radius: 9px;
        letter-spacing: 0.3px;
    }
}

/* 滚动条样式 */
.answer-card-questions::-webkit-scrollbar {
    width: 6px;
}

.answer-card-questions::-webkit-scrollbar-track {
    background: rgba(229, 231, 235, 0.3);
    border-radius: 3px;
}

.answer-card-questions::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.answer-card-questions::-webkit-scrollbar-thumb:hover {
    background: rgba(156, 163, 175, 0.7);
}

/* 动画优化 */
@media (prefers-reduced-motion: reduce) {
    .answer-card-toggle,
    .answer-card-overlay,
    .answer-card-sidebar,
    .question-item,
    body.answer-card-open #pdf-viewer {
        transition: none;
    }
}

/* 犹豫按钮样式 - 与参考答案按钮保持一致，使用轻盈淡色主题 */
.hesitant-btn {
    background: rgba(217, 195, 104, 0.08);
    border: 1px solid rgba(217, 195, 104, 0.25);
    border-radius: 4px;
    padding: 0;
    cursor: pointer;
    color: #8b7355;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    font-size: 11px;
    font-weight: 600;
    position: relative;
}

.hesitant-btn:hover {
    background: rgba(217, 195, 104, 0.12);
    border-color: rgba(217, 195, 104, 0.4);
    color: #70603d;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(217, 195, 104, 0.15);
}

.hesitant-btn.active {
    background: rgba(217, 195, 104, 0.6);
    border-color: rgba(139, 115, 85, 0.8);
    color: #70603d;
    box-shadow: 0 2px 6px rgba(217, 195, 104, 0.25);
}

.hesitant-btn.active:hover {
    background: rgba(217, 195, 104, 0.7);
}

/* 犹豫按钮内容 */
.hesitant-btn::after {
    content: '?';
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

/* 犹豫按钮点击动画 */
@keyframes hesitant-click {
    0% { transform: translateY(0); }
    50% { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(217, 195, 104, 0.25); }
    100% { transform: translateY(0); }
}

/* 头部按钮布局 */
.header-buttons-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-buttons-right {
    display: flex;
    align-items: center;
    gap: 8px;
}





/* 观察模式按钮样式 */
.answer-card-view-mode-btn {
    background: none;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    color: #6b7280;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 36px;
    min-height: 36px;
}

.answer-card-view-mode-btn:hover {
    background: rgba(107, 114, 128, 0.1);
    border-color: rgba(107, 114, 128, 0.2);
    color: #4b5563;
    transform: scale(1.05);
}

.answer-card-view-mode-btn:active {
    transform: scale(0.95);
    background: rgba(107, 114, 128, 0.15);
}

/* 观察模式按钮显示状态 */
.answer-card-view-mode-btn.visible {
    opacity: 1;
}

/* 观察模式按钮增强视觉提示 */
.answer-card-view-mode-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(45deg, transparent, rgba(107, 114, 128, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.answer-card-view-mode-btn:hover::before {
    opacity: 1;
}

/* 头部按钮组布局调整 */
.header-buttons-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 平板适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .answer-card-view-mode-btn {
        min-width: 34px;
        min-height: 34px;
        padding: 7px;
    }
}

/* 移动设备适配 (最大768px) */
@media (max-width: 768px) {
    .answer-card-view-mode-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 10px;
    }
    
    .header-buttons-right {
        gap: 6px;
    }
}

/* 小屏幕设备适配 (最大480px) */
@media (max-width: 480px) {
    .answer-card-view-mode-btn {
        min-width: 36px;
        min-height: 36px;
        padding: 8px;
    }
    
    .header-buttons-right {
        gap: 4px;
    }
}

/* 题目高亮检查动画 */
.question-item-simple.question-checking {
    animation: questionHighlight 200ms ease-out;
}

@keyframes questionHighlight {
    0% {
        background-color: rgba(59, 130, 246, 0.1);
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    }
    50% {
        background-color: rgba(59, 130, 246, 0.15);
        transform: scale(1.02);
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    }
    100% {
        background-color: transparent;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

/* 减少动画偏好设置支持 */
@media (prefers-reduced-motion: reduce) {
    .question-item-simple.question-checking {
        animation: none;
        background-color: rgba(59, 130, 246, 0.1);
    }
    
    @keyframes questionHighlight {
        0%, 100% {
            background-color: rgba(59, 130, 246, 0.1);
            transform: none;
            box-shadow: none;
        }
    }
    
    /* 减少动画偏好时的角标样式 */
    .question-item-simple.question-checking .status-badge {
        animation: none;
        transform: scale(1);
        border: 2px solid white;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
    
    @keyframes badgeHighlight {
        0%, 100% {
            transform: scale(1);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
        }
    }
}

/* 题号高亮效果 */
.question-highlight {
    background-color: rgba(255, 193, 7, 0.3) !important;
    border: 2px solid #ffc107 !important;
    border-radius: 4px !important;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.5) !important;
    transition: all 0.3s ease !important;
}

/* 答题卡错误提示 */
.answer-card-error-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #dc3545;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    z-index: 10000;
    animation: slideInFromRight 0.3s ease-out, fadeOut 0.3s ease-in 2.7s;
    animation-fill-mode: both;
    max-width: 300px;
    word-wrap: break-word;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 加载提示 */
.answer-card-loading-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 24px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: loadingFadeIn 0.3s ease-out;
    max-width: 320px;
    min-width: 280px;
    backdrop-filter: blur(8px);
}

.answer-card-loading-toast.hiding {
    animation: loadingFadeOut 0.3s ease-in;
}

.loading-content {
    display: flex;
    align-items: center;
    gap: 16px;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: loadingSpin 1s linear infinite;
    flex-shrink: 0;
}

.loading-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.loading-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.loading-subtitle {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.3;
}

.loading-close-btn {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.loading-close-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

@keyframes loadingSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loadingFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes loadingFadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* 成功提示 */
.answer-card-success-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 16px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    animation: successSlideIn 0.3s ease-out, successFadeOut 0.3s ease-in 1.7s;
    animation-fill-mode: both;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.answer-card-success-toast.hiding {
    animation: successFadeOut 0.3s ease-in;
}

.success-icon {
    font-size: 18px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-text {
    line-height: 1.4;
}

@keyframes successSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes successFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
} 