/* 湖北师范模拟考试试卷样式 - 全屏布局 */

/* ========== 主题变量系统 ========== */
:root {
    /* 默认主题 - 传统试卷风格 */
    --c-exam-bg: #FFFEF5;
    --c-exam-bg-solid: #FFFEF5;
    --c-exam-container-bg: #FFFEF5;
    --c-exam-border: #333;
    --c-exam-text: #000;
    --c-exam-text-secondary: #333;
    --c-exam-text-muted: #666;
    --c-exam-header-bg: #FFFEF5;
    --c-exam-header-border: #333;
    --c-exam-section-border: #ccc;
    --c-exam-column-border: #999;
    --c-exam-input-bg: transparent;
    --c-exam-input-border: #333;
    --c-exam-input-border-focus: #333;
    --c-exam-input-correct: #4CAF50;
    --c-exam-input-correct-text: #4CAF50;
    --c-exam-input-incorrect: #f44336;
    --c-exam-input-incorrect-text: #f44336;
    --c-exam-btn-bg: #fff;
    --c-exam-btn-border: #333;
    --c-exam-btn-text: #333;
    --c-exam-btn-hover-bg: #f5f5f5;
    --c-exam-btn-primary-bg: #333;
    --c-exam-btn-primary-text: #fff;
    --c-exam-btn-primary-hover-bg: #555;
    --c-exam-close-btn-bg: #fff;
    --c-exam-close-btn-border: #333;
    --c-exam-close-btn-hover-bg: #f0f0f0;
    --c-exam-scrollbar-track: #FFFEF5;
    --c-exam-scrollbar-thumb: #e8e7dc;
    --c-exam-scrollbar-thumb-hover: #d4d3c8;
    --c-exam-scrollbar-thumb-active: #aaa9a0;
    --c-exam-shadow: none;
    --c-exam-container-shadow: none;
    --c-exam-btn-shadow: none;
    --c-exam-border-radius: 0;
    --c-exam-container-border-radius: 0;
    --c-exam-input-border-width: 1px;
    --c-exam-bubble-opacity: 0;
    
    /* 文本选中样式变量 */
    --c-exam-selection-bg: rgba(100, 100, 100, 0.25);
    --c-exam-selection-text: #000;
}

/* ========== C语言考试界面文本选中样式 - 默认主题（传统试卷风格） ========== */
/* 覆盖全局选中样式，使用柔和的灰色调，符合传统纸张质感 */
.c-exam-overlay ::selection {
    background: var(--c-exam-selection-bg);
    color: var(--c-exam-selection-text);
    text-shadow: 
        1px 0 1px rgba(100, 100, 100, 0.15),
        -1px 0 1px rgba(100, 100, 100, 0.15),
        0 1px 1px rgba(100, 100, 100, 0.15),
        0 -1px 1px rgba(100, 100, 100, 0.15);
}

.c-exam-overlay ::-moz-selection {
    background: var(--c-exam-selection-bg);
    color: var(--c-exam-selection-text);
    text-shadow: 
        1px 0 1px rgba(100, 100, 100, 0.15),
        -1px 0 1px rgba(100, 100, 100, 0.15),
        0 1px 1px rgba(100, 100, 100, 0.15),
        0 -1px 1px rgba(100, 100, 100, 0.15);
}

/* 新拟态主题 - 首页风格（平面样式） */
.c-exam-theme-neumorphism {
    --c-exam-bg: #e3edf7;
    --c-exam-bg-solid: #e3edf7;
    --c-exam-container-bg: #e3edf7;
    --c-exam-border: transparent;
    --c-exam-text: #4a6fa5;
    --c-exam-text-secondary: #5d8ab8;
    --c-exam-text-muted: #7aa8d6;
    --c-exam-header-bg: #e3edf7;
    --c-exam-header-border: rgba(93, 138, 184, 0.3);
    --c-exam-section-border: rgba(93, 138, 184, 0.3);
    --c-exam-column-border: rgba(93, 138, 184, 0.2);
    --c-exam-input-bg: transparent;
    --c-exam-input-border: rgba(93, 138, 184, 0.5);
    --c-exam-input-border-focus: rgba(93, 138, 184, 0.6);
    --c-exam-input-correct: rgba(40, 167, 69, 0.6);
    --c-exam-input-correct-text: #155724;
    --c-exam-input-incorrect: rgba(220, 53, 69, 0.6);
    --c-exam-input-incorrect-text: #721c24;
    --c-exam-btn-bg: #5d8ab8;
    --c-exam-btn-border: transparent;
    --c-exam-btn-text: #fff;
    --c-exam-btn-hover-bg: #4a6fa5;
    --c-exam-btn-primary-bg: #5d8ab8;
    --c-exam-btn-primary-text: #fff;
    --c-exam-btn-primary-hover-bg: #4a6fa5;
    --c-exam-close-btn-bg: rgba(93, 138, 184, 0.2);
    --c-exam-close-btn-border: transparent;
    --c-exam-close-btn-hover-bg: rgba(93, 138, 184, 0.3);
    --c-exam-scrollbar-track: #e3edf7;
    --c-exam-scrollbar-thumb: #d0e2f0;
    --c-exam-scrollbar-thumb-hover: #eaf4fc;
    --c-exam-scrollbar-thumb-active: #c5dcea;
    --c-exam-shadow: none;
    --c-exam-container-shadow: none;
    --c-exam-btn-shadow: none;
    --c-exam-border-radius: 0;
    --c-exam-container-border-radius: 0;
    --c-exam-input-border-width: 2px;
    --c-exam-bubble-opacity: 1;
    
    /* 新拟态主题选中样式 - 蓝色系 */
    --c-exam-selection-bg: rgba(93, 138, 184, 0.35);
    --c-exam-selection-text: #4a6fa5;
}

/* ========== 浮动气泡装饰 ========== */
.c-exam-bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: var(--c-exam-bubble-opacity, 0);
    transition: opacity 0.5s ease;
}

.c-exam-bubble {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(173, 216, 230, 0.3));
    animation: cExamBubbleFloat 20s ease-in-out infinite;
}

.c-exam-bubble.bubble-1 {
    width: 150px;
    height: 150px;
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.c-exam-bubble.bubble-2 {
    width: 100px;
    height: 100px;
    top: 60%;
    left: 15%;
    animation-delay: -5s;
}

.c-exam-bubble.bubble-3 {
    width: 80px;
    height: 80px;
    top: 30%;
    right: 10%;
    animation-delay: -10s;
}

.c-exam-bubble.bubble-4 {
    width: 120px;
    height: 120px;
    top: 70%;
    right: 20%;
    animation-delay: -15s;
}

.c-exam-bubble.bubble-5 {
    width: 60px;
    height: 60px;
    top: 20%;
    left: 50%;
    animation-delay: -7s;
}

@keyframes cExamBubbleFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* 考试覆盖层 - 自定义滚动条 */
.c-exam-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--c-exam-bg);
    z-index: 10003;
    display: none;
    overflow: auto;
    /* 禁用移动端长按弹出菜单和桌面端选中工具栏 */
    -webkit-touch-callout: none;
    /* Firefox 滚动条样式 - 使用 !important 覆盖全局样式 */
    scrollbar-width: auto !important;
    scrollbar-color: var(--c-exam-scrollbar-thumb) var(--c-exam-scrollbar-track) !important;
}

/* 考试入场动画 - 准备状态 */
.c-exam-overlay.c-exam-preparing .c-exam-container {
    opacity: 0;
}

/* 考试入场动画 - 进入状态 */
.c-exam-overlay.c-exam-entering .c-exam-container {
    animation: cExamFadeIn 0.8s ease-out 0.2s both;
}

@keyframes cExamFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 考试界面滚动条样式 - WebKit浏览器 */
.c-exam-overlay::-webkit-scrollbar {
    width: 12px !important;
    height: 12px !important;
}

.c-exam-overlay::-webkit-scrollbar-track {
    background: var(--c-exam-scrollbar-track) !important;
    border-radius: 0 !important;
}

.c-exam-overlay::-webkit-scrollbar-thumb {
    background: var(--c-exam-scrollbar-thumb) !important;
    border-radius: 0 !important;
    border: none !important;
}

.c-exam-overlay::-webkit-scrollbar-thumb:hover {
    background: var(--c-exam-scrollbar-thumb-hover) !important;
}

.c-exam-overlay::-webkit-scrollbar-thumb:active {
    background: var(--c-exam-scrollbar-thumb-active) !important;
}

.c-exam-overlay::-webkit-scrollbar-corner {
    background: var(--c-exam-scrollbar-track) !important;
}

.c-exam-overlay.active {
    display: block;
}

/* 考试容器 - 全屏 */
.c-exam-container {
    width: calc(100% - 40px);
    min-height: calc(100vh - 40px);
    margin: 20px;
    background: var(--c-exam-container-bg);
    border: 2px solid var(--c-exam-border);
    border-radius: var(--c-exam-container-border-radius);
    box-shadow: var(--c-exam-container-shadow);
    position: relative;
    z-index: 1;
}

/* 考试头部 */
.c-exam-header {
    background: var(--c-exam-header-bg);
    border-bottom: 2px solid var(--c-exam-header-border);
    padding: 15px 30px;
    text-align: center;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

/* 主题切换按钮 - 默认方形 */
.c-exam-theme-toggle-btn {
    position: absolute;
    top: 12px;
    right: 52px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-exam-btn-border);
    background: var(--c-exam-close-btn-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    border-radius: 0;
    z-index: 10;
    color: var(--c-exam-text-secondary);
}

.c-exam-theme-toggle-btn:hover {
    background: var(--c-exam-close-btn-hover-bg);
    border-color: var(--c-exam-text-secondary);
}

.c-exam-theme-toggle-btn:active {
    transform: scale(0.95);
}

.c-exam-theme-toggle-btn .theme-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.c-exam-theme-toggle-btn .sun-icon,
.c-exam-theme-toggle-btn .moon-icon {
    transition: opacity 0.2s ease;
}

/* 新拟态主题下的主题切换按钮样式 - 圆角方形 */
.c-exam-theme-neumorphism .c-exam-theme-toggle-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(93, 138, 184, 0.15);
    color: #5d8ab8;
    border-radius: 8px;
}

.c-exam-theme-neumorphism .c-exam-theme-toggle-btn:hover {
    background: rgba(93, 138, 184, 0.25);
}

/* 关闭按钮 - 默认方形 */
.c-exam-close-btn {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-exam-close-btn-border);
    background: var(--c-exam-close-btn-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    border-radius: 0;
    color: var(--c-exam-text-secondary);
}

.c-exam-close-btn:hover {
    background: var(--c-exam-close-btn-hover-bg);
    border-color: var(--c-exam-text-secondary);
}

.c-exam-close-btn:active {
    transform: scale(0.95);
}

/* 新拟态主题下的关闭按钮样式 - 圆角方形 */
.c-exam-theme-neumorphism .c-exam-close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(93, 138, 184, 0.15);
    color: #5d8ab8;
    border-radius: 8px;
}

.c-exam-theme-neumorphism .c-exam-close-btn:hover {
    background: rgba(93, 138, 184, 0.25);
}

.c-exam-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--c-exam-text);
    margin-bottom: 8px;
    letter-spacing: 4px;
}

.c-exam-info {
    font-size: 14px;
    color: var(--c-exam-text-secondary);
}

.c-exam-info span {
    margin: 0 15px;
}

/* 考试时间样式 */
.c-exam-timer {
    display: inline-flex;
    align-items: baseline;
}

.c-exam-timer-label {
    color: var(--c-exam-text-muted);
}

.c-exam-timer-value {
    font-family: 'Courier New', Consolas, monospace;
    font-size: 18px;
    font-weight: bold;
    color: var(--c-exam-text-secondary);
    margin-left: 4px;
}

/* 试卷主体 - 左右两栏 */
.c-exam-paper {
    display: flex;
    min-height: calc(100vh - 200px);
    position: relative;
}

/* 复古倒计时时钟 */
.c-exam-clock {
    position: absolute;
    top: 50%;
    right: 310px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}

.c-exam-clock-face {
    width: 80px;
    height: 80px;
    border: 3px solid var(--c-exam-border);
    border-radius: 50%;
    background: var(--c-exam-container-bg);
    position: relative;
    box-shadow: 
        inset 0 0 15px rgba(0,0,0,0.04),
        0 4px 12px rgba(0,0,0,0.1);
}

/* 时钟刻度 */
.c-exam-clock-marks {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.c-exam-clock-marks::before,
.c-exam-clock-marks::after {
    content: '';
    position: absolute;
    background: var(--c-exam-border);
}

/* 12点刻度 */
.c-exam-clock-marks::before {
    width: 2px;
    height: 8px;
    top: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* 6点刻度 */
.c-exam-clock-marks::after {
    width: 2px;
    height: 8px;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
}

/* 时钟指针 */
.c-exam-clock-hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    background: var(--c-exam-border);
    border-radius: 1.5px;
    transition: transform 1s linear;
}

/* 分针 */
.c-exam-clock-hand.minute-hand {
    width: 2px;
    height: 28px;
    margin-left: -1px;
}

/* 时针 */
.c-exam-clock-hand.hour-hand {
    width: 3px;
    height: 20px;
    margin-left: -1.5px;
    background: var(--c-exam-text-secondary);
}

/* 时钟中心点 */
.c-exam-clock-center {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--c-exam-border);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* 数字显示区域 */
.c-exam-clock-display {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.c-exam-clock-time {
    display: block;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 11px;
    font-weight: bold;
    color: var(--c-exam-text-secondary);
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

/* 新拟态主题时钟 */
.c-exam-theme-neumorphism .c-exam-clock-face {
    background: linear-gradient(145deg, #ecf4fc, #dbe7f5);
    border-color: rgba(93, 138, 184, 0.4);
    box-shadow: 
        6px 6px 12px rgba(74, 111, 165, 0.15),
        -6px -6px 12px rgba(255, 255, 255, 0.8);
}

.c-exam-theme-neumorphism .c-exam-clock-hand.minute-hand {
    background: #5d8ab8;
}

.c-exam-theme-neumorphism .c-exam-clock-hand.hour-hand {
    background: #7aa8d6;
}

.c-exam-theme-neumorphism .c-exam-clock-center {
    background: #5d8ab8;
}

.c-exam-theme-neumorphism .c-exam-clock-marks::before,
.c-exam-theme-neumorphism .c-exam-clock-marks::after {
    background: rgba(93, 138, 184, 0.6);
}

.c-exam-theme-neumorphism .c-exam-clock-time {
    color: #5d8ab8;
}

/* 左右两栏 */
.c-exam-column {
    flex: 1;
    padding: 25px 30px;
    box-sizing: border-box;
}

.c-exam-column.left {
    border-right: 1px solid var(--c-exam-column-border);
}

.c-exam-column.right {
    border-left: 1px solid var(--c-exam-column-border);
    margin-left: -1px;
}

/* 题型区块 */
.c-exam-section {
    margin-bottom: 35px;
}

.c-exam-section:last-child {
    margin-bottom: 20px;
}

.c-exam-section-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--c-exam-text);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--c-exam-section-border);
}

/* 题目内容 */
.c-exam-content {
    font-size: 15px;
    line-height: 1.9;
    color: #000;
}

.c-exam-content p {
    margin: 10px 0;
    text-indent: 2em;
}

.c-exam-content .no-indent {
    text-indent: 0;
}

/* 代码显示区域 - 无边框背景 */
.c-exam-code-block {
    background: transparent;
    border: none;
    padding: 10px 0;
    margin: 10px 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    font-weight: normal;
    line-height: 1.8;
    overflow-x: auto;
    white-space: pre;
    color: #000;
}

/* 新拟态主题下的代码显示区域 */
.c-exam-theme-neumorphism .c-exam-code-block {
    color: #4a6fa5;
}

/* 新拟态主题下的题目内容 */
.c-exam-theme-neumorphism .c-exam-content {
    color: #4a6fa5;
}

/* 新拟态主题下的题目文本 */
.c-exam-theme-neumorphism .c-exam-question-text {
    color: var(--c-exam-text);
}

/* 新拟态主题下的输入框文字颜色 */
.c-exam-theme-neumorphism .c-exam-blank {
    color: #4a6fa5;
}

.c-exam-theme-neumorphism .c-exam-result-input {
    color: #4a6fa5;
}

.c-exam-theme-neumorphism .c-exam-program-textarea {
    color: #4a6fa5;
}

/* 新拟态主题下的正确/错误答案颜色 */
.c-exam-theme-neumorphism .c-exam-blank.correct,
.c-exam-theme-neumorphism .c-exam-result-input.correct {
    border-bottom-color: var(--c-exam-input-correct);
    color: var(--c-exam-input-correct-text);
}

.c-exam-theme-neumorphism .c-exam-blank.incorrect,
.c-exam-theme-neumorphism .c-exam-result-input.incorrect {
    border-bottom-color: var(--c-exam-input-incorrect);
    color: var(--c-exam-input-incorrect-text);
}

/* 新拟态主题下的正确答案显示 */
.c-exam-theme-neumorphism .c-exam-correct-answer {
    color: #4CAF50;
}

/* 代码填空输入框 */
.c-exam-blank {
    display: inline-block;
    min-width: 100px;
    max-width: 400px;
    width: 100px;
    height: 24px;
    border: none;
    border-bottom: var(--c-exam-input-border-width) solid var(--c-exam-input-border);
    border-radius: 0;
    background: var(--c-exam-input-bg);
    font-size: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: normal;
    color: #000;
    text-align: left;
    padding: 0 6px;
    margin: 0 4px;
    outline: none;
    box-sizing: border-box;
    line-height: 20px;
    vertical-align: middle;
    transition: none;
}

.c-exam-blank:focus {
    border-bottom-color: var(--c-exam-input-border-focus);
}

.c-exam-blank.correct {
    border-bottom-color: var(--c-exam-input-correct);
    color: var(--c-exam-input-correct-text);
}

.c-exam-blank.incorrect {
    border-bottom-color: var(--c-exam-input-incorrect);
    color: var(--c-exam-input-incorrect-text);
}

/* 部分正确状态 - 保持默认颜色 */
.c-exam-blank.partial {
    /* 无特殊样式，保持默认颜色 */
}

/* 程序改错题输入框 - 默认宽度加倍（放在后面确保优先级） */
.c-exam-error-item .c-exam-blank {
    min-width: 300px;
    max-width: 600px;
    width: 300px;
}

/* 程序结果输入框 */
.c-exam-result-input {
    min-width: 300px;
    max-width: 600px;
    width: 300px;
    min-height: 24px;
    height: auto;
    border: none;
    border-bottom: 1px solid var(--c-exam-input-border);
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: normal;
    color: #000;
    text-align: left;
    padding: 5px 0;
    outline: none;
    box-sizing: border-box;
    line-height: 24px;
    transition: none;
    margin-top: 10px;
}

.c-exam-result-input:focus {
    border-bottom-color: var(--c-exam-input-border-focus);
}

.c-exam-result-input.correct {
    border-bottom-color: var(--c-exam-input-correct);
    color: var(--c-exam-input-correct-text);
}

.c-exam-result-input.incorrect {
    border-bottom-color: var(--c-exam-input-incorrect);
    color: var(--c-exam-input-incorrect-text);
}

/* 程序结果输入框部分正确状态 - 保持默认颜色 */
.c-exam-result-input.partial {
    /* 无特殊样式，保持默认颜色 */
}

/* 程序设计题输入区域 - 纯文本框无边框 */
.c-exam-program-textarea {
    width: 100%;
    min-height: 200px;
    padding: 10px 0;
    border: none;
    border-radius: 0;
    background: transparent;
    font-size: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-weight: normal;
    line-height: 1.8;
    color: #000;
    resize: none;
    outline: none;
    box-sizing: border-box;
    overflow: hidden;
}

.c-exam-program-textarea:focus {
    outline: none;
}

/* 题号 */
.c-exam-number {
    font-weight: bold;
    margin-right: 5px;
}

/* 题目文本 */
.c-exam-question-text {
    color: var(--c-exam-text);
    margin-bottom: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* 题目项目容器 */
.c-exam-question-item {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--c-exam-section-border);
}

.c-exam-question-item:last-child {
    border-bottom: none;
}

/* 示例输出 - 无边框背景 */
.c-exam-sample-output {
    background: transparent;
    border: none;
    padding: 10px 0;
    margin: 10px 0;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    color: var(--c-exam-text-secondary);
}

/* 改错题样式 */
.c-exam-error-item {
    margin: 15px 0;
    padding: 8px 0;
}

.c-exam-error-label {
    font-weight: bold;
    color: #f44336;
    margin-right: 10px;
}

/* 考试底部 */
.c-exam-footer {
    border-top: 2px solid var(--c-exam-header-border);
    padding: 25px 30px;
    text-align: center;
    background: var(--c-exam-header-bg);
    border-radius: 0 0 var(--c-exam-container-border-radius) var(--c-exam-container-border-radius);
}

.c-exam-btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid var(--c-exam-btn-border);
    background: var(--c-exam-btn-bg);
    color: var(--c-exam-btn-text);
    margin: 0 10px;
    transition: all 0.2s ease;
    border-radius: 0;
}

.c-exam-btn:hover {
    background: var(--c-exam-btn-hover-bg);
}

.c-exam-btn:active {
    opacity: 0.9;
}

.c-exam-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.c-exam-btn.primary {
    background: var(--c-exam-btn-primary-bg);
    color: var(--c-exam-btn-primary-text);
    border-color: transparent;
}

.c-exam-btn.primary:hover {
    background: var(--c-exam-btn-primary-hover-bg);
}

/* 新拟态主题下的按钮样式 - 圆角方形 */
.c-exam-theme-neumorphism .c-exam-btn {
    border: none;
    border-radius: 8px;
    padding: 12px 36px;
}

/* 结果显示 */
.c-exam-result {
    display: none;
    padding: 30px;
    background: var(--c-exam-container-bg);
    border-top: 2px solid var(--c-exam-header-border);
}

.c-exam-result.active {
    display: block;
}

.c-exam-score {
    text-align: center;
    margin-bottom: 25px;
}

.c-exam-score-total {
    font-size: 48px;
    font-weight: bold;
    color: var(--c-exam-text);
}

.c-exam-score-label {
    font-size: 18px;
    color: var(--c-exam-text-muted);
    margin-top: 5px;
}

.c-exam-score-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}

.c-exam-score-item {
    padding: 10px 20px;
    text-align: center;
}

.c-exam-score-item-title {
    font-size: 13px;
    color: var(--c-exam-text-muted);
    margin-bottom: 5px;
}

.c-exam-score-item-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--c-exam-text-secondary);
}

/* 正确答案显示 - 内联显示在输入框旁边 */
.c-exam-correct-answer {
    color: #4CAF50;
    font-weight: 700;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    display: block;
    margin-top: 8px;
    margin-left: 0;
}

/* 参考答案显示区域 - 程序设计题 */
.c-exam-reference-answer {
    margin-top: 15px;
    padding: 12px 15px;
    border: 1px dashed #4CAF50;
    border-radius: 8px;
    background: transparent;
}

.c-exam-reference-answer strong {
    color: #4CAF50;
    font-size: 14px;
}

.c-exam-reference-answer pre {
    margin: 10px 0 0 0;
    padding: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 15px;
    line-height: 1.8;
    color: #4CAF50;
    background: transparent;
    border: none;
}

/* 新拟态主题下的参考答案样式 */
.c-exam-theme-neumorphism .c-exam-reference-answer {
    border-color: #4CAF50;
}

.c-exam-theme-neumorphism .c-exam-reference-answer strong {
    color: #4CAF50;
}

.c-exam-theme-neumorphism .c-exam-reference-answer pre {
    color: #4CAF50;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .c-exam-container {
        width: calc(100% - 20px);
        margin: 10px;
    }
    
    .c-exam-column {
        padding: 20px 25px;
    }
}

@media (max-width: 900px) {
    .c-exam-paper {
        flex-direction: column;
    }
    
    .c-exam-column.left,
    .c-exam-column.right {
        border: none;
        border-bottom: 1px solid var(--c-exam-column-border);
    }
    
    .c-exam-column.right {
        margin-left: 0;
    }
    
    .c-exam-clock {
        display: none;
    }
}

@media (max-width: 600px) {
    .c-exam-overlay.active {
        padding: 0;
    }
    
    .c-exam-container {
        width: calc(100% - 10px);
        margin: 5px;
        min-height: calc(100vh - 10px);
    }
    
    .c-exam-header {
        padding: 12px 15px;
    }
    
    .c-exam-title {
        font-size: 18px;
        letter-spacing: 2px;
    }
    
    .c-exam-info {
        font-size: 12px;
    }
    
    .c-exam-close-btn {
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    .c-exam-column {
        padding: 15px;
    }
    
    .c-exam-btn {
        padding: 10px 25px;
        font-size: 14px;
        margin: 5px;
    }
    
    .c-exam-footer {
        padding: 20px 15px;
    }
}

/* ========== 设置按钮样式 ========== */
.c-exam-settings-btn {
    position: absolute;
    top: 12px;
    right: 92px;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-exam-btn-border);
    background: var(--c-exam-close-btn-bg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    border-radius: 0;
    z-index: 10;
    color: var(--c-exam-text-secondary);
}

/* 新拟态主题下的设置按钮样式 */
.c-exam-theme-neumorphism .c-exam-settings-btn {
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(93, 138, 184, 0.15);
    color: #5d8ab8;
    border-radius: 8px;
}

.c-exam-theme-neumorphism .c-exam-settings-btn:hover {
    background: rgba(93, 138, 184, 0.25);
}

.c-exam-settings-btn:hover {
    background: var(--c-exam-close-btn-hover-bg);
    border-color: var(--c-exam-text-secondary);
}

.c-exam-settings-btn:active {
    transform: scale(0.95);
}

/* ========== 提交后允许选中文字 ========== */
.c-exam-overlay.c-exam-selectable *,
.c-exam-overlay.c-exam-selectable .c-exam-content,
.c-exam-overlay.c-exam-selectable .c-exam-content *,
.c-exam-overlay.c-exam-selectable .c-exam-section,
.c-exam-overlay.c-exam-selectable .c-exam-section *,
.c-exam-overlay.c-exam-selectable .c-exam-code-block,
.c-exam-overlay.c-exam-selectable .c-exam-question-text {
    -webkit-user-select: text !important;
    user-select: text !important;
    /* 注意：不设置 -webkit-touch-callout，保持全局的 none 设置，避免Edge浏览器迷你菜单出现 */
}

/* 页眉区域保持不可选中（避免触发浏览器工具栏） */
.c-exam-overlay.c-exam-selectable .c-exam-header,
.c-exam-overlay.c-exam-selectable .c-exam-header *,
.c-exam-overlay.c-exam-selectable .c-exam-footer,
.c-exam-overlay.c-exam-selectable .c-exam-footer * {
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* 输入框和按钮保持不可选中 */
.c-exam-overlay input,
.c-exam-overlay textarea,
.c-exam-overlay button {
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* ========== 设置模态框样式 ========== */
.c-exam-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10020;
    display: none;
    align-items: center;
    justify-content: center;
}

.c-exam-settings-modal.active {
    display: flex;
}

.c-exam-settings-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.c-exam-settings-modal-content {
    position: relative;
    width: 420px;
    max-width: 90vw;
    background: var(--c-exam-container-bg);
    border: 2px solid var(--c-exam-border);
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: cExamSettingsModalFadeIn 0.3s ease-out;
}

/* 新拟态主题模态框样式 */
.c-exam-theme-neumorphism .c-exam-settings-modal-content {
    background: linear-gradient(145deg, #e8f0f8, #d4e6f9);
    border: 1px solid rgba(93, 138, 184, 0.3);
    border-radius: 16px;
    box-shadow: 12px 12px 24px rgba(74, 111, 165, 0.2), -12px -12px 24px rgba(255, 255, 255, 0.7);
}

@keyframes cExamSettingsModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.c-exam-settings-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--c-exam-section-border);
}

.c-exam-settings-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--c-exam-text);
}

.c-exam-settings-modal-close {
    width: 32px;
    height: 32px;
    border: 1px solid var(--c-exam-btn-border);
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--c-exam-text-secondary);
    transition: all 0.2s ease;
    border-radius: 0;
}

.c-exam-settings-modal-close:hover {
    background: var(--c-exam-btn-hover-bg);
}

/* 新拟态主题关闭按钮 */
.c-exam-theme-neumorphism .c-exam-settings-modal-close {
    border: none;
    background: rgba(93, 138, 184, 0.15);
    border-radius: 8px;
    color: #5d8ab8;
}

.c-exam-theme-neumorphism .c-exam-settings-modal-close:hover {
    background: rgba(93, 138, 184, 0.25);
}

.c-exam-settings-modal-body {
    padding: 24px;
}

.c-exam-settings-section {
    margin-bottom: 20px;
}

.c-exam-settings-section:last-child {
    margin-bottom: 0;
}

.c-exam-settings-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-exam-text-secondary);
    margin-bottom: 12px;
}

.c-exam-settings-section-desc {
    font-size: 13px;
    color: var(--c-exam-text-muted);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* 开关切换样式 */
.c-exam-toggle-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--c-exam-input-bg);
    border: 1px solid var(--c-exam-section-border);
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.c-exam-toggle-item:last-child {
    margin-bottom: 0;
}

.c-exam-toggle-info {
    flex: 1;
    padding-right: 16px;
}

.c-exam-toggle-label {
    font-size: 15px;
    font-weight: 500;
    color: var(--c-exam-text);
    margin-bottom: 4px;
}

.c-exam-toggle-desc {
    font-size: 12px;
    color: var(--c-exam-text-muted);
    line-height: 1.4;
}

/* 开关按钮 */
.c-exam-toggle-switch {
    position: relative;
    flex-shrink: 0;
}

.c-exam-toggle-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.c-exam-toggle-slider {
    display: block;
    width: 48px;
    height: 26px;
    background: #ccc;
    border: 1px solid #bbb;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.c-exam-toggle-slider::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.c-exam-toggle-switch input:checked + .c-exam-toggle-slider {
    background: var(--c-exam-btn-primary-bg);
    border-color: var(--c-exam-btn-primary-bg);
}

.c-exam-toggle-switch input:checked + .c-exam-toggle-slider::before {
    transform: translateX(22px);
    border-color: var(--c-exam-btn-primary-bg);
}

/* 新拟态主题开关样式 */
.c-exam-theme-neumorphism .c-exam-toggle-slider {
    background: rgba(93, 138, 184, 0.2) !important;
    border: none !important;
    border-radius: 13px !important;
}

.c-exam-theme-neumorphism .c-exam-toggle-slider::before {
    background: #fff !important;
    border: none !important;
    border-radius: 50% !important;
    box-shadow: 2px 2px 4px rgba(74, 111, 165, 0.15), -2px -2px 4px rgba(255, 255, 255, 0.35) !important;
}

.c-exam-theme-neumorphism .c-exam-toggle-switch input:checked + .c-exam-toggle-slider {
    background: linear-gradient(135deg, #7aa8d6, #5d8ab8) !important;
}

.c-exam-theme-neumorphism .c-exam-toggle-switch input:checked + .c-exam-toggle-slider::before {
    transform: translateX(22px) !important;
    box-shadow: 2px 2px 4px rgba(74, 111, 165, 0.2), -2px -2px 4px rgba(255, 255, 255, 0.4) !important;
}

.c-exam-settings-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 18px 24px;
    border-top: 1px solid var(--c-exam-section-border);
}

.c-exam-settings-btn-action {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 2px solid var(--c-exam-btn-border);
    background: var(--c-exam-btn-bg);
    color: var(--c-exam-btn-text);
    transition: all 0.2s ease;
    border-radius: 0;
}

.c-exam-settings-btn-action:hover {
    background: var(--c-exam-btn-hover-bg);
}

.c-exam-settings-btn-action.primary {
    background: var(--c-exam-btn-primary-bg);
    color: var(--c-exam-btn-primary-text);
    border-color: transparent;
}

.c-exam-settings-btn-action.primary:hover {
    background: var(--c-exam-btn-primary-hover-bg);
}

/* 新拟态主题按钮样式 */
.c-exam-theme-neumorphism .c-exam-settings-btn-action {
    border: none !important;
    border-radius: 8px !important;
    color: #fff !important;
    background: linear-gradient(135deg, #7aa8d6, #5d8ab8) !important;
}

.c-exam-theme-neumorphism .c-exam-settings-btn-action:hover {
    background: linear-gradient(135deg, #5d8ab8, #4a6fa5) !important;
}

.c-exam-theme-neumorphism .c-exam-settings-btn-action.primary {
    background: linear-gradient(135deg, #5d8ab8, #4a6fa5) !important;
    box-shadow: 4px 4px 10px rgba(74, 111, 165, 0.2), -2px -2px 8px rgba(255, 255, 255, 0.3) !important;
}

/* 新拟态主题模态框文字颜色 */
.c-exam-theme-neumorphism .c-exam-settings-modal-header h3 {
    color: #4a6fa5 !important;
}

.c-exam-theme-neumorphism .c-exam-settings-section-title {
    color: #5d8ab8 !important;
}

.c-exam-theme-neumorphism .c-exam-settings-section-desc {
    color: #7aa8d6 !important;
}

.c-exam-theme-neumorphism .c-exam-toggle-label {
    color: #4a6fa5 !important;
}

.c-exam-theme-neumorphism .c-exam-toggle-desc {
    color: #7aa8d6 !important;
}

/* 新拟态主题模态框分割线样式 */
.c-exam-theme-neumorphism .c-exam-settings-modal-header {
    border-bottom-color: rgba(93, 138, 184, 0.2) !important;
}

.c-exam-theme-neumorphism .c-exam-settings-modal-footer {
    border-top-color: rgba(93, 138, 184, 0.2) !important;
}

/* 新拟态主题开关项样式增强 */
.c-exam-theme-neumorphism .c-exam-toggle-item {
    background: rgba(93, 138, 184, 0.08) !important;
    border: 1px solid rgba(93, 138, 184, 0.2) !important;
    border-radius: 10px !important;
}

/* 新拟态主题关闭按钮增强 */
.c-exam-theme-neumorphism .c-exam-settings-modal-close {
    border: none !important;
    background: rgba(93, 138, 184, 0.15) !important;
    border-radius: 8px !important;
    color: #5d8ab8 !important;
}

.c-exam-theme-neumorphism .c-exam-settings-modal-close:hover {
    background: rgba(93, 138, 184, 0.25) !important;
}

/* 新拟态主题模态框内容增强 */
.c-exam-theme-neumorphism .c-exam-settings-modal-content {
    background: linear-gradient(145deg, #e8f0f8, #d4e6f9) !important;
    border: 1px solid rgba(93, 138, 184, 0.3) !important;
    border-radius: 16px !important;
    box-shadow: 8px 8px 16px rgba(74, 111, 165, 0.15), -8px -8px 16px rgba(255, 255, 255, 0.4) !important;
}

/* ========== 题目分数标签样式 ========== */

/* 题目分数标签 - 客观题部分得分 */
.c-exam-ai-score {
    display: inline-block;
    padding: 2px 8px;
    border: 1px dashed #666;
    border-radius: 6px;
    font-size: 12px;
    background: transparent;
    color: #666;
    margin-left: 8px;
    font-weight: 500;
}

/* 题目分数显示区域 - 程序设计题 */
.c-exam-ai-score-display {
    margin-top: 12px;
    margin-bottom: 10px;
    padding: 6px 12px;
    border: 1px dashed #666;
    border-radius: 6px;
    background: transparent;
    display: inline-block;
}

.c-exam-ai-score-display strong {
    color: #666;
    font-size: 13px;
    font-weight: 500;
}

/* 新拟态主题下的题目分数样式 */
.c-exam-theme-neumorphism .c-exam-ai-score {
    border-color: #7aa8d6;
    color: #7aa8d6;
}

.c-exam-theme-neumorphism .c-exam-ai-score-display {
    border-color: #7aa8d6;
}

.c-exam-theme-neumorphism .c-exam-ai-score-display strong {
    color: #7aa8d6;
}
