/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: #f8f9fa; color: #333; line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: #3498db; text-decoration: none; }
a:hover { text-decoration: underline; }

/* === Navbar === */
.navbar { background: #2c3e50; color: white; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; height: 56px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.nav-left, .nav-right { display: flex; align-items: center; gap: 18px; }
.brand { font-size: 18px; font-weight: 700; color: white !important; }
.nav-link { color: #bdc3c7 !important; font-size: 14px; transition: color .2s; }
.nav-link:hover { color: white !important; text-decoration: none; }
.nav-user { color: #ecf0f1; font-size: 14px; }

/* === Container === */
.container { max-width: 100%; margin: 0 auto; padding: 6px 12px; flex: 1; }
footer { text-align: center; padding: 6px; color: #999; font-size: 11px; }

/* === Auth === */
.auth-box { max-width: 380px; margin: 60px auto; background: white; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); text-align: center; }
.auth-box h1 { margin-bottom: 8px; }
.auth-box p { color: #666; margin-bottom: 20px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input { padding: 12px 16px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.auth-form input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.auth-form button, .btn { padding: 12px 24px; background: #3498db; color: white; border: none; border-radius: 8px; font-size: 15px; cursor: pointer; transition: background .2s; display: inline-block; }
.auth-form button:hover, .btn:hover { background: #2980b9; text-decoration: none; }
.auth-link { margin-top: 16px; font-size: 14px; }
.auth-hint { margin-top: 12px; font-size: 12px; color: #aaa; }
.alert { background: #ffeaa7; color: #d35400; padding: 10px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }

/* === Hero === */
.hero { text-align: center; margin: 20px 0 30px; }
.hero h1 { font-size: 28px; margin-bottom: 8px; }
.hero p { color: #666; }

/* === Subject Grid === */
.subject-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.subject-card { background: white; border-radius: 12px; padding: 24px 16px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform .2s, box-shadow .2s; color: inherit !important; }
.subject-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.12); text-decoration: none; }
.subject-icon { font-size: 40px; margin-bottom: 8px; }
.subject-name { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.subject-stats { font-size: 12px; color: #999; }

/* === Exam List === */
.exam-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.exam-card { background: white; border-radius: 10px; padding: 20px; text-align: center; box-shadow: 0 2px 6px rgba(0,0,0,0.05); transition: transform .2s; color: inherit !important; }
.exam-card:hover { transform: translateY(-1px); text-decoration: none; }
.exam-year { font-size: 28px; font-weight: 700; color: #3498db; margin-bottom: 4px; }
.exam-info { font-size: 13px; color: #888; }

/* === Question Cards === */
.progress-bar-wrapper { background: #e0e0e0; border-radius: 10px; height: 6px; margin-bottom: 16px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #27ae60, #2ecc71); border-radius: 10px; transition: width .3s; width: 0; }
.exam-stats { display: flex; gap: 24px; margin-bottom: 20px; font-size: 14px; color: #666; }
.question-card { background: white; border-radius: 12px; padding: 24px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-left: 4px solid #e0e0e0; transition: border-color .3s; }
.question-card.answered { border-left-color: #3498db; }
.question-card.correct { border-left-color: #27ae60; }
.q-header { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.q-number { font-weight: 700; font-size: 16px; background: #3498db; color: white; padding: 2px 10px; border-radius: 6px; }
.q-type { font-size: 12px; background: #ecf0f1; padding: 2px 8px; border-radius: 4px; color: #666; }
.q-score { font-size: 12px; color: #999; }
.q-status { margin-left: auto; font-weight: 700; font-size: 14px; }
.q-status.done { color: #3498db; }
.q-status.correct { color: #27ae60; }
.q-status.wrong { color: #e74c3c; }
.q-content { margin-bottom: 16px; font-size: 15px; line-height: 1.8; }

/* === Options === */
.q-options { display: flex; flex-direction: column; gap: 8px; }
.option { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border: 1px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: background .2s; }
.option:hover { background: #f0f4ff; }
.option input[type=radio] { margin-top: 3px; }
.option-key { font-weight: 600; color: #3498db; min-width: 20px; }

.q-input { display: flex; gap: 10px; }
.q-input input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.q-input button { padding: 10px 20px; background: #3498db; color: white; border: none; border-radius: 8px; cursor: pointer; }

.q-result { margin-top: 14px; padding: 14px; border-radius: 8px; font-size: 14px; line-height: 1.6; }
.result-correct { color: #27ae60; font-weight: 600; margin-bottom: 4px; }
.result-wrong { color: #e74c3c; font-weight: 600; margin-bottom: 4px; }
.result-explain { margin-top: 8px; color: #555; background: #f8f9fa; padding: 10px; border-radius: 6px; }

/* === Wrong Questions === */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter-bar a { padding: 6px 14px; border-radius: 20px; background: #ecf0f1; color: #666; font-size: 13px; transition: .2s; }
.filter-bar a.active, .filter-bar a:hover { background: #3498db; color: white; text-decoration: none; }
.wrong-card { background: white; border-radius: 10px; padding: 20px; margin-bottom: 14px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); border-left: 4px solid #e74c3c; }
.wrong-meta { display: flex; gap: 8px; margin-bottom: 10px; font-size: 12px; }
.tag { background: #3498db; color: white; padding: 2px 8px; border-radius: 4px; }
.wrong-content { font-size: 14px; margin-bottom: 10px; }
.wrong-options { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.wrong-options span { padding: 4px 10px; border-radius: 4px; background: #f0f0f0; }
.opt-right { background: #d5f5e3 !important; color: #27ae60 !important; }
.opt-wrong { background: #fadbd8 !important; color: #e74c3c !important; }
.wrong-footer { display: flex; gap: 16px; font-size: 13px; }
.your-answer { color: #e74c3c; }
.right-answer { color: #27ae60; }
.wrong-explain { margin-top: 10px; font-size: 13px; color: #555; padding: 10px; background: #f8f9fa; border-radius: 6px; }

/* === Stats === */
.stats-table { width: 100%; background: white; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); border-collapse: collapse; }
.stats-table th, .stats-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.stats-table th { background: #f8f9fa; font-weight: 600; font-size: 13px; color: #666; }
.stats-table td { font-size: 14px; }
.skill-bar { height: 8px; background: #e0e0e0; border-radius: 4px; min-width: 100px; overflow: hidden; }
.skill-fill { height: 100%; border-radius: 4px; transition: width .5s; }

/* === Helpers === */
.back-link { display: inline-block; margin-bottom: 16px; color: #666; font-size: 14px; }
.empty { text-align: center; padding: 60px 20px; color: #999; }
.empty p { margin-bottom: 16px; font-size: 16px; }
.quick-actions { display: flex; gap: 12px; justify-content: center; margin: 20px 0; }
.action-buttons { display: flex; gap: 12px; justify-content: center; margin: 24px 0; }
h1 { font-size: 22px; margin: 0 0 16px; }

/* === Responsive === */
@media (max-width: 600px) {
    .subject-grid, .exam-list { grid-template-columns: repeat(2, 1fr); }
    .navbar { padding: 0 12px; }
    .nav-left { gap: 10px; }
    .container { padding: 12px; }
    .chat-layout { grid-template-columns: 1fr !important; }
    .data-cards { flex-direction: column !important; }
    .data-cards .card { flex: none !important; }
}

/* === Nav Dropdown === */
.nav-dropdown { position: relative; display: inline-block; }
.dropdown-trigger { cursor: pointer; user-select: none; }
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: white; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 220px; z-index: 1000; padding: 8px 0; margin-top: 4px; }
.nav-dropdown:hover .dropdown-menu { display: block; }
.dropdown-group { padding: 4px 0; }
.dropdown-group + .dropdown-group { border-top: 1px solid #f0f0f0; }
.dropdown-label { padding: 6px 16px; font-size: 11px; color: #999; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.dropdown-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; font-size: 14px; color: #333 !important; transition: background .15s; white-space: nowrap; }
.dropdown-item:hover { background: #f0f4ff; text-decoration: none !important; }
.subj-stat { font-size: 11px; margin-left: 12px; white-space: nowrap; }

/* === Chat Layout === */
.chat-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; height: calc(100vh - 120px); min-height: 500px; margin-top: 8px; }
.data-cards { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; }
.data-cards .card { background: white; border-radius: 10px; padding: 14px 16px; box-shadow: 0 2px 6px rgba(0,0,0,0.05); flex-shrink: 0; }
.data-cards .card h4 { font-size: 13px; color: #888; margin-bottom: 8px; font-weight: 500; }
.data-cards .card .big-num { font-size: 28px; font-weight: 700; }
.data-cards .card .sub { font-size: 12px; color: #999; margin-top: 2px; }
.data-cards .card-row { display: flex; gap: 10px; }
.data-cards .card-row .card { flex: 1; }
.subject-bars { display: flex; flex-direction: column; gap: 6px; }
.subject-bar-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.subject-bar-row .s-name { width: 36px; color: #666; }
.subject-bar-row .s-bar { flex: 1; height: 14px; background: #e0e0e0; border-radius: 7px; overflow: hidden; position: relative; }
.subject-bar-row .s-bar .s-fill { height: 100%; border-radius: 7px; min-width: 0; transition: width .5s; }
.subject-bar-row .s-bar .s-label { position: absolute; left: 6px; top: 0; line-height: 14px; font-size: 10px; color: white; font-weight: 600; }
.subject-bar-row .s-stat { width: 56px; text-align: right; color: #999; font-size: 11px; }

/* === Chat Panel === */
.chat-panel { display: flex; flex-direction: column; background: white; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.chat-header { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.chat-header .ai-badge { background: linear-gradient(135deg, #667eea, #764ba2); color: white; padding: 2px 10px; border-radius: 10px; font-size: 11px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-msg { max-width: 85%; padding: 12px 16px; border-radius: 12px; font-size: 14px; line-height: 1.7; animation: msgIn .2s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.user { align-self: flex-end; background: #3498db; color: white; border-bottom-right-radius: 4px; }
.chat-msg.ai { align-self: flex-start; background: #f0f4ff; color: #333; border-bottom-left-radius: 4px; }
.chat-msg.ai p { margin: 4px 0; }
.chat-msg.ai p:first-child { margin-top: 0; }
.chat-msg.ai p:last-child { margin-bottom: 0; }
.chat-msg.ai ul, .chat-msg.ai ol { margin: 4px 0; padding-left: 18px; }
.chat-msg.ai li { margin: 2px 0; }
.chat-msg.ai strong { color: #2c3e50; }
.chat-msg.ai code { background: #e8eaf6; padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.chat-msg .msg-time { font-size: 10px; opacity: 0.6; margin-top: 4px; }
.chat-typing { display: none; padding: 8px 16px; color: #999; font-size: 13px; }
.chat-typing.active { display: block; }
.chat-typing .dot { animation: blink 1.4s infinite; }
.chat-typing .dot:nth-child(2) { animation-delay: .2s; }
.chat-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%,60%,100% { opacity: 0.2; } 30% { opacity: 1; } }
.chat-input-area { border-top: 1px solid #f0f0f0; padding: 12px 20px; display: flex; gap: 10px; }
.chat-input-area textarea { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; resize: none; height: 44px; line-height: 1.5; font-family: inherit; }
.chat-input-area textarea:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 3px rgba(52,152,219,0.1); }
.chat-input-area button { padding: 10px 20px; background: linear-gradient(135deg, #667eea, #764ba2); color: white; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: opacity .2s; }
.chat-input-area button:hover { opacity: 0.9; }
.chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-suggestions { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 20px 12px; }
.chat-suggestions button { padding: 6px 14px; border: 1px solid #e0e0e0; border-radius: 16px; background: white; cursor: pointer; font-size: 12px; color: #666; transition: .2s; }
.chat-suggestions button:hover { border-color: #3498db; color: #3498db; }

/* === 文件上传 === */
.upload-btn { width: 44px; height: 44px; border: 1px dashed #ccc; border-radius: 8px; background: white; cursor: pointer; font-size: 22px; color: #999; display: flex; align-items: center; justify-content: center; transition: .2s; position: relative; flex-shrink: 0; }
.upload-btn:hover { border-color: #667eea; color: #667eea; background: #f8f6ff; }
.upload-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-preview-area { display: none; padding: 8px 20px 0; flex-wrap: wrap; gap: 6px; }
.file-preview-area.has-files { display: flex; }
.file-chip { display: flex; align-items: center; gap: 6px; padding: 5px 10px; background: #f0f4ff; border-radius: 8px; font-size: 12px; max-width: 200px; }
.file-chip .file-icon { font-size: 18px; }
.file-chip .file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-chip .file-size { color: #999; font-size: 10px; }
.file-chip .file-remove { cursor: pointer; color: #e74c3c; font-weight: 700; padding: 0 2px; }
.file-chip .file-remove:hover { color: #c0392b; }
.chat-msg .uploaded-file { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(255,255,255,0.2); border-radius: 8px; margin-bottom: 6px; font-size: 12px; }
.chat-msg .uploaded-file .file-type-badge { background: rgba(255,255,255,0.3); padding: 2px 8px; border-radius: 4px; font-weight: 600; }
.chat-msg .uploaded-file .file-size-badge { opacity: 0.7; }

/* 手机端试卷布局：上下排列 */
@media (max-width: 900px) {
    .paper-layout { grid-template-columns: 1fr; height: auto; }
    .paper-view { height: 60vh; }
    .answer-sheet { position: relative; max-height: none; }
}

/* === Paper Layout (原卷+答题卡) === */
.paper-layout { display: grid; grid-template-columns: 3fr 1fr; gap: 12px; height: calc(100vh - 70px); margin-top: 4px; }
.paper-view { overflow-y: auto; overflow-x: hidden; min-width: 0; }
.zoom-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: white; border-radius: 8px 8px 0 0; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; z-index: 10; }
.zoom-bar button { width: 28px; height: 28px; border: 1px solid #ddd; background: white; border-radius: 4px; cursor: pointer; font-size: 14px; }
.zoom-bar span { font-size: 12px; min-width: 36px; text-align: center; }
.paper-wrap { background: #f0f0f0; border-radius: 0 0 8px 8px; padding: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); transition: transform .2s; }
.paper-page { display: block; width: 100%; margin-bottom: 2px; background: white; }

.answer-sheet { background: white; border-radius: 8px; padding: 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); position: sticky; top: 0; max-height: 100%; overflow-y: auto; display: flex; flex-direction: column; align-self: start; }
.answer-sheet h3 { margin: 0 0 10px; font-size: 15px; }
.sheet-grid { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.sheet-item { display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 4px; border: 1px solid #e0e0e0; transition: .2s; }
.sheet-num { font-weight: 700; min-width: 24px; color: #555; cursor: pointer; font-size: 12px; }
.sheet-choices { display: flex; gap: 6px; flex-wrap: wrap; }
.sheet-choices label { cursor: pointer; font-size: 12px; display: flex; align-items: center; gap: 1px; padding: 2px 0; }
.sheet-input { width: 80px; padding: 4px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; }
.sheet-result { margin-left: auto; font-weight: 700; font-size: 14px; min-width: 40px; text-align: right; }
.sheet-result.correct { color: #27ae60; }
.sheet-result.wrong { color: #e74c3c; }
.sheet-result.missed { color: #f39c12; }
.btn-submit { background: #27ae60; margin-right: 8px; }
.btn-submit:hover { background: #219a52; }
.btn-clear { background: #95a5a6; }
.btn-clear:hover { background: #7f8c8d; }

/* === Wrong Stats Panel === */
.wrong-stats { background: white; border-radius: 10px; padding: 16px 20px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.stats-total { font-size: 16px; margin-bottom: 10px; color: #e74c3c; }
.stats-total strong { font-size: 24px; }
.stats-breakdown { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-chip { display: flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px; background: #f0f0f0; color: #666; font-size: 13px; transition: .2s; }
.stat-chip:hover { background: #e0e0e0; text-decoration: none; }
.stat-chip.active { background: #e74c3c; color: white; }
.chip-count { background: rgba(0,0,0,0.15); padding: 1px 7px; border-radius: 10px; font-weight: 700; font-size: 12px; }
.stat-chip.active .chip-count { background: rgba(255,255,255,0.25); }

/* === Wrong Card Improvements === */
.wrong-card { transition: all 0.3s; }
.wrong-card-header { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.tag-subject { background: #e74c3c; color: white; padding: 2px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; }
.tag-year { background: #3498db; color: white; }
.tag-num { background: #2c3e50; color: white; }
.tag-type { background: #95a5a6; color: white; }
.tag-time { background: #ecf0f1; color: #999; font-size: 11px; }
.wrong-card-body { margin-bottom: 10px; }
.wrong-answer-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 14px; }
.wrong-explain-hint { color: #f39c12; cursor: pointer; font-size: 13px; user-select: none; }
.wrong-explain-hint:hover { text-decoration: underline; }
.wrong-explain { display: none; padding: 10px; background: #f8f9fa; border-radius: 6px; font-size: 13px; color: #555; margin-top: 8px; flex-basis: 100%; }
.wrong-explain.show { display: block; }

/* === Redo Area === */
.redo-area { border-top: 1px dashed #e0e0e0; padding-top: 10px; margin-top: 8px; }
.redo-prompt { color: #3498db; cursor: pointer; font-size: 14px; padding: 6px 0; transition: .2s; }
.redo-prompt:hover { color: #2980b9; }
.redo-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.redo-choices { display: flex; gap: 6px; }
.redo-opt { display: flex; align-items: center; gap: 3px; padding: 6px 14px; border: 1px solid #ddd; border-radius: 6px; cursor: pointer; font-size: 14px; transition: .2s; }
.redo-opt:hover { background: #f0f4ff; border-color: #3498db; }
.redo-opt input { margin: 0; }
.redo-input { padding: 8px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; min-width: 120px; }
.btn-redo { background: #27ae60; padding: 8px 18px; font-size: 14px; }
.btn-redo:hover { background: #219a52; }
.redo-result { font-size: 14px; margin-left: 8px; font-weight: 600; }
.redo-result.loading { color: #f39c12; }
.redo-result.correct { color: #27ae60; }
.redo-result.wrong { color: #e74c3c; }
.redo-result.missed { color: #f39c12; }

/* === Wrong Card Footer === */
.wrong-card-footer { display: flex; gap: 8px; margin-top: 12px; padding-top: 10px; border-top: 1px solid #f0f0f0; }
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: 6px; }
.btn-outline { background: transparent; border: 1px solid #ddd; color: #666; }
.btn-outline:hover { background: #f8f9fa; border-color: #3498db; color: #3498db; }
.btn-resolve { border-color: #27ae60; color: #27ae60; }
.btn-resolve:hover { background: #d5f5e3; }

/* === Upload Wrong === */
.upload-wrong-box { background: white; border-radius: 10px; padding: 0; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); overflow: hidden; }
.upload-header { padding: 14px 20px; cursor: pointer; font-weight: 600; font-size: 15px; user-select: none; border-bottom: 1px solid #f0f0f0; }
.upload-header:hover { background: #f8f9fa; }
.upload-form { display: none; padding: 16px 20px; }
.upload-form.show { display: block; }

/* === Print Styles === */
@media print {
    .navbar, footer, .zoom-bar, .btn, .no-print, .upload-wrong-box,
    .answer-sheet .btn-submit, .answer-sheet .btn-clear, .answer-sheet h3,
    .redo-area, .wrong-card-footer, .filter-bar, .back-link, #timer {
        display: none !important;
    }
    body { background: white; font-size: 12pt; }
    .container { padding: 0; margin: 0; max-width: 100%; }
    .paper-layout { display: block; height: auto; }
    .paper-view { overflow: visible; height: auto; }
    .paper-page { page-break-after: always; width: 100%; }
    .answer-sheet { position: static; max-height: none; box-shadow: none; border: 1px solid #ccc; page-break-before: always; }
    .wrong-card { box-shadow: none; border: 1px solid #ccc; page-break-inside: avoid; }
    .wrong-stats { box-shadow: none; border: 1px solid #ccc; }
    .sheet-choices label { color: black; }
    .sheet-result { color: black !important; }
    .sheet-input { border: 1px solid #999; background: white; }
    @page { margin: 10mm; }
}

