:root{
  --bg:#0f1720;
  --panel:#0b0f14;
  --card:#0f1a24;
  --accent:#f6c84c;
  --muted:#94a3b8;
  --glass: rgba(255,255,255,0.03);
  --good: #4ade80;
  --bad: #fb7185;
  --blue: #60a5fa;
  --shadow: 0 6px 18px rgba(2,6,23,0.6);
  --radius:12px;
}

*{box-sizing:border-box;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;}
html,body,#app{height:100%;margin:0;background:linear-gradient(180deg,#071021 0%, #071625 100%);color:#e6eef6}
.topbar{
  height:64px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;
  border-bottom:1px solid rgba(255,255,255,0.03);backdrop-filter: blur(6px);
}
.topbar h1{margin:0;font-size:20px;letter-spacing:0.6px}
.top-controls button{
  background:transparent;border:1px solid rgba(255,255,255,0.06);color:var(--muted);padding:8px 12px;border-radius:8px;margin-left:8px;cursor:pointer;
}
.top-controls button:hover{border-color:var(--accent);color:var(--accent)}

.layout{display:flex;gap:18px;padding:18px;height:calc(100% - 64px)}
.game-area{flex:1;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center}
#city-canvas{background:linear-gradient(180deg,#0b1320,#08101a);border-radius:12px;box-shadow:var(--shadow);cursor:crosshair;display:block}
.hud{width:100%;display:flex;justify-content:center}
.msg{color:var(--muted);padding:6px 12px;background:var(--glass);border-radius:8px;border:1px solid rgba(255,255,255,0.02)}

.panel{width:320px;display:flex;flex-direction:column;gap:12px}
.card{background:linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.015));padding:14px;border-radius:12px;border:1px solid rgba(255,255,255,0.03)}
.stats .stat-row{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px dashed rgba(255,255,255,0.02)}
.stats .stat-row:last-child{border-bottom:0}
.stat-row strong{font-size:14px}

.build-list{display:flex;flex-direction:column;gap:10px;margin-top:8px}
.build-item{display:flex;align-items:center;gap:12px;padding:8px;border-radius:10px;background:rgba(255,255,255,0.01);cursor:pointer;transition:transform .12s, box-shadow .12s}
.build-item:hover{transform:translateY(-4px);box-shadow:0 8px 20px rgba(2,6,23,0.6)}
.icon{width:56px;height:44px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-weight:700;color:#07101a}
.build-meta{flex:1}
.build-meta .title{font-weight:700}
.build-meta .sub{font-size:13px;color:var(--muted)}
.build-cost{font-weight:800;color:var(--accent)}

.small{font-size:12px;color:var(--muted);text-align:center}

.green{background:linear-gradient(180deg,#22c55e,#16a34a);color:#07210a}
.orange{background:linear-gradient(180deg,#fb923c,#f97316);color:#2b0f00}
.brown{background:linear-gradient(180deg,#d97706,#92400e);color:#100600}
.gray{background:linear-gradient(180deg,#94a3b8,#64748b);color:#021017}

.selected{outline:3px solid rgba(246,200,76,0.18);box-shadow:0 8px 30px rgba(246,200,76,0.06)}

.help ul{margin:8px 0 0 16px;color:var(--muted)}
.help li{margin-bottom:6px}

@media (max-width:1000px){
  .layout{flex-direction:column;padding:12px}
  .panel{width:auto;order:2}
  .game-area{order:1}
  #city-canvas{width:100%;height:auto;max-width:960px}
}
