@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0d0f13;
  --surface: #161920;
  --surface2: #1e2229;
  --surface3: #252b35;
  --border: #2a3040;
  --text: #e8eaf0;
  --text-muted: #7b8499;
  --text-dim: #4a5168;
  --accent: #5865f2;
  --accent-hover: #4752c4;
  --online: #3ba55d;
  --idle: #faa61a;
  --dnd: #ed4245;
  --offline: #4a5168;
  --spotify: #1db954;
  --radius: 12px;
  --radius-sm: 8px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* NAV */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(13,15,19,0.85);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { font-size: 22px; font-weight: 800; letter-spacing: -0.5px; color: var(--text); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 8px; }
.nav-links a {
  color: var(--text-muted); font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); text-decoration: none; }

/* HERO */
.hero {
  text-align: center; padding: 100px 24px 80px;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(88,101,242,0.12) 0%, transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(88,101,242,0.12); border: 1px solid rgba(88,101,242,0.3);
  color: #a5adfa; font-size: 12px; font-weight: 600; letter-spacing: 0.5px;
  padding: 5px 12px; border-radius: 100px; margin-bottom: 24px; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 80px); font-weight: 800;
  letter-spacing: -2px; line-height: 1.05; margin-bottom: 20px;
  background: linear-gradient(135deg, #fff 30%, #a5adfa);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p {
  font-size: 18px; color: var(--text-muted); max-width: 500px;
  margin: 0 auto 40px;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; cursor: pointer;
  border: none; transition: all 0.15s; text-decoration: none;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost {
  background: var(--surface2); color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--surface3); text-decoration: none; }

/* FEATURES */
.features { padding: 80px 0; }
.section-label {
  text-align: center; font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}
.section-title {
  text-align: center; font-size: 32px; font-weight: 700;
  letter-spacing: -0.5px; margin-bottom: 48px;
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; transition: border-color 0.2s;
}
.feature-card:hover { border-color: var(--accent); }
.feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: rgba(88,101,242,0.15); display: flex; align-items: center;
  justify-content: center; font-size: 22px; margin-bottom: 16px;
}
.feature-card h3 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

/* CODE BLOCK */
.api-section { padding: 80px 0; }
.code-block {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.code-header {
  padding: 14px 20px; border-bottom: 1px solid var(--border);
  font-size: 13px; color: var(--text-muted); font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 12px; height: 12px; border-radius: 50%;
}
.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #febc2e; }
.code-dots span:nth-child(3) { background: #28c840; }
pre {
  padding: 24px; overflow-x: auto; font-family: 'Fira Code', monospace;
  font-size: 13px; line-height: 1.8; color: #c9d1d9;
}
.kw { color: #ff7b72; }
.str { color: #a5d6ff; }
.key { color: #79c0ff; }
.val { color: #d2a8ff; }
.num { color: #f2cc60; }
.cm { color: #8b949e; font-style: italic; }

/* SEARCH */
.search-section { padding: 60px 0; text-align: center; }
.search-box {
  display: flex; max-width: 520px; margin: 0 auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  transition: border-color 0.2s;
}
.search-box:focus-within { border-color: var(--accent); }
.search-box input {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 14px 18px; font-size: 15px; color: var(--text);
  font-family: inherit;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box button {
  background: var(--accent); border: none; color: #fff;
  padding: 14px 20px; cursor: pointer; font-size: 15px;
  font-weight: 600; font-family: inherit; transition: background 0.15s;
}
.search-box button:hover { background: var(--accent-hover); }

/* FOOTER */
footer {
  border-top: 1px solid var(--border); padding: 32px 0;
  text-align: center; color: var(--text-muted); font-size: 14px;
}

/* USER PAGE */
.user-page { max-width: 780px; margin: 0 auto; padding: 40px 24px; }

.connection-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 100px; font-size: 12px; font-weight: 600;
  margin-bottom: 28px;
}
.connection-badge.live { background: rgba(59,165,93,0.15); color: var(--online); border: 1px solid rgba(59,165,93,0.3); }
.connection-badge.reconnecting { background: rgba(250,166,26,0.15); color: var(--idle); border: 1px solid rgba(250,166,26,0.3); }
.connection-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
}
.connection-badge.live .dot { background: var(--online); animation: pulse 2s infinite; }
.connection-badge.reconnecting .dot { background: var(--idle); }

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

.profile-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; margin-bottom: 16px;
}
.profile-banner {
  height: 120px;
  background: linear-gradient(135deg, #5865f2, #eb459e);
}
.profile-banner.has-banner { background-size: cover; background-position: center; }
.profile-body { padding: 0 24px 24px; position: relative; }
.avatar-wrap {
  position: relative; display: inline-block;
  margin-top: -44px; margin-bottom: 12px;
}
.avatar-wrap img {
  width: 88px; height: 88px; border-radius: 50%;
  border: 4px solid var(--surface); display: block;
}
.status-ring {
  position: absolute; bottom: 4px; right: 4px;
  width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid var(--surface); display: flex; align-items: center; justify-content: center;
}
.status-ring.online { background: var(--online); }
.status-ring.idle { background: var(--idle); }
.status-ring.dnd { background: var(--dnd); }
.status-ring.offline { background: var(--offline); }
.status-ring.dnd::before, .status-ring.dnd::after {
  content: ''; position: absolute; background: #fff;
  width: 8px; height: 2px; border-radius: 2px;
}
.display-name { font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
.username { font-size: 14px; color: var(--text-muted); margin-bottom: 14px; }

.client-status {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.client-pill {
  font-size: 12px; padding: 3px 10px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-muted);
  display: flex; align-items: center; gap: 5px;
}
.client-pill .cdot {
  width: 6px; height: 6px; border-radius: 50;
}
.cdot.online { background: var(--online); }
.cdot.idle { background: var(--idle); }
.cdot.dnd { background: var(--dnd); }
.cdot.offline { background: var(--offline); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; margin-bottom: 16px;
}
.card-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 14px;
}

.spotify-card { border-color: rgba(29,185,84,0.3); background: rgba(29,185,84,0.04); }
.spotify-inner { display: flex; gap: 16px; align-items: center; }
.spotify-art {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.spotify-art-placeholder {
  width: 64px; height: 64px; border-radius: var(--radius-sm);
  background: var(--surface3); flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 24px;
}
.spotify-track { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.spotify-artist { font-size: 14px; color: var(--text-muted); margin-bottom: 3px; }
.spotify-album { font-size: 13px; color: var(--text-dim); }
.spotify-bar {
  margin-top: 12px; height: 3px; background: var(--surface3); border-radius: 2px; overflow: hidden;
}
.spotify-bar-fill { height: 100%; background: var(--spotify); border-radius: 2px; transition: width 1s linear; }

.activity-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; }
.activity-item + .activity-item { border-top: 1px solid var(--border); }
.activity-icon {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  background: var(--surface3); object-fit: cover; flex-shrink: 0;
}
.activity-icon-placeholder {
  width: 54px; height: 54px; border-radius: var(--radius-sm);
  background: var(--surface3); flex-shrink: 0; display: flex;
  align-items: center; justify-content: center; font-size: 26px;
}
.activity-type { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.activity-name { font-size: 15px; font-weight: 600; }
.activity-detail { font-size: 13px; color: var(--text-muted); }
.activity-time { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

.meta-row { display: flex; justify-content: space-between; padding: 10px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.meta-row:last-child { border-bottom: none; }
.meta-key { color: var(--text-muted); }
.meta-val { font-weight: 500; font-family: monospace; font-size: 13px; }

.json-section { margin-top: 16px; }
.json-toggle {
  width: 100%; background: var(--surface2); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 13px; font-weight: 600;
  padding: 12px 16px; border-radius: var(--radius-sm); cursor: pointer;
  text-align: left; font-family: inherit; display: flex; justify-content: space-between;
  align-items: center; transition: background 0.15s;
}
.json-toggle:hover { background: var(--surface3); }
.json-body {
  display: none; background: var(--surface); border: 1px solid var(--border);
  border-top: none; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 16px; max-height: 400px; overflow-y: auto;
}
.json-body.open { display: block; }
.json-body pre { font-size: 12px; color: #c9d1d9; line-height: 1.7; }

.not-found {
  text-align: center; padding: 80px 24px;
}
.not-found h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.not-found p { color: var(--text-muted); }

@media (max-width: 600px) {
  .hero h1 { font-size: 40px; }
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { flex-direction: column; align-items: center; }
}
