:root {
  --bg: #0a0a0a;
  --surface: #111111;
  --border: #1e1e1e;
  --text: #e5e5e5;
  --muted: #666;
  --accent: #22c55e;
}

[data-theme="light"] {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e5e5e5;
  --text: #111111;
  --muted: #888;
  --accent: #16a34a;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.mono { font-family: 'JetBrains Mono', monospace; }

/* NAV */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
.nav-link svg { flex-shrink: 0; }

/* PLAYER SIDEBAR — new rules only below */

#theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  transition: border-color 0.2s;
}
#theme-toggle:hover { border-color: var(--accent); }

/* MAIN */
main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* PAGE LAYOUT */
.page {
  display: flex;
  gap: 2rem;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 3rem 2rem 2rem;
  align-items: flex-start;
}

/* SIDEBAR */
.sidebar {
  flex-shrink: 0;
  width: 200px;
  position: sticky;
  top: 2rem;
}

.player {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.player-cover-wrap {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  margin: 0.4rem 0;
}

.player-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.player-title {
  font-weight: 600;
  font-size: 0.9rem;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-artist {
  font-size: 0.75rem;
  color: var(--muted);
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--accent);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  margin-top: 0.25rem;
}
.player-btn:hover { opacity: 0.7; }

@media (max-width: 700px) {
  .page { flex-direction: column; padding: 2rem 1rem; }
  .sidebar { width: 100%; position: static; }
  .player-cover-wrap { width: 120px; margin: 0.4rem auto; }
}

/* HERO */
.hero h1 {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  letter-spacing: -2px;
  color: var(--text);
  line-height: 1;
}

.hero h1::after {
  content: '_';
  color: var(--accent);
  animation: blink 1.1s step-end infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.tagline {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* STATS ROW */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
}

.stat-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.stat-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--accent);
}

/* SERVICES */
.services h2 {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.card-icon { font-size: 1.4rem; }

.card-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.card-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  color: var(--muted);
}

@media (max-width: 500px) {
  .stats-row { grid-template-columns: 1fr; }
  nav { padding: 1rem; }
  main { padding: 2rem 1rem; }
}
