/* ─── Reset & base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #0d0d0f;
  --surface:     #161619;
  --surface-alt: #1e1e22;
  --border:      #2a2a30;
  --accent:      #c8ff00;
  --accent-dim:  #8faa2e;
  --text:        #e8e8ec;
  --text-muted:  #6b6b78;
  --text-dim:    #9999a8;
  --playing:     #c8ff00;
  --idle:        #2e2e35;
  --red:         #ff4d4d;
  --green:       #4dff91;
  --yellow:      #ffd04d;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --radius: 10px;
  --transition: 200ms ease;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}

/* ─── Status bar ───────────────────────────────────────────────────────────── */
.status-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 99px;
  background: var(--surface-alt);
  color: var(--text-muted);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.badge.badge--on   { background: rgba(200, 255, 0, 0.08); color: var(--accent); border-color: rgba(200, 255, 0, 0.25); }
.badge.badge--off  { background: rgba(255, 77, 77, 0.08); color: var(--red);    border-color: rgba(255, 77, 77, 0.2); }
.badge.badge--ok   { background: rgba(77, 255, 145, 0.07); color: var(--green); border-color: rgba(77, 255, 145, 0.2); }
.badge.badge--warn { background: rgba(255, 208, 77, 0.07); color: var(--yellow); border-color: rgba(255, 208, 77, 0.2); }

.badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

/* ─── Layout ───────────────────────────────────────────────────────────────── */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Decks grid ───────────────────────────────────────────────────────────── */
.decks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.deck-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 18px 22px;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition:
    border-color var(--transition),
    background var(--transition),
    box-shadow var(--transition);
  position: relative;
  overflow: hidden;
}

.deck-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.deck-card.is-playing {
  border-color: rgba(200, 255, 0, 0.2);
  background: rgba(200, 255, 0, 0.03);
  box-shadow: 0 0 24px rgba(200, 255, 0, 0.06);
}

.deck-card.is-playing::before {
  background: var(--accent);
}

.deck-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
}

.deck-card.is-playing .deck-label {
  color: var(--accent);
}

.deck-title {
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.45;
  word-break: break-word;
  transition: color var(--transition);
  flex: 1;
}

.deck-card.is-playing .deck-title {
  color: var(--text);
  font-weight: 500;
}

/* ─── Track list ───────────────────────────────────────────────────────────── */
.track-count {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: none;
}

.track-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: track-counter;
}

.track-empty {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 12px 0;
}

.track-item {
  display: flex;
  align-items: baseline;
  gap: 14px;
  padding: 9px 14px;
  border-radius: 6px;
  transition: background var(--transition);
  counter-increment: track-counter;
}

.track-item:hover {
  background: var(--surface);
}

.track-item:last-child {
  background: rgba(200, 255, 0, 0.04);
}

.track-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}

.track-name {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.4;
}

/* ─── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .decks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .decks-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .header-inner {
    padding: 12px 16px;
  }

  .container {
    padding: 28px 16px 48px;
    gap: 36px;
  }

  .deck-card {
    padding: 14px 12px 16px;
    min-height: 88px;
  }

  .deck-title {
    font-size: 0.8rem;
  }

  .track-item {
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
  }
}

/* ─── Animations ───────────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.track-item {
  animation: fadeIn 0.25s ease both;
}
