:root {
  --bg: #0b0d12;
  --bg-elevated: #12151d;
  --card: #161a24;
  --card-hover: #1c212e;
  --border: #262c3a;
  --gold: #d4af6a;
  --gold-soft: #e8cf9c;
  --text: #f2efe9;
  --text-muted: #a4a9b6;
  --text-faint: #6b7080;
  --success: #6fbf8b;
  --radius: 14px;
  --max-width: 880px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(circle at 50% -10%, #1a1f2c 0%, var(--bg) 55%);
  color: var(--text);
  min-height: 100vh;
  padding-bottom: 96px;
}

a {
  color: inherit;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.hero {
  text-align: center;
  padding: 56px 20px 32px;
}

.hero__lock {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  color: var(--gold);
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  color: var(--gold-soft);
  margin: 0 0 10px;
}

.hero__title {
  font-size: clamp(2.2rem, 6vw, 3.2rem);
  margin: 0 0 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #fff 0%, var(--gold-soft) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__intro {
  max-width: 560px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* Progress */
.progress {
  max-width: var(--max-width);
  margin: 0 auto 8px;
  padding: 0 20px;
}

.progress__bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress__bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-soft) 100%);
  transition: width 0.4s ease;
}

.progress__label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-faint);
  margin-top: 8px;
}

/* Search */
.toolbar {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding: 0 20px;
}

.search {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search::placeholder {
  color: var(--text-faint);
}

.search:focus {
  border-color: var(--gold);
}

/* Grid */
.grid {
  max-width: var(--max-width);
  margin: 24px auto 0;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  background: var(--card-hover);
}

.card--played {
  border-color: rgba(111, 191, 139, 0.4);
}

.card__number {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.card--played .card__number {
  color: var(--success);
  border-color: rgba(111, 191, 139, 0.4);
}

.card__body {
  flex: 1 1 auto;
  min-width: 0;
}

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

.card__meta {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-faint);
}

.card__badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-faint);
  margin-left: 6px;
}

.card__actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

.icon-btn:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.icon-btn--play.is-playing {
  background: var(--gold);
  border-color: var(--gold);
  color: #0b0d12;
}

.empty-state {
  text-align: center;
  color: var(--text-faint);
  padding: 40px 20px;
  display: none;
}

.empty-state.is-visible {
  display: block;
}

/* Mini player */
.player-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(18, 21, 29, 0.96);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: 10px 16px 14px;
  display: none;
  flex-direction: column;
  gap: 8px;
  z-index: 20;
  max-height: 48vh;
}

.player-bar.is-active {
  display: flex;
}

.player-bar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.player-bar__info {
  min-width: 0;
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-bar__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
}

.player-bar__close:hover {
  border-color: var(--gold);
  color: var(--gold-soft);
}

.player-bar__frame {
  width: 100%;
  height: 220px;
  border: 0;
  border-radius: 10px;
  background: #000;
}

footer {
  text-align: center;
  color: var(--text-faint);
  font-size: 12.5px;
  padding: 40px 20px 0;
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
