/* XenFM SPA — Dark, lean, music-first */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0a0a0a;
  --surface: rgba(15, 15, 15, 0.85);
  --text: #e0e0e0;
  --text-dim: #888;
  --accent: #e6127e;
  --accent-glow: rgba(230, 18, 126, 0.3);
  --header-h: 48px;
  --player-h: 72px;
  --radius: 6px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  overflow: hidden;
}

/* === HEADER === */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
}

.logo {
  font-size: 1.2em;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-family: var(--mono);
  cursor: pointer;
}

.header-nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.85em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
}
.nav-link:hover, .nav-link.active { color: var(--text); }

.header-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-dim);
  padding: 5px 14px;
  border-radius: var(--radius);
  font-size: 0.8em;
  cursor: pointer;
  transition: all 0.2s;
}
.header-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* === VISUALISER === */
#visualiser {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: 100%;
  height: calc(100% - var(--header-h) - var(--player-h));
  z-index: 0;
}

/* === MAIN CONTENT === */
#content {
  position: relative;
  z-index: 1;
  height: calc(100vh - var(--header-h) - var(--player-h));
  margin-top: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  overflow: hidden;
}

/* === PAGE TRANSITIONS === */
.page {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  overflow-y: auto;
}

.page.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.page.leaving {
  opacity: 0;
  transform: translateY(-20px);
}

/* === RADIO PAGE (HERO) === */
.hero {
  text-align: center;
}

.hero-title {
  font-size: clamp(2em, 6vw, 4.5em);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-shadow: 0 0 60px rgba(0,0,0,0.8);
}

.hero-sub {
  margin-top: 16px;
  font-size: clamp(0.9em, 2vw, 1.1em);
  color: var(--text-dim);
  letter-spacing: 0.03em;
}

/* === CREATORS PAGE === */
.page-inner {
  text-align: center;
  padding: 40px 20px;
  max-width: 800px;
  width: 100%;
}

.page-title {
  font-size: clamp(1.8em, 5vw, 3em);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 0 60px rgba(0,0,0,0.8);
  margin-bottom: 8px;
}

.page-sub {
  color: var(--text-dim);
  font-size: clamp(0.85em, 1.8vw, 1em);
  margin-bottom: 40px;
  letter-spacing: 0.03em;
}

.creator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.creator-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 24px 16px;
  text-decoration: none;
  color: var(--text);
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
}

.creator-card:hover {
  border-color: var(--accent);
  background: rgba(230, 18, 126, 0.06);
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(230, 18, 126, 0.15);
}

.creator-name {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 6px;
}

.creator-tag {
  font-size: 0.75em;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* === ABOUT PAGE === */
.about-content {
  text-align: left;
  max-width: 560px;
  margin: 0 auto;
}

.about-content p {
  font-size: 1em;
  line-height: 1.7;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.about-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 20px;
  background: rgba(230, 18, 126, 0.08);
  border: 1px solid rgba(230, 18, 126, 0.2);
  border-radius: 8px;
}

.badge-icon {
  font-size: 1.4em;
  color: var(--accent);
}

.badge-text {
  font-size: 0.85em;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: var(--mono);
}

/* === FOOTER PLAYER === */
#player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.06);
  z-index: 100;
}

.player-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.album-art {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  object-fit: cover;
}

.track-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.track-artist {
  font-size: 0.85em;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-title {
  font-size: 0.75em;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-center {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: none;
  color: var(--accent);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.play-btn:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.player-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
}

.volume-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
}

input[type="range"] {
  -webkit-appearance: none;
  width: 80px;
  height: 4px;
  background: rgba(255,255,255,0.15);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.viz-select {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-dim);
  padding: 4px 8px;
  border-radius: var(--radius);
  font-size: 0.75em;
  cursor: pointer;
}
.viz-select:focus { outline: 1px solid var(--accent); }

/* === LOGIN MODAL === */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-content {
  background: #151515;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 40px;
  width: 360px;
  max-width: 90vw;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5em;
  cursor: pointer;
}

.modal-content h2 {
  font-size: 1.3em;
  margin-bottom: 6px;
}

.modal-sub {
  color: var(--text-dim);
  font-size: 0.85em;
  margin-bottom: 24px;
}

.modal-content input {
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9em;
}
.modal-content input:focus {
  outline: none;
  border-color: var(--accent);
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 0.9em;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.85; }

/* === MOBILE === */
@media (max-width: 600px) {
  .header-nav { display: none; }
  .volume-wrap { display: none; }
  .viz-select { display: none; }
  .player-left { flex: 1; }
  .player-right { flex: 0; }
  #player { padding: 0 12px; }
  #header { padding: 0 12px; }
  .creator-grid { grid-template-columns: 1fr; }
  .page-inner { padding: 30px 16px; }
}
