/* memory-hall.css — 记忆大厅猜学生 · 复古无圆角风 */
.mh-shell {
    position: relative;
    max-width: 760px;
    margin: 14px auto 40px;
    padding: 0;
    background: linear-gradient(180deg, #f4f6f8 0%, #e6ebf0 100%);
    border: 2px solid #9ab;
    border-top-color: #fff;
    border-left-color: #fff;
    box-shadow: 0 4px 0 #b9c4cf, 0 8px 18px rgba(40,60,80,.18);
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Tahoma, sans-serif;
    color: #234;
}

/* 标题栏 */
.mh-titlebar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #4a8fd6 0%, #2f6fb0 100%);
    border-bottom: 2px solid #1d4f86;
    color: #fff;
    text-shadow: 0 1px 0 #1d4f86;
}
.mh-logo { font-size: 18px; }
.mh-titlebar .mh-home-btn { font-size: 12px; padding: 4px 10px; }
.mh-title { font-size: 17px; margin: 0; font-weight: 700; letter-spacing: .5px; }
.mh-sub { margin-left: auto; font-size: 11px; opacity: .85; }

/* 战绩 */
.mh-stats {
    display: flex;
    gap: 6px;
    padding: 10px 12px;
    background: #dde6ee;
    border-bottom: 1px solid #c2cedb;
}
.mh-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    background: linear-gradient(180deg, #fff 0%, #e3eaf1 100%);
    border: 1px solid #aebccb;
    border-top-color: #fff;
    border-left-color: #fff;
}
.mh-stat-num { font-size: 22px; font-weight: 800; color: #1d4f86; font-variant-numeric: tabular-nums; }
.mh-stat-lab { font-size: 11px; color: #5a6b7b; margin-top: 2px; }

/* 舞台 / 截图 */
.mh-stage { padding: 12px; }
.mh-imgwrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        repeating-conic-gradient(#cfd8e0 0% 25%, #e7edf3 0% 50%) 50% / 28px 28px;
    border: 2px solid #8fa3b5;
    border-top-color: #6f8294;
    border-left-color: #6f8294;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.mh-img { display: block; width: 100%; height: 100%; image-rendering: auto; }
.mh-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #5a6b7b;
    background: rgba(231,237,243,.9);
    z-index: 3;
}
.mh-orig {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity .4s ease;
}
.mh-viewer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0 2px;
}
.mh-viewer.hidden { display: none; }
.mh-navbtn {
    font-family: inherit;
    font-size: 16px;
    line-height: 1;
    min-width: 42px;
    padding: 8px 14px;
    color: #234;
    background: linear-gradient(180deg, #fff 0%, #dde6ef 100%);
    border: 1px solid #9fb1c2;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
}
.mh-navbtn:hover { background: linear-gradient(180deg, #fffbe8 0%, #ffeec2 100%); }
.mh-navbtn:active { background: linear-gradient(180deg, #cdd8e2 0%, #eef3f8 100%); border-top-color: #9fb1c2; }
.mh-navbtn:disabled { opacity: .45; cursor: default; background: linear-gradient(180deg, #fff 0%, #e1e9f1 100%); }
.mh-navcount {
    min-width: 60px;
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #2b3a44;
}

.mh-hintbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
    min-height: 24px;
}
.mh-hinttext { font-size: 13px; color: #b35900; font-weight: 700; }

/* 开始界面 / 难度选择 */
.mh-start {
    position: absolute;
    inset: 0;
    background: rgba(18, 28, 38, .93);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 30;
}
.mh-start-box {
    width: 100%;
    max-width: 560px;
    background: linear-gradient(180deg, #f4f6f8 0%, #e6ebf0 100%);
    border: 2px solid #2f6fb0;
    box-shadow: 0 8px 30px rgba(0,0,0,.45);
    padding: 20px 18px;
    text-align: center;
}
.mh-start-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #1d4f86;
    text-shadow: 0 1px 0 #fff;
}
.mh-start-sub { font-size: 13px; color: #5a6b7b; margin: 8px 0 16px; }
.mh-start-diffs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.mh-start-diff {
    font-family: inherit;
    font-size: 13px;
    padding: 10px 4px;
    color: #234;
    background: linear-gradient(180deg, #fff 0%, #e1e9f1 100%);
    border: 1px solid #9fb1c2;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
}
.mh-start-diff small { display: block; font-size: 10px; color: #7a8b9b; margin-top: 3px; }
.mh-start-diff.active {
    color: #fff;
    background: linear-gradient(180deg, #5aa0e0 0%, #2f74bf 100%);
    border-color: #1d4f86;
    border-top-color: #8fc1ee;
    text-shadow: 0 1px 0 #1d4f86;
}
.mh-start-go { font-size: 15px; padding: 10px 30px; }
.mh-start-go:disabled { opacity: .5; cursor: default; box-shadow: none; }
.mh-start-foot { font-size: 11px; color: #7a8b9b; margin-top: 14px; }
.mh-sathint {
    font-size: 12px;
    font-weight: 700;
    color: #b35900;
    margin-left: 4px;
}
@media (max-width: 520px) { .mh-start-diffs { grid-template-columns: repeat(2, 1fr); } }

/* 反馈 */
.mh-feedback {
    margin: 0 12px 10px;
    padding: 8px 10px;
    min-height: 20px;
    font-size: 13px;
    border: 1px solid #c2cedb;
    background: #eef3f8;
    color: #33485c;
}
.mh-feedback.ok { background: #e7f6e7; border-color: #8ccb8c; color: #1d6b1d; }
.mh-feedback.no { background: #fdeaea; border-color: #e09a9a; color: #a32626; }
.mh-feedback a { color: #06c; }

/* 按钮 */
.mh-btn {
    font-family: inherit;
    font-size: 13px;
    padding: 7px 14px;
    color: #234;
    background: linear-gradient(180deg, #fdfefe 0%, #d7e2ec 55%, #b9cdd8 100%);
    border: 1px solid #8aa0b4;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
    box-shadow: inset 0 1px 0 #fff, 0 2px 0 #9fb1c2;
}
.mh-btn:active { box-shadow: inset 0 2px 4px rgba(40,60,80,.3); transform: translateY(1px); }
.mh-btn-primary {
    color: #fff;
    background: linear-gradient(180deg, #5aa0e0 0%, #2f74bf 100%);
    border-color: #1d4f86;
    border-top-color: #8fc1ee;
    text-shadow: 0 1px 0 #1d4f86;
}
.mh-btn-ghost { background: linear-gradient(180deg, #f4f6f8 0%, #dfe6ec 100%); }
.mh-btn:disabled { opacity: .5; cursor: default; box-shadow: none; }

.mh-controls { display: flex; gap: 8px; padding: 0 12px 12px; }

/* 猜答区 */
.mh-guess { padding: 0 12px 12px; }
.mh-step { display: none; }
.mh-step.active { display: block; animation: mhStepIn .22s ease; }
.mh-steplab { font-size: 12px; color: #5a6b7b; margin-bottom: 6px; font-weight: 700; }

.mh-back {
    display: none;
    align-items: center;
    gap: 4px;
    margin: 0 0 8px;
    padding: 5px 10px;
    font-family: inherit;
    font-size: 12px;
    color: #234;
    background: linear-gradient(180deg, #fff 0%, #e1e9f1 100%);
    border: 1px solid #9fb1c2;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
}
.mh-back.show { display: inline-flex; animation: mhStepIn .22s ease; }
.mh-back:hover { background: linear-gradient(180deg, #fffbe8 0%, #ffeec2 100%); }
@keyframes mhStepIn {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: none; }
}

.mh-colleges { display: flex; flex-wrap: wrap; gap: 6px; }
.mh-college {
    font-family: inherit;
    font-size: 12px;
    padding: 5px 10px;
    color: #234;
    background: linear-gradient(180deg, #fff 0%, #e1e9f1 100%);
    border: 1px solid #9fb1c2;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
}
.mh-college.active {
    color: #fff;
    background: linear-gradient(180deg, #f0a83a 0%, #d3861a 100%);
    border-color: #a8650c;
    border-top-color: #ffd98a;
    text-shadow: 0 1px 0 #a8650c;
}

.mh-students {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 6px;
    max-height: 260px;
    overflow-y: auto;
    padding: 6px;
    background: #e9eef3;
    border: 1px solid #b9c4cf;
    border-top-color: #9aa9b8;
}
.mh-student {
    font-family: inherit;
    font-size: 13px;
    padding: 7px 6px;
    color: #234;
    background: linear-gradient(180deg, #fff 0%, #eef3f8 100%);
    border: 1px solid #aebccb;
    border-top-color: #fff;
    border-left-color: #fff;
    cursor: pointer;
    text-align: center;
}
.mh-student:hover { background: linear-gradient(180deg, #fffbe8 0%, #ffeec2 100%); }
.mh-student.correct { background: linear-gradient(180deg, #cdf0cd 0%, #9fd99f 100%); border-color: #4ea84e; }
.mh-student.wrong { background: linear-gradient(180deg, #f6cccc 0%, #e7a0a0 100%); border-color: #c05050; }
.mh-students.locked .mh-student { cursor: default; }

/* 页脚 */
.mh-foot {
    padding: 10px 12px;
    font-size: 11px;
    line-height: 1.6;
    color: #5a6b7b;
    background: #dde6ee;
    border-top: 1px solid #c2cedb;
}
.mh-foot a { color: #06c; }

@media (max-width: 520px) {
    .mh-students { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }
    .mh-title { font-size: 15px; }
}

/* 题数选择 + 名字输入 */
.mh-start-counts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 12px 0; }
.mh-start-counts.hidden { display: none; }
.mh-start-count {
    font-family: inherit; font-size: 13px; padding: 8px 14px; color: #234;
    background: linear-gradient(180deg, #fff 0%, #e1e9f1 100%);
    border: 1px solid #9fb1c2; border-top-color: #fff; border-left-color: #fff; cursor: pointer;
}
.mh-start-count.active {
    color: #fff; background: linear-gradient(180deg, #5aa0e0 0%, #2f74bf 100%);
    border-color: #1d4f86; border-top-color: #8fc1ee; text-shadow: 0 1px 0 #1d4f86;
}
.mh-start-name { margin: 0 0 14px; }
.mh-start-name.hidden { display: none; }
.mh-name-input {
    width: 80%; max-width: 320px; font-family: inherit; font-size: 14px; padding: 8px 10px;
    color: #234; background: #fff; border: 1px solid #9fb1c2; border-top-color: #7d90a2; border-left-color: #7d90a2;
    text-align: center;
}
.mh-name-input:focus { outline: 2px solid #8fc1ee; outline-offset: -1px; }

/* 排行榜 */
.mh-leaderboard {
    position: absolute; inset: 0; background: rgba(18,28,38,.93);
    display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 31;
}
.mh-leaderboard[hidden] { display: none; }
.mh-lb-box {
    width: 100%; max-width: 480px; max-height: 88%; overflow-y: auto;
    background: linear-gradient(180deg, #f4f6f8 0%, #e6ebf0 100%);
    border: 2px solid #2f6fb0; box-shadow: 0 8px 30px rgba(0,0,0,.45); padding: 18px 16px; text-align: center;
}
.mh-lb-title { font-size: 18px; font-weight: 800; color: #1d4f86; letter-spacing: 1px; margin-bottom: 10px; }
.mh-lb-list { list-style: none; margin: 0 0 10px; padding: 0; text-align: left; }
.mh-lb-list li {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px;
    border-bottom: 1px solid #cdd8e2; background: #eef3f8;
}
.mh-lb-list li:nth-child(odd) { background: #e6edf4; }
.mh-lb-list li.me { background: linear-gradient(180deg, #fff3c4 0%, #ffe08a 100%); border-color: #d9a200; font-weight: 700; }
.mh-lb-list .rk { width: 26px; text-align: center; font-weight: 800; color: #1d4f86; }
.mh-lb-list .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mh-lb-list .sc { width: 56px; text-align: right; font-weight: 800; color: #b35900; font-variant-numeric: tabular-nums; }
.mh-lb-list .cr { width: 84px; text-align: right; color: #5a6b7b; font-size: 11px; }
.mh-lb-list .empty { justify-content: center; color: #7a8b9b; background: transparent; border: none; }
.mh-lb-me { font-size: 13px; font-weight: 700; color: #1d6b1d; margin-bottom: 12px; min-height: 18px; }
.mh-lb-actions { display: flex; gap: 8px; justify-content: center; }
