:root {
  /* ── Shared surfaces, text, borders (same as landing) ── */
  --surface-0: #0f0f14;
  --surface-1: #1a1a1a;
  --surface-2: #18181b;
  --surface-3: #2a2a2a;
  --surface-card: rgba(26, 26, 26, 0.7);

  --text-primary: #e4e4e7;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --border-active: rgba(255, 255, 255, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  --blur-card: 10px;

  /* ── Service accent (amber, distinct from landing purple) ── */
  --accent: #e8a33d;
  --accent-hover: #f0af52;
  --danger: #d9615a;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--surface-0);
  background-image: radial-gradient(circle at 50% 0%, #1a2029 0%, var(--surface-0) 55%);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 16px;
}

.wrap {
  width: 100%;
  max-width: 420px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  padding-left: 4px;
}

.brand__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px 1px var(--accent);
}

.brand__name {
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--text-secondary);
  font-weight: 500;
}

.card {
  background: var(--surface-card);
  backdrop-filter: blur(var(--blur-card));
  -webkit-backdrop-filter: blur(var(--blur-card));
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 28px 26px 24px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

h1 {
  font-size: 20px;
  margin: 0 0 16px;
  font-weight: 700;
}

.muted {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 16px;
}

/* ── Tab switcher ── */

.tab-bar {
  display: flex;
  gap: 4px;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  background: var(--surface-3);
  color: var(--text-primary);
}

/* ── QR frame ── */

.qr-frame {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 0 auto 18px;
  background: #ffffff;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-frame img {
  width: 196px;
  height: 196px;
  image-rendering: pixelated;
}

.qr-frame__corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--accent);
}
.qr-frame__corner--tl {
  top: -6px;
  left: -6px;
  border-right: none;
  border-bottom: none;
}
.qr-frame__corner--tr {
  top: -6px;
  right: -6px;
  border-left: none;
  border-bottom: none;
}
.qr-frame__corner--bl {
  bottom: -6px;
  left: -6px;
  border-right: none;
  border-top: none;
}
.qr-frame__corner--br {
  bottom: -6px;
  right: -6px;
  border-left: none;
  border-top: none;
}

/* ── Status / text ── */

.status-line {
  text-align: center;
  font-size: 13px;
  color: var(--accent);
  min-height: 18px;
  margin: 0 0 14px;
}

.fineprint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 14px 0 0;
}

.fineprint strong {
  color: var(--text-primary);
}

/* ── Form elements ── */

.field-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
}

.input::placeholder {
  color: var(--text-muted);
}

.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(232, 163, 61, 0.2);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn--primary {
  background: var(--accent);
  color: #1a1406;
  width: 100%;
}

.btn--primary:hover {
  background: var(--accent-hover);
}

.btn--ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.btn--ghost:hover {
  color: var(--text-primary);
  border-color: var(--border-hover);
}

.btn--danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger);
}

.btn--danger:hover {
  background: rgba(217, 97, 90, 0.1);
}

.btn--small {
  padding: 6px 12px;
  font-size: 12px;
}

/* ── Dashboard ── */

.profile-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.profile-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  object-fit: cover;
  background: var(--surface-2);
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-meta {
  display: flex;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.profile-level {
  font-weight: 600;
  color: var(--accent);
}

.row-between {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--text-secondary);
  margin: 0 0 4px;
  text-transform: uppercase;
}

.steam-id {
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, monospace;
  font-size: 15px;
  margin: 0;
}

.odometer-block {
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}

.odometer {
  font-family: 'SF Mono', SFMono-Regular, ui-monospace, 'Cascadia Code', 'Segoe UI Mono', Menlo, monospace;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.odometer-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.led {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-muted);
  display: inline-block;
}

.led--on {
  background: #5fb890;
  box-shadow: 0 0 10px 2px rgba(95, 184, 144, 0.6);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}

.button-row {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.button-row .btn {
  flex: 1;
}

/* ── Recently played ── */

.recently-played {
  margin-top: 22px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 16px;
}

.game-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
}

.game-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-subtle);
}

.game-item:last-child {
  border-bottom: none;
}

.game-thumb {
  width: 40px;
  height: 16px;
  border-radius: 3px;
  object-fit: cover;
  background: var(--surface-2);
}

.game-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-hours {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  .led--on {
    animation: none;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 20px 18px;
  }
}
