/* InnerPersonal — dark, glassy, with a teal/violet accent */
:root {
  --bg-0: #0a0d14;
  --bg-1: #0f131c;
  --bg-2: #161b27;
  --bg-3: #1d2330;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #e6ebf5;
  --text-dim: #9aa3b5;
  --text-faint: #5b6478;
  --accent: #5eead4;
  --accent-2: #a78bfa;
  --accent-glow: rgba(94, 234, 212, 0.35);
  --danger: #f87171;
  --warn: #fbbf24;
  --ok: #34d399;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg-0);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  overflow-x: hidden;
}
body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(800px 400px at 10% -10%, rgba(167, 139, 250, 0.10), transparent 60%),
    radial-gradient(900px 500px at 110% 10%, rgba(94, 234, 212, 0.08), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; position: relative; z-index: 1; }
@media (max-width: 720px) { .app { grid-template-columns: 1fr; } .sidebar { display: none; } }

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  border-right: 1px solid var(--line);
  padding: 20px 16px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
  box-shadow: 0 0 20px var(--accent-glow);
  position: relative;
}
.brand-mark::after {
  content: ''; position: absolute; inset: 6px;
  background: var(--bg-0);
  border-radius: 5px;
}
.brand-name { font-weight: 700; letter-spacing: 0.5px; font-size: 16px; }
.brand-name .accent { color: var(--accent); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); cursor: pointer; user-select: none;
  font-weight: 500;
}
.nav-item:hover { background: var(--bg-2); color: var(--text); }
.nav-item.active { background: var(--bg-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.nav-item .icon { width: 18px; height: 18px; opacity: 0.85; }
.nav-section { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); margin: 18px 12px 8px; }

.sidebar-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-faint); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 100px; background: var(--bg-2); margin-top: 8px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-dot.warn { background: var(--warn); }
.status-dot.bad { background: var(--danger); }

/* Main */
.main { padding: 28px 36px 80px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.topbar h1 { margin: 0; font-size: 22px; font-weight: 700; }
.topbar .sub { color: var(--text-dim); font-size: 13px; margin-top: 4px; }
.search {
  flex: 1; max-width: 360px;
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: 100px;
}
.search input { flex: 1; background: transparent; border: 0; color: var(--text); outline: none; font-size: 14px; }
.search input::placeholder { color: var(--text-faint); }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line); cursor: pointer;
  font-weight: 500; font-size: 13px;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-strong); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0a0d14; border: 0; font-weight: 600;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 0 20px var(--accent-glow); }

/* Game grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex; flex-direction: column;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 14px 40px rgba(0,0,0,0.5), 0 0 0 1px var(--accent-glow);
}
.card-art {
  aspect-ratio: 460 / 215;
  background: var(--bg-3) center/cover no-repeat;
  position: relative;
}
.card-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,13,20,0.85) 100%);
}
.card-body { padding: 12px 14px; }
.card-title { font-weight: 600; font-size: 14px; line-height: 1.3; }
.card-meta { font-size: 11px; color: var(--text-faint); margin-top: 4px; }

/* Empty state */
.empty {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-dim);
}
.empty h3 { color: var(--text); margin: 0 0 8px; }

/* Modal */
[hidden] { display: none !important; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(5,7,12,0.7); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  width: min(560px, 92vw); max-height: 86vh; overflow: auto;
  background: var(--bg-1); border: 1px solid var(--line-strong);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.modal-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-art { aspect-ratio: 460 / 215; background-size: cover; background-position: center; border-radius: var(--radius-sm); margin-bottom: 16px; }
.modal-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.icon-btn { background: transparent; border: 0; color: var(--text-dim); cursor: pointer; padding: 4px; }
.icon-btn:hover { color: var(--text); }

/* Tutorials section */
.tutor-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.tutor {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.tutor:hover { border-color: var(--line-strong); }
.tutor h3 { margin: 0; font-size: 15px; }
.tutor p { margin: 0; color: var(--text-dim); font-size: 13px; line-height: 1.5; }
.tutor .num { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 1.5px; }

/* Setup wizard */
.setup-step { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 12px; }
.setup-step h3 { margin: 0 0 6px; font-size: 14px; }
.setup-step .desc { color: var(--text-dim); font-size: 13px; margin-bottom: 10px; }
.input { width: 100%; padding: 9px 12px; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--text); font: inherit; outline: none; }
.input:focus { border-color: var(--accent); }
.row { display: flex; gap: 8px; align-items: center; }
.row > * { flex: 1; }
.label { display: block; font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }

.notice { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-2); color: var(--text-dim); font-size: 13px; }
.notice.ok { border-color: rgba(52, 211, 153, 0.3); color: var(--ok); }
.notice.warn { border-color: rgba(251, 191, 36, 0.3); color: var(--warn); }
.notice.bad { border-color: rgba(248, 113, 113, 0.3); color: var(--danger); }

/* Stream viewer */
.stream-shell { position: fixed; inset: 0; background: #000; display: flex; align-items: center; justify-content: center; }
.stream-shell video, .stream-shell iframe { width: 100%; height: 100%; border: 0; }
.stream-overlay {
  position: absolute; top: 12px; left: 12px;
  background: rgba(10,13,20,0.7); backdrop-filter: blur(10px);
  padding: 8px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  display: flex; gap: 10px; align-items: center;
}
