/* 基础布局 */
.ies-exam-container { max-width: 900px; margin: 0 auto; font-family: sans-serif; }
.ies-header-nav { display: flex; align-items: center; gap: 15px; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #ddd; }
.ies-exam-title { font-weight: bold; font-size: 1.1em; color: #333; }

/* 现代按钮样式 */
.ies-btn { padding: 8px 12px; border: none; border-radius: 6px; font-size: 13px; font-weight: bold; cursor: pointer; transition: all 0.2s; color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.ies-btn:hover { opacity: 0.85; transform: translateY(-1px); }
.ies-btn:active { transform: translateY(0); }
.ies-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.ies-btn-primary { background-color: #007bff; font-size: 14px; padding: 10px 18px;}
.ies-btn-success { background-color: #28a745; }
.ies-btn-danger { background-color: #dc3545; }
.ies-btn-warning { background-color: #ffc107; color: #212529; }
.ies-btn-dark { background-color: #343a40; }
.ies-btn-outline { background-color: transparent; border: 1px solid #6c757d; color: #495057; }
.ies-btn-outline:hover { background-color: #f8f9fa; }

/* 导航与进度栏 */
.ies-nav-bar { display: flex; justify-content: space-between; align-items: center; background: #f8f9fa; padding: 12px 20px; border-radius: 8px; margin-bottom: 20px; border: 1px solid #e9ecef; }
.ies-progress-text { font-weight: bold; font-size: 1.1em; color: #495057; }

/* 题目区块 */
.ies-question-block { margin-bottom: 40px; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); border: 1px solid #eef0f2; position: relative; }
.ies-q-header { font-weight: bold; font-size: 1.2em; margin-bottom: 15px; color: #212529; display: flex; justify-content: space-between; align-items: center; }
.ies-img-t { max-width: 100%; margin-bottom: 15px; display: block; border-radius: 4px; border: 1px solid #dee2e6; }

/* 画板与滑动区排版 */
.ies-drawing-wrapper { margin: 15px 0; background: #f8f9fa; padding: 10px; border-radius: 8px; border: 1px solid #dee2e6; }
.ies-canvas-layout { display: flex; gap: 8px; align-items: stretch; margin-bottom: 0; }
.ies-canvas-inner { flex: 1; min-width: 0; }
.ies-canvas { width: 100%; display: block; border: 2px solid #adb5bd; cursor: crosshair; touch-action: none; background: #fff; border-radius: 6px; box-shadow: inset 0 0 5px rgba(0,0,0,0.05); }

/* 右侧安全滑动区 */
.ies-scroll-zone { width: 35px; background: #e9ecef; border-radius: 6px; display: flex; align-items: center; justify-content: center; user-select: none; touch-action: pan-y; border: 1px dashed #ced4da; flex-shrink: 0; cursor: grab;}
.ies-scroll-text { writing-mode: vertical-rl; text-orientation: upright; color: #adb5bd; font-size: 12px; font-weight: bold; letter-spacing: 4px; }


/* 🌟 核心升级：向下扩展草稿区按钮 (浅色虚线框风格，像个天然的增加区块) */
.ies-bottom-tools { margin-top: 15px; }
.ies-btn-expand-zone {
    width: 100%;
    padding: 12px;
    background-color: #f1f3f5;
    border: 2px dashed #ced4da;
    color: #6c757d;
    border-radius: 8px;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.ies-btn-expand-zone:active {
    background-color: #e9ecef;
    border-color: #adb5bd;
    transform: scale(0.99);
}
@media (hover: hover) {
    .ies-btn-expand-zone:hover { background-color: #e9ecef; color: #495057; border-color: #adb5bd; }
}


/* 🌟 核心升级：左下角悬浮工具组 (缩小体积) */
.ies-floating-tools {
    position: fixed;
    bottom: 30px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99999;
}

/* 🌟 圆形悬浮图标按钮 (自带 SVG 背景，纯洁优雅，防止焦点黏连) */
.ies-btn-icon {
    width: 36px;   /* 按照你的要求缩小约 1/3 */
    height: 36px;
    border-radius: 50%;
    border: 1px solid #eef0f2;
    background-color: rgba(255, 255, 255, 0.95);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 18px 18px; /* 图标等比例缩放 */
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    cursor: pointer;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    transition: transform 0.1s, background-color 0.1s;
    outline: none !important; /* 强制干掉系统外边框 */
    -webkit-tap-highlight-color: transparent !important; /* 强制干掉手机点击发蓝 */
}
/* 解决手机端点击后一直保持激活状态发蓝的问题 */
.ies-btn-icon:focus { background-color: rgba(255, 255, 255, 0.95); }
.ies-btn-icon:active { transform: scale(0.85); background-color: #f1f3f5; }
@media (hover: hover) {
    .ies-btn-icon:hover { transform: scale(1.1); box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
}

/* 撤回图标 SVG Base64 */
.ies-btn-undo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23007bff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7v6h6'/%3E%3Cpath d='M21 17a9 9 0 00-9-9 9 9 0 00-6 2.3L3 13'/%3E%3C/svg%3E");
}
/* 清空图标 SVG Base64 */
.ies-btn-clear {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc3545' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 6 5 6 21 6'/%3E%3Cpath d='M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2'/%3E%3C/svg%3E");
}


/* 密码与阅卷 */
.ies-teacher-access { background: #fff3cd; padding: 15px; border-radius: 8px; display: flex; gap: 10px; align-items: center; border: 1px solid #ffeeba; }
.ies-pwd { padding: 8px; border: 1px solid #ced4da; border-radius: 4px; flex: 1; max-width: 200px; outline: none; }
.ies-pwd:focus { border-color: #80bdff; box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25); }

.ies-grader-panel { display: none; margin-top: 20px; padding: 20px; background: #f1f8ff; border-left: 5px solid #007bff; border-radius: 8px; }
.ies-stats { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.ies-retry-label { display: flex; align-items: center; gap: 5px; cursor: pointer; font-weight: bold; color: #495057; }
.ies-retry-label input { width: 18px; height: 18px; cursor: pointer; }

/* 列表页样式 */
.ies-exam-list ul.ies-list-ul { list-style: none; padding: 0; }
.ies-exam-list ul.ies-list-ul li { padding: 20px; background: #fff; border: 1px solid #eef0f2; margin-bottom: 15px; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.ies-links { margin-top: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
.ies-links a { padding: 6px 12px; text-decoration: none; border-radius: 6px; font-size: 14px; font-weight: bold; }
.tag-all { background: #e9ecef; color: #495057; }
.tag-done { background: #d4edda; color: #155724; }
.tag-undone { background: #f8d7da; color: #721c24; }
.tag-retry { background: #fff3cd; color: #856404; }

/* 移动端细微调整 */
@media (max-width: 600px) {
    .ies-stats { justify-content: space-between; width: 100%; }
    .ies-btn-hide-ans { width: 100%; margin-top: 10px; }
    .ies-question-block { padding: 12px; }
}