* { box-sizing: border-box; }
body { margin: 0; padding: 24px; font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif; color: #ddd; background: linear-gradient(135deg, #0f0f23, #16213e); min-height: 100vh; }
h1, h2, h3 { color: #ffd700; }
p { line-height: 1.8; }
button, input, select { font: inherit; }
button { cursor: pointer; }
input, select { padding: 8px; border: 1px solid #59637c; border-radius: 5px; color: #eee; background: #16213e; }
.container { max-width: 1200px; margin: auto; }
.panel { background: rgba(26,26,46,0.95); padding: 30px; border-radius: 15px; border: 1px solid rgba(255,215,0,0.2); }
#coverPanel { margin-top: 6vh; text-align: center; }
.story-text { max-width: 760px; margin: 25px auto; color: #aaa; }
#questionPanel, #generatingPanel, #gamePanel { display: none; }
.btn { border: 0; border-radius: 8px; padding: 12px 18px; margin: 5px; transition: background .15s; }
.btn-primary { background: #ffd700; color: #17203a; font-weight: bold; }
.btn-option { background: #27334d; color: #eee; border: 1px solid #4b5872; }
.btn-option:hover { background: #384965; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.event-options { display: flex; flex-direction: column; gap: 8px; }
.event-options .btn { text-align: left; }
.header { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 20px 0; }
.metric-item { padding: 16px 5px; text-align: center; border-radius: 10px; background: rgba(255,255,255,.06); }
.metric-value { color: #ffd700; font-size: 22px; }
.metric-label { margin-top: 8px; font-size: 13px; color: #aaa; }
.tabs { display: flex; gap: 8px; margin: 20px 0; flex-wrap: wrap; }
.tab-btn, .filter-btn { padding: 10px 14px; border: 1px solid #35425d; color: #bbb; background: #1a1a2e; border-radius: 6px; }
.tab-btn.active, .filter-btn.active { background: #ffd700; color: #16213e; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.event-card { border-radius: 10px; padding: 24px; background: rgba(255,255,255,.04); }
.event-description { white-space: pre-line; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.show-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.show-card { display: flex; flex-direction: column; padding: 18px; border: 1px solid #35425d; border-radius: 10px; background: #19243c; }
.show-card h3 { margin-top: 0; font-size: 17px; }
.show-card p { flex: 1; }
.show-card small { color: #aab5cf; line-height: 1.8; }
.show-card.locked { opacity: .6; }
.random-card { border-color: #4ecdc4; background: #15303a; }
.introduced-tag { font-size: 11px; color: #4ecdc4; border: 1px solid #4ecdc4; border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
/* 评级徽章 */
.grade-badge { display: inline-block; border-radius: 5px; padding: 2px 8px; font-size: 13px; font-weight: bold; color: #16213e; }
.grade-a { background: linear-gradient(135deg,#ffd700,#ff9d00); color: #2a1a00; }
.grade-b { background: #c084fc; color: #2a1040; }
.grade-c { background: #60a5fa; color: #0b2240; }
.grade-d { background: #94a3b8; color: #1c2430; }
/* 弹窗：长内容可滚动，底部按钮始终可达（含手机端） */
.popup-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.8); display: none; z-index: 1000; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 10px; }
.popup-overlay.active { display: flex; justify-content: center; align-items: center; }
.popup-content { background: #1a1a2e; padding: 24px; border-radius: 12px; max-width: 600px; width: 100%; margin: auto; border: 1px solid rgba(255,215,0,0.25); max-height: 88vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.popup-content .btn { width: 100%; margin: 8px 0 0; }
.popup-text { white-space: pre-line; }
.tutorial-box { border: 2px solid #ffd700; text-align: center; }
.tutorial-title { font-size: 23px; color: #ffd700; margin: 15px 0; }
.tutorial-step { color: #4ecdc4; }
.tutorial-text { line-height: 1.9; margin-bottom: 20px; text-align: left; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.calendar-weekday-row { display: contents; }
.calendar-weekday { padding: 10px; text-align: center; color: #ffd700; }
.calendar-day { min-height: 100px; padding: 7px; background: rgba(255,255,255,.04); border: 1px solid #35425d; border-radius: 5px; cursor: pointer; }
.calendar-day.empty { background: transparent; border: none; }
.calendar-day.selected { outline: 2px solid #ffd700; }
.calendar-day.unavailable { opacity: .35; cursor: not-allowed; }
.day-number { margin-bottom: 5px; color: #ddd; }
.show-item { font-size: 11px; padding: 3px; margin: 3px 0; border-radius: 3px; overflow-wrap: anywhere; }
.show-item.main { background: #63501b; }
.show-item.music { background: #333c77; }
.show-item.small { background: #633c58; }
.show-item.zhuangtai { color: #4ecdc4; background: #224748; }
.show-item.chaitai { color: #95e1d3; background: #254644; }
.show-item.weixiu { color: #ffd700; background: #4a3a10; }
table { width: 100%; border-collapse: collapse; margin: 15px 0; }
th, td { border-bottom: 1px solid #36425c; padding: 8px; text-align: left; }
td input { width: 80px; }
.info-card { border: 1px solid #36425c; border-radius: 8px; padding: 20px; margin-bottom: 15px; }
.amount-positive { color: #4ecdc4; }
.amount-negative { color: #ff6b6b; }
.notice { color: #b8c2d9; font-size: 13px; line-height: 1.8; }
.pass { color: #4ecdc4; font-weight: bold; }
.fail { color: #ff6b6b; font-weight: bold; }
/* 年度任务进度条 */
.progress-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.progress-row span { flex: 0 0 46%; font-size: 14px; }
.progress-bar { flex: 1; height: 14px; background: rgba(255,255,255,.08); border-radius: 7px; overflow: hidden; }
.progress-fill { height: 100%; background: #60a5fa; transition: width .3s; }
.progress-fill.pass-bg { background: #4ecdc4; }
/* 评论墙 */
.comment-item { background: rgba(255,255,255,.05); border-radius: 8px; padding: 12px 14px; margin: 10px 0; }
.comment-item small { color: #93a0bd; }
.comment-good h3 { color: #4ecdc4; }
.hongshu-box { border: 3px solid #ff4d4f; border-radius: 12px; padding: 16px; margin-bottom: 20px; background: rgba(255,77,79,.08); }
.hongshu-box h3 { color: #ff7875; margin-top: 0; }
.hongshu-box .comment-item { border-left: 4px solid #ff4d4f; }
@media (max-width: 700px) {
    body { padding: 10px; }
    .panel { padding: 15px; }
    .metrics { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .metric-item { padding: 10px 4px; }
    .metric-value { font-size: 16px; }
    .metric-label { font-size: 11px; }
    .tabs { flex-wrap: wrap; gap: 5px; }
    .tab-btn { padding: 8px 10px; font-size: 13px; }
    .calendar-day { min-height: 64px; padding: 3px; font-size: 11px; }
    .header { display: block; }
    .show-grid { grid-template-columns: 1fr; }
    .popup-overlay { padding: 10px 6px; }
    .popup-content { padding: 18px 14px; max-height: 92vh; }
    table { font-size: 12px; }
    td input { width: 60px; }
    .progress-row { flex-direction: column; align-items: stretch; gap: 4px; }
    .progress-row span { flex: none; }
    .btn { padding: 11px 14px; }
}
