@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --bg: #130D1E;
  --surface: #1E1630;
  --surface-soft: #2A2040;
  --ink: #F8F3EC;
  --muted: #B6A9C9;
  --gold: #F2CC8F;
  --plum: #9D6BFF;
  --rose: #E07A5F;
  --mint: #52B788;
  --border: rgba(242, 204, 143, 0.16);
  --radius: 20px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

body {
  margin: 0;
  background: radial-gradient(circle at top right, #2B173D 0%, var(--bg) 55%);
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', 'Cairo', system-ui, sans-serif;
  min-height: 100vh;
  padding-bottom: 88px;
}

[dir="rtl"] body { font-family: 'Cairo', 'Plus Jakarta Sans', system-ui, sans-serif; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(19, 13, 30, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }
.brand-title { font-family: 'Playfair Display', 'Cairo', serif; font-size: 1.15rem; font-weight: 700; margin: 0; }
.brand-sub { font-size: 0.74rem; color: var(--muted); }

.top-actions { display: flex; gap: 8px; align-items: center; }

.pill {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill.accent { background: var(--gold); color: #1E122B; border-color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #7D7094; }
.dot.live { background: var(--mint); box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.22); }

.container { max-width: 680px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }

.vinyl-card {
  background: linear-gradient(145deg, rgba(42, 32, 64, 0.92), rgba(24, 17, 38, 0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  margin-bottom: 14px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}

.vinyl-disc {
  width: 118px;
  height: 118px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, #181326 0 4px, #251E3B 4px 8px);
  border: 3px solid rgba(242, 204, 143, 0.45);
  display: grid;
  place-items: center;
  position: relative;
}

.vinyl-disc.spinning { animation: spin 7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.vinyl-core {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  display: grid;
  place-items: center;
  color: #1E122B;
  font-weight: 800;
  font-size: 0.9rem;
}

.play-btn {
  border: none;
  background: var(--gold);
  color: #1E122B;
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 800;
  font-size: 0.92rem;
  cursor: pointer;
  margin-top: 8px;
}

.presets {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.presets::-webkit-scrollbar { display: none; }

.preset-btn {
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.box h3 { margin: 0 0 12px; font-size: 0.98rem; color: var(--gold); }

.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.slider-row:last-child { margin-bottom: 0; }
.slider-label { width: 125px; font-size: 0.88rem; font-weight: 600; }
.slider-row input[type="range"] { flex: 1; accent-color: var(--gold); }

.sleep-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.sleep-btn {
  flex: 1;
  min-width: 68px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 10px;
  font-weight: 700;
  cursor: pointer;
  font-size: 0.82rem;
}
.sleep-btn.active { background: var(--plum); border-color: var(--plum); color: #fff; }

.form-field { margin-bottom: 10px; }
.form-field label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.form-field input, .form-field select {
  width: 100%;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--ink);
  font-size: 0.9rem;
  font-family: inherit;
}

.track-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  margin-bottom: 8px;
  border: 1px solid transparent;
}
.track-item.playing { border-color: var(--gold); }
.track-meta { flex: 1; min-width: 0; }
.track-title { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.track-sub { font-size: 0.75rem; color: var(--muted); }

.mini-btn {
  border: none;
  background: var(--gold);
  color: #1E122B;
  border-radius: 10px;
  padding: 6px 12px;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
}
.mini-btn.ghost { background: rgba(255,255,255,0.1); color: var(--ink); }

.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: rgba(19, 13, 30, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px;
  z-index: 25;
}

.nav-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}
.nav-btn.active { color: var(--gold); }
.nav-btn .ico { font-size: 1.2rem; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(10, 6, 18, 0.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 50; padding: 12px;
}
.modal-sheet {
  width: 100%; max-width: 500px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
}
