* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #ff6a3d 0%, #ff9a3d 60%, #ffe6c2 100%);
    color: #333;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
#app { max-width: 640px; margin: 0 auto; padding: 16px; min-height: 100vh; }
.loading { text-align: center; padding: 80px 0; color: #fff; }

.card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    margin-bottom: 14px;
}
.banner {
    color: #fff;
    text-align: center;
    padding: 24px 12px 16px;
}
.banner h1 { font-size: 20px; margin: 0 0 8px; line-height: 1.4; }
.banner p  { margin: 0; font-size: 13px; opacity: 0.92; }
.badge {
    display: inline-block;
    background: rgba(255,255,255,0.22);
    border: 1px solid rgba(255,255,255,0.4);
    color: #fff;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    margin-top: 10px;
}

h2 { font-size: 17px; margin: 0 0 10px; color: #d94e1f; }
h3 { font-size: 15px; margin: 16px 0 6px; color: #333; }
p, li { font-size: 14px; line-height: 1.7; }
ol { padding-left: 22px; margin: 6px 0; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.field input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    font-size: 15px;
    background: #fafafa;
    outline: none;
}
.field input:focus { border-color: #ff6a3d; background: #fff; }

.btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(90deg, #ff6a3d, #ff8a3d);
    box-shadow: 0 4px 12px rgba(255, 106, 61, 0.35);
    cursor: pointer;
}
.btn:disabled { opacity: 0.5; }
.btn.secondary {
    background: #fff;
    color: #d94e1f;
    border: 1px solid #ffd2bf;
    box-shadow: none;
}
.btn + .btn { margin-top: 10px; }

.notice {
    background: #fff8ee;
    border: 1px solid #ffdfa3;
    color: #b86b00;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}
.error {
    background: #ffefef;
    border: 1px solid #ffc6c6;
    color: #c0392b;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.timer {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.timer .clock { color: #d94e1f; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; }
.timer .clock.warn { color: #c0392b; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0.4; } }

.q-stem { font-size: 15px; font-weight: 600; line-height: 1.6; margin-bottom: 12px; color: #222; }
.q-no   { color: #ff6a3d; margin-right: 6px; }

.option {
    display: flex;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid #eee;
    border-radius: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    background: #fafafa;
    font-size: 14px;
    line-height: 1.6;
}
.option .letter {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid #ccc;
    margin-right: 10px;
    text-align: center;
    line-height: 22px;
    font-size: 13px;
    color: #999;
    font-weight: 600;
    background: #fff;
}
.option.selected {
    background: #fff3ec;
    border-color: #ff6a3d;
}
.option.selected .letter {
    background: #ff6a3d;
    color: #fff;
    border-color: #ff6a3d;
}
.option.right    { background: #ebfaef; border-color: #2ecc71; }
.option.right    .letter { background: #2ecc71; color: #fff; border-color: #2ecc71; }
.option.wrong    { background: #fdecec; border-color: #e74c3c; }
.option.wrong    .letter { background: #e74c3c; color: #fff; border-color: #e74c3c; }

.result-hero {
    text-align: center;
    padding: 18px 12px;
}
.result-hero .icon { font-size: 56px; line-height: 1; margin-bottom: 8px; }
.result-hero .score {
    font-size: 14px; color: #666;
}
.result-hero .score b { color: #d94e1f; font-size: 24px; }
.result-hero h2 { color: #2ecc71; margin: 8px 0 4px; }
.result-hero.fail h2 { color: #e74c3c; }

.detail-item { padding: 12px 0; border-bottom: 1px dashed #eee; }
.detail-item:last-child { border-bottom: none; }

.foot { text-align: center; color: rgba(255,255,255,0.85); padding: 16px 0 28px; font-size: 12px; }
