/* __V3D_TEMPLATE__ - template-based file; delete this line to prevent this file from being updated */

body {
    margin: 0px;
    overflow: hidden;
}

noscript {
    display: block;
    text-align: center;
    padding-top: 100px;
    font-size: 20px;
}

.v3d-container {
    position: absolute;
    top: 0px;
    left: 0px;
    width: 100%;
    height: 100%;
}

.fullscreen-button {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    background-size: 100% 100%;
    display: none;
    z-index: 1;
}

.fullscreen-open {
    background-image: url('media/fullscreen_open.svg');
}

.fullscreen-close {
    background-image: url('media/fullscreen_close.svg');
}

/* removes tap blinking on ios devices */
* { -webkit-tap-highlight-color:rgba(0,0,0,0); }


.v3d-simple-preloader-logo {
    background-image: url('media/logo180.png');
}

/* Verge3D 默认加载层为白底；改为与分数课件主画布一致 */
.v3d-simple-preloader-background {
    background-color: #3d4a54 !important;
}

/* --- 分数课件：全屏操作区 + 底部控制（移动端适配） --- */
#fraction-lesson-root {
    display: none;
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    z-index: 20;
    width: 100%;
    height: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    padding-top: env(safe-area-inset-top, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    font-family: system-ui, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: #263238;
}

#fraction-lesson-root .fraction-lesson-stage {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    position: relative;
    overflow: hidden;
    background: #3d4a54;
    touch-action: none;
}

#fraction-lesson-root .fraction-lesson-svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    display: block;
    touch-action: none;
}

.fraction-lesson-controls {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 10px max(14px, env(safe-area-inset-right, 14px)) max(14px, env(safe-area-inset-bottom, 14px)) max(14px, env(safe-area-inset-left, 14px));
    background: #263238;
    color: #eceff1;
    border-top: 2px solid #455a64;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.25);
}

.fraction-lesson-controls .fl-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: flex-end;
    justify-content: center;
}

.fraction-lesson-controls .fl-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: clamp(13px, 3.6vw, 15px);
    font-weight: 600;
}

.fraction-lesson-controls .fl-label-text {
    color: #b0bec5;
}

.fraction-lesson-controls input[type="number"] {
    box-sizing: border-box;
    width: min(100px, 26vw);
    min-width: 72px;
    font-size: clamp(18px, 4.5vw, 22px);
    font-weight: 700;
    padding: 12px 10px;
    border-radius: 10px;
    border: 2px solid #78909c;
    background: #fffde7;
    color: #37474f;
    text-align: center;
}

.fraction-lesson-controls input[type="number"]:focus {
    outline: none;
    border-color: #ffb74d;
    box-shadow: 0 0 0 3px rgba(255, 183, 77, 0.35);
}

.fraction-lesson-controls .fl-hint {
    margin: 8px 0 0;
    text-align: center;
    font-size: clamp(12px, 3.2vw, 14px);
    color: #90a4ae;
    line-height: 1.35;
}

@media (max-width: 520px) {
    .fraction-lesson-controls .fl-row {
        flex-direction: column;
        align-items: stretch;
    }

    .fraction-lesson-controls .fl-label {
        width: 100%;
    }

    .fraction-lesson-controls input[type="number"] {
        width: 100%;
        max-width: none;
    }
}

@media (orientation: landscape) and (max-height: 420px) {
    .fraction-lesson-controls {
        padding-top: 6px;
        padding-bottom: max(8px, env(safe-area-inset-bottom, 8px));
    }

    .fraction-lesson-controls .fl-hint {
        display: none;
    }
}

/* --- 随机考试：顶部提示 + SVG 内输入 --- */
#fl-exam-banner {
    display: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    padding: 10px 14px 12px;
    background: #1c2830;
    color: #eceff1;
    border-bottom: 2px solid #455a64;
    text-align: center;
}

#fl-exam-banner.fl-exam-banner-visible {
    display: block;
}

#fl-exam-banner .fl-exam-banner-text {
    margin: 0 0 10px;
    font-size: clamp(13px, 3.4vw, 16px);
    line-height: 1.45;
    font-weight: 600;
    color: #fff9c4;
}

#fl-exam-banner .fl-exam-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

#fl-exam-banner .fl-exam-banner-actions button {
    cursor: pointer;
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 10px;
    border: 2px solid #78909c;
    background: #37474f;
    color: #eceff1;
}

#fl-exam-banner .fl-exam-banner-actions button:hover {
    border-color: #ffb74d;
    background: #455a64;
}

#fl-exam-banner .fl-exam-opt-decimal {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 8px 12px;
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 700;
    color: #eceff1;
    cursor: pointer;
    user-select: none;
    border-radius: 10px;
    border: 2px solid #546e7a;
    background: #37474f;
}

#fl-exam-banner .fl-exam-opt-decimal:hover {
    border-color: #90a4ae;
}

#fl-exam-banner .fl-exam-opt-decimal input {
    width: 18px;
    height: 18px;
    accent-color: #ffb74d;
    cursor: pointer;
}

#fl-exam-banner .fl-exam-feedback {
    margin: 10px 0 0;
    min-height: 1.35em;
    font-size: clamp(13px, 3.2vw, 15px);
    font-weight: 700;
}

#fl-exam-banner .fl-exam-feedback.ok {
    color: #a5d6a7;
}

#fl-exam-banner .fl-exam-feedback.bad {
    color: #ffab91;
}

.fraction-lesson-controls .fl-btn-exam {
    cursor: pointer;
    font-size: clamp(14px, 3.6vw, 16px);
    font-weight: 800;
    padding: 12px 18px;
    border-radius: 10px;
    border: 2px solid #ffb74d;
    background: #ff8f00;
    color: #3e2723;
}

.fraction-lesson-controls .fl-btn-exam:hover {
    filter: brightness(1.06);
}

.fraction-lesson-controls .fl-btn-exam.fl-btn-exam-secondary {
    background: #455a64;
    border-color: #78909c;
    color: #eceff1;
}

.fraction-lesson-controls .fl-btn-exam-secondary {
    border-color: #78909c;
    background: #455a64;
    color: #eceff1;
}

.fl-exam-fo-inner {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}

input.fl-exam-input {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 6px;
    border: 2px solid #ffb74d;
    background: #fffde7;
    color: #263238;
    text-align: center;
    font-weight: 800;
    font-size: 16px;
    font-family: system-ui, "Segoe UI", "Microsoft YaHei", sans-serif;
}

input.fl-exam-input:focus {
    outline: none;
    border-color: #42a5f5;
    box-shadow: 0 0 0 2px rgba(66, 165, 245, 0.35);
}

input.fl-exam-input.fl-exam-wrong {
    border-color: #e53935;
    background: #ffebee;
}

input.fl-exam-input.fl-exam-right {
    border-color: #43a047;
    background: #e8f5e9;
}