:root {
  --bg: #050814;
  --surface: #0d1326;
  --surface-2: #141c36;
  --border: rgba(255, 255, 255, 0.09);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --primary: #3b82f6;
  --accent: #00e5ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: radial-gradient(circle at top right, #111c44 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 20, 0.88); backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: #fff; }
.brand-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 0.92rem; cursor: pointer; transition: .18s;
}
.btn-primary { background: linear-gradient(135deg, #2563eb, #06b6d4); color: #fff; }
.btn-primary:hover { opacity: .92; transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #111; }
.btn-success { background: var(--success); color: #fff; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 22px;
}
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.badge {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.badge-ok { background: rgba(16,185,129,.18); color: #34d399; }
.badge-warn { background: rgba(245,158,11,.18); color: #fbbf24; }
.badge-err { background: rgba(239,68,68,.18); color: #f87171; }
.badge-info { background: rgba(0,229,255,.15); color: var(--accent); }
.input, select {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); font-size: 0.95rem;
}
.input:focus { outline: none; border-color: var(--accent); }
label.field { display: block; margin-bottom: 14px; font-size: 0.85rem; color: var(--muted); font-weight: 600; }
label.field > span { display: block; margin-bottom: 6px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 0.92rem; }
.alert-ok { background: rgba(16,185,129,.16); border: 1px solid rgba(16,185,129,.4); color: #6ee7b7; }
.alert-err { background: rgba(239,68,68,.16); border: 1px solid rgba(239,68,68,.4); color: #fca5a5; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: .05em; }
.kpi-val { font-size: 1.9rem; font-weight: 900; margin: 6px 0 2px; }
.kpi-lbl { font-size: 0.8rem; color: var(--muted); text-transform: uppercase; }

/* Player & Virtual DualSense */
.player-wrap { position: relative; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 16 / 9; }
.player-video { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.player-hud {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px;
}
.ds-pad {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
  margin-top: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
}
.ds-cluster { display: grid; grid-template-columns: repeat(3, 48px); grid-template-rows: repeat(3, 48px); gap: 6px; }
.ds-btn {
  background: var(--surface-2); border: 1px solid rgba(255,255,255,0.16); color: #fff;
  border-radius: 12px; font-weight: 800; cursor: pointer; user-select: none; touch-action: manipulation;
  display: flex; align-items: center; justify-content: center;
}
.ds-btn:active, .ds-btn.pressed { background: var(--primary); border-color: var(--accent); transform: scale(0.95); }
.ds-triggers { display: flex; gap: 8px; flex-wrap: wrap; }
.ds-triggers .ds-btn { padding: 10px 14px; }
