:root {
  --bg: #0f1320;
  --panel: #161b2e;
  --panel2: #1d2440;
  --text: #e7ebf5;
  --muted: #9aa3bd;
  --accent: #5b8cff;
  --line: #2a3252;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-weight: 700; font-size: 18px; }
nav a { color: var(--muted); text-decoration: none; margin-right: 16px; }
nav a:hover { color: var(--text); }
.weather { color: var(--accent); font-size: 14px; }
main { max-width: 980px; margin: 0 auto; padding: 24px; }
.hero h1 { font-size: 28px; margin: 8px 0; }
.hero p { color: var(--muted); }
.banner {
  margin-top: 16px; height: 90px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(90deg, #232b4d, #2c2150); border: 1px dashed var(--line);
  border-radius: 10px; color: var(--muted);
}
h2 { margin-top: 32px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.card .ph { height: 90px; background: var(--panel2); border-radius: 8px; margin-bottom: 10px; }
.card h3 { font-size: 15px; margin: 6px 0; }
.card p { color: var(--accent); margin: 4px 0 10px; }
button {
  background: var(--accent); color: white; border: 0; border-radius: 8px;
  padding: 9px 14px; cursor: pointer; font-size: 14px;
}
button:hover { filter: brightness(1.1); }
.buy { width: 100%; }
form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
input {
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 10px 12px; min-width: 200px;
}
.subscribe, .controls { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-top: 24px; }
.status { color: #7ee0a1; min-height: 18px; }
.hint { color: var(--muted); font-size: 13px; }
.session code { color: var(--accent); }
.controls button { margin-right: 10px; }
.real-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 12px; }
.real-card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.real-card h3 { margin: 0 0 6px; font-size: 16px; }
.real-card p { color: var(--muted); min-height: 42px; }
.custom-loader { display: grid; grid-template-columns: 220px 1fr auto; gap: 10px; align-items: center; }
.logbox {
  margin-top: 12px; min-height: 130px; max-height: 260px; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 10px; color: var(--muted); font-family: ui-monospace, monospace; font-size: 12px;
}
@media (max-width: 760px) {
  .grid, .real-grid, .custom-loader { grid-template-columns: 1fr; }
}
#chat-widget {
  position: fixed; right: 20px; bottom: 20px; width: 280px; background: var(--panel2);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: none;
}
#chat-widget.open { display: block; }
.chat-bubble {
  position: fixed; right: 20px; bottom: 20px; width: 54px; height: 54px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 22px;
}
