/* 答题学习系统样式：从 cmp-pythonpvz 的 quiz_ui.py 迁移 */
/* 隐藏右上角的"调速/菜单"按钮（保留 DOM，避免原代码引用报错） */
#dMenu { display: none !important }

#dQuizMask {
    position: fixed; left: var(--game-left,50%); top: var(--game-top,50%);
    transform: scale(var(--game-scale,1)); transform-origin: top left;
    width: 900px; height: 600px; overflow: hidden;
    background: rgba(0, 0, 0, 0.55); z-index: 100000; display: none;
}
#dQuizPanel {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 680px; max-height: 92%; box-sizing: border-box;
    background: linear-gradient(#fffaf0, #ffedc4);
    border: 6px solid #c8901e; border-radius: 22px;
    box-shadow: 0 0 0 3px #6b3f00, 0 12px 40px rgba(0,0,0,.6);
    padding: 18px 24px 20px; font-family: "Microsoft YaHei", "SimHei", sans-serif;
    color: #4a2c00; overflow: hidden;
}
#dQuizHead { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
#dQuizTitle { font-size: 22px; font-weight: bold; color: #7a3d00; text-shadow: 1px 1px 0 #fff; white-space: nowrap; }
#dQuizTimer { font-size: 15px; font-weight: bold; color: #2e7d32; white-space: nowrap; padding: 3px 10px; border-radius: 12px; background: #e8f5e9; }
#dQuizTimer.urgent { color: #fff; background: #d30000; }
#dQuizHint { font-size: 13px; color: #9a7a4a; margin-bottom: 10px; }
#dQuizProgress { font-size: 15px; font-weight: bold; color: #6b3f00; margin-bottom: 0; white-space: nowrap; padding: 5px 12px; border-radius: 12px; background: #f5e6b8; }
#dQuizStats { display: inline-block; margin-left: 6px; font-weight: normal; }
#dQuizStats .ok { color: #2e7d32; font-weight: bold; }
#dQuizStats .no { color: #c62828; font-weight: bold; }
#dQuizQ {
    font-size: 25px; line-height: 1.6; font-weight: bold; color: #3e2600;
    background: #fff; border: 2px solid #e0b955; border-left: 7px solid #d29a13; border-radius: 12px;
    padding: 13px 18px; margin-bottom: 16px; min-height: 52px;
}
#dQuizOptions { display: flex; gap: 11px; margin-bottom: 14px; }
.quiz-opt {
    position: relative; display: flex; flex: 1; min-width: 0; align-items: center; min-height: 54px;
    background: #fffdf5; border: 2px solid #c9a227; border-radius: 10px;
    font-size: 19px; color: #3e2600; cursor: pointer; padding: 8px 10px 8px 46px;
    box-sizing: border-box; transition: background .12s, border-color .12s;
}
.quiz-opt:hover { background: #fff3c4; }
.quiz-opt.selected { border-color: #1e88e5; background: #e3f2fd; }
.quiz-opt.correct { border-color: #2e7d32; background: #c8e6c9 !important; }
.quiz-opt.wrongsel { border-color: #c62828; background: #ffcdd2 !important; }
.quiz-badge {
    position: absolute; left: 6px; top: 50%; transform: translateY(-50%);
    width: 32px; height: 32px; border-radius: 50%; background: #c8901e;
    color: #fff; font-weight: bold; font-size: 15px; text-align: center; line-height: 32px;
}
.quiz-opt.selected .quiz-badge { background: #1e88e5; }
.quiz-opt.correct .quiz-badge, .quiz-opt.wrongsel .quiz-badge { background: #555; }
.quiz-mark { position: absolute; right: 10px; font-size: 21px; font-weight: bold; }
.quiz-opt.correct .quiz-mark { color: #2e7d32; }
.quiz-opt.wrongsel .quiz-mark { color: #c62828; }
#dQuizInputWrap { margin-bottom: 12px; }
#dQuizInput {
    width: 100%; box-sizing: border-box; font-size: 23px; padding: 10px 14px;
    border: 2px solid #c9a227; border-radius: 10px; background: #fffdf5; color: #3e2600;
}
#dQuizFeedback {
    font-size: 17px; line-height: 1.55; min-height: 30px; margin-bottom: 10px;
    color: #2e7d32; font-weight: bold; white-space: pre-line;
}
#dQuizFeedback.bad { color: #c62828; }
#dQuizBtns { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.quiz-btn {
    font-size: 18px; font-weight: bold; padding: 9px 28px; border-radius: 10px;
    border: 2px solid #8b4a00; background: linear-gradient(#ffd54f, #ffb300);
    color: #4a2c00; cursor: pointer; font-family: inherit;
}
.quiz-btn:hover { filter: brightness(1.06); }
.quiz-btn:disabled { opacity: .5; cursor: default; }
.quiz-btn.next { background: linear-gradient(#a5d6a7, #66bb6a); border-color: #2e7d32; }

/* 满分特效 */
#dPerfectFx { position: fixed; left: var(--game-left,50%); top: var(--game-top,50%); transform: scale(var(--game-scale,1)); transform-origin: top left; width: 900px; height: 600px; overflow: hidden; z-index: 100001; display: none; pointer-events: none; }
#dPerfectRays { position: absolute; left: 50%; top: 42%; width: 0; height: 0; }
.perfect-ray {
    position: absolute; left: -3px; top: -165px; width: 6px; height: 85px;
    background: linear-gradient(to top, rgba(255,200,70,0), rgba(255,200,70,.95));
    transform-origin: 3px 165px;
}
#dPerfectBoard {
    position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
    width: 340px; height: 170px; box-sizing: border-box;
    background: rgba(24, 16, 8, 210); border: 5px solid #ffc846; border-radius: 20px;
    text-align: center; padding-top: 26px;
}
#dPerfectTitle {
    font-size: 58px; font-weight: bold; color: #ffdc46;
    text-shadow: -2px -2px 0 #5a2300, 2px -2px 0 #5a2300, -2px 2px 0 #5a2300, 2px 2px 0 #5a2300,
                 0 -3px 0 #5a2300, 0 3px 0 #5a2300, -3px 0 0 #5a2300, 3px 0 0 #5a2300;
}
#dPerfectSun {
    font-size: 34px; font-weight: bold; color: #ffe65a; margin-top: 6px;
    text-shadow: -2px -2px 0 #3c1900, 2px -2px 0 #3c1900, -2px 2px 0 #3c1900, 2px 2px 0 #3c1900,
                 0 -2px 0 #3c1900, 0 2px 0 #3c1900, -2px 0 0 #3c1900, 2px 0 0 #3c1900;
}

/* 答题奖励阳光飞行 */
.quiz-fly-sun {
    position: fixed; width: 52px; height: 52px; z-index: 100002;
    pointer-events: none; opacity: .95;
}
