:root {
  --weibo-orange: #ff8200;
  --weibo-orange-light: #fff5eb;
  --bg: #f2f2f2;
  --card-bg: #ffffff;
  --text: #333333;
  --text-secondary: #939393;
  --border: #e6e6e6;
  --danger: #e6162d;
  --success: #00b578;
  --warning: #ff9800;
  --mental-low: #ff4d4f;
  --mental-mid: #faad14;
  --mental-high: #52c41a;
}
* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }

/* === Screens === */
.screen { display: none; animation: fadeIn 0.4s ease; }
.screen.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform: translateY(10px); } to { opacity:1; transform: translateY(0); } }

/* === Title Screen === */
.title-screen {
  min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  color: white; text-align: center; padding: 40px 24px;
}
.title-screen h1 { font-size: 32px; font-weight: 800; margin-bottom: 48px; letter-spacing: 2px; }
.title-screen .subtitle { font-size: 14px; color: rgba(255,255,255,0.6); margin-bottom: 60px; letter-spacing: 1px; }
.title-screen .tagline { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 40px; max-width: 300px; line-height: 1.8; }
.btn-start {
  background: var(--weibo-orange); color: white; border: none;
  padding: 14px 60px; border-radius: 30px; font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all 0.3s; box-shadow: 0 4px 20px rgba(255,130,0,0.3);
}
.btn-start:hover { transform: translateY(-2px); box-shadow: 0 6px 30px rgba(255,130,0,0.5); }
.title-screen .credit { font-size: 11px; color: rgba(255,255,255,0.25); letter-spacing: 1px; }

/* === Prologue === */
.prologue-screen { padding: 0; background: var(--bg); min-height: 100vh; }
.prologue-card { background: var(--card-bg); margin: 16px; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.prologue-card h2 { font-size: 18px; margin-bottom: 16px; }
.prologue-card p { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 12px; }
.input-name {
  width: 100%; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 15px; margin: 16px 0; outline: none; transition: border-color 0.2s;
}
.input-name:focus { border-color: var(--weibo-orange); }
.identity-options { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.identity-card {
  border: 2px solid var(--border); border-radius: 10px; padding: 16px;
  cursor: pointer; transition: all 0.2s; background: white;
}
.identity-card:hover { border-color: var(--weibo-orange); background: var(--weibo-orange-light); }
.identity-card.selected { border-color: var(--weibo-orange); background: var(--weibo-orange-light); }
.identity-card h3 { font-size: 15px; margin-bottom: 4px; }
.identity-card p { font-size: 12px; color: var(--text-secondary); margin: 0; }
.identity-card .tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 4px; margin-top: 8px; }
.tag-student { background: #e3f2fd; color: #1976d2; }
.tag-parttime { background: #fff3e0; color: #f57c00; }
.tag-fulltime { background: #fce4ec; color: #c2185b; }
.btn-confirm {
  width: calc(100% - 32px); margin: 0 16px 24px; background: var(--weibo-orange);
  color: white; border: none; padding: 14px; border-radius: 10px;
  font-size: 16px; font-weight: 600; cursor: pointer;
}
.btn-confirm:disabled { opacity: 0.4; cursor: not-allowed; }

/* === Main Screen (Weibo Style) === */
.main-header {
  background: var(--card-bg); padding: 16px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 10;
}
.main-header-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.header-info { flex: 1; margin-left: 12px; }
.header-info .name { font-size: 16px; font-weight: 600; }
.header-info .week-badge {
  display: inline-block; font-size: 11px; color: var(--weibo-orange);
  background: var(--weibo-orange-light); padding: 2px 8px; border-radius: 10px; margin-top: 2px;
}
.header-action { font-size: 12px; color: var(--text-secondary); text-align: right; }
.stats-bar { display: flex; gap: 8px; }
.stat-pill { flex: 1; background: var(--bg); border-radius: 8px; padding: 8px 10px; text-align: center; }
.stat-pill .label { font-size: 11px; color: var(--text-secondary); }
.stat-pill .value { font-size: 16px; font-weight: 700; margin-top: 2px; }
.stat-pill .bar { height: 3px; background: var(--border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.stat-pill .bar-inner { height: 100%; border-radius: 2px; transition: width 0.5s ease; }
.bar-deposit { background: #52c41a; }
.bar-push { background: var(--weibo-orange); }
.bar-sanity { background: var(--mental-high); }
.bar-sanity.warning { background: var(--mental-mid); }
.bar-sanity.danger { background: var(--mental-low); }

/* === Content Cards === */
.content-area { padding: 12px 16px 100px; }
.weibo-post {
  background: var(--card-bg); border-radius: 12px; padding: 16px;
  margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.post-header { display: flex; align-items: center; margin-bottom: 10px; }
.post-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px; font-weight: 600; flex-shrink: 0;
}
.post-meta { margin-left: 10px; }
.post-meta .name { font-size: 14px; font-weight: 600; }
.post-meta .time { font-size: 11px; color: var(--text-secondary); }
.post-body { font-size: 14px; line-height: 1.7; margin-bottom: 12px; white-space: pre-wrap; }
.post-tag {
  display: inline-block; font-size: 12px; color: var(--weibo-orange);
  background: var(--weibo-orange-light); padding: 3px 10px; border-radius: 4px; margin-bottom: 12px;
}
.options-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.option-btn {
  background: white; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 14px 16px; font-size: 14px; text-align: left; cursor: pointer;
  transition: all 0.2s; line-height: 1.5; font-family: inherit;
}
.option-btn:hover { border-color: var(--weibo-orange); background: var(--weibo-orange-light); transform: translateX(4px); }
.option-btn .effect { font-size: 11px; color: var(--text-secondary); margin-top: 4px; display: block; }

/* === Action Points === */
.ap-panel { background: var(--card-bg); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.ap-panel h3 { font-size: 15px; margin-bottom: 12px; }
.ap-dots { display: flex; gap: 6px; margin-bottom: 16px; }
.ap-dot {
  width: 28px; height: 28px; border-radius: 50%; background: var(--border);
  display: flex; align-items: center; justify-content: center; font-size: 12px; transition: all 0.3s;
}
.ap-dot.used { background: var(--weibo-orange); color: white; }
.ap-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ap-action-btn {
  border: 1.5px solid var(--border); border-radius: 8px; padding: 12px;
  text-align: center; cursor: pointer; background: white; transition: all 0.2s; font-family: inherit;
}
.ap-action-btn:hover { border-color: var(--weibo-orange); background: var(--weibo-orange-light); }
.ap-action-btn .icon { font-size: 20px; margin-bottom: 4px; }
.ap-action-btn .label { font-size: 12px; }
.ap-action-btn .effect { font-size: 10px; color: var(--text-secondary); margin-top: 2px; display: block; }

/* === Tekkai Screen === */
.tekkai-screen { min-height: 100vh; background: #1a1a2e; color: white; }
.tekkai-header { padding: 20px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); }
.tekkai-header h2 { font-size: 20px; margin-bottom: 4px; }
.tekkai-header p { font-size: 13px; color: rgba(255,255,255,0.5); }
.tekkai-fan { display: flex; align-items: center; padding: 20px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.tekkai-fan-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
}
.tekkai-fan-info { margin-left: 16px; flex: 1; }
.tekkai-fan-info .name { font-size: 16px; font-weight: 600; }
.tekkai-fan-info .tickets { font-size: 13px; color: var(--weibo-orange); margin-top: 4px; }
.tekkai-dialogue {
  background: rgba(255,255,255,0.05); border-radius: 12px; padding: 16px;
  margin: 16px; font-size: 14px; line-height: 1.7; white-space: pre-wrap;
}
.tekkai-options { padding: 0 16px 40px; display: flex; flex-direction: column; gap: 10px; }
.tekkai-options .option-btn {
  background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.15); color: white;
}
.tekkai-options .option-btn:hover { background: rgba(255,130,0,0.2); border-color: var(--weibo-orange); }

/* === Settlement === */
.settlement-card { background: var(--card-bg); border-radius: 12px; padding: 20px; margin: 16px; text-align: center; }
.settlement-card h2 { font-size: 18px; margin-bottom: 8px; }
.settlement-card .week-num { font-size: 48px; font-weight: 800; color: var(--weibo-orange); }
.income-display { display: flex; justify-content: center; gap: 40px; margin: 20px 0; }
.income-item .num { font-size: 24px; font-weight: 700; }
.income-item .lbl { font-size: 12px; color: var(--text-secondary); }
.settle-detail { font-size: 13px; color: var(--text-secondary); line-height: 1.8; margin-top: 12px; text-align: left; padding: 0 8px; }

/* === Ending === */
.ending-screen {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 40px 24px;
  text-align: center; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); color: white;
}
.ending-type {
  font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 32px;
  padding: 4px 16px; border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; display: inline-block;
}
.ending-text { font-size: 15px; line-height: 2; max-width: 360px; color: rgba(255,255,255,0.85); margin-bottom: 40px; white-space: pre-wrap; }
.ending-stats { display: flex; gap: 24px; margin-bottom: 40px; }
.ending-stat .num { font-size: 20px; font-weight: 700; }
.ending-stat .lbl { font-size: 11px; color: rgba(255,255,255,0.4); }
.ending-title { font-size: 24px; font-weight: 800; margin-bottom: 8px; color: var(--weibo-orange); }

/* === Toast === */
.toast {
  position: fixed; top: 20px; left: 50%; transform: translateX(-50%) translateY(-100px);
  background: rgba(0,0,0,0.8); color: white; padding: 10px 24px;
  border-radius: 24px; font-size: 13px; z-index: 100; transition: transform 0.3s ease;
  pointer-events: none; white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 500px) { .app { max-width: 100%; } }
