/* ========== Reset & Variables ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --bg: #07070f; --surface: #0f0f1e; --surface2: #161630; --surface3: #1e1e3d;
  --gold: #c9a84c; --gold-bright: #f0d060; --jade: #5ecfb0; --crimson: #d94545;
  --text: #ddd8cc; --dim: #706a5c; --border: #252545; --qi-glow: #6af0d0;
}
html, body {
  height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font-family: 'Noto Serif SC', serif; font-size: 14px;
}
body::before {
  content: ''; position: fixed; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, #0c1a28 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, #1a0c20 0%, transparent 50%), var(--bg);
  pointer-events: none; z-index: -1;
}
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

#top-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  background: linear-gradient(180deg, rgba(20,20,40,0.95), rgba(15,15,30,0.95));
  border-bottom: 1px solid var(--border); height: 48px; z-index: 10; position: relative;
}
#top-bar .title {
  font-family: 'Ma Shan Zheng', cursive; font-size: 24px; color: var(--gold);
  text-shadow: 0 0 20px rgba(201,168,76,0.3); letter-spacing: 4px;
}
#top-bar .title span { font-size: 12px; color: var(--dim); font-family: 'Noto Serif SC', serif; margin-left: 8px; letter-spacing: 1px; }
.resources-bar { display: flex; gap: 16px; font-size: 12px; }
.res-item { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.res-item .icon { font-size: 14px; }
.res-item .val { color: var(--gold-bright); font-weight: 700; min-width: 40px; }
.res-label { color: var(--dim); font-size: 11px; }

#game-container { display: flex; height: calc(100vh - 48px); }
#sidebar {
  width: 220px; min-width: 220px; background: var(--surface);
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  overflow-y: auto; padding: 12px;
}
#main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

#game-log {
  height: 90px; min-height: 90px; background: var(--surface);
  border-top: 1px solid var(--border); padding: 8px 12px;
  overflow-y: auto; font-size: 11px; line-height: 1.6;
}
@media (max-width: 768px) {
  #sidebar { display: none; }
  #game-container { flex-direction: column; }
}