/* ══════════════════════════════════════════════
   group.css — shared styles for all group pages
   ══════════════════════════════════════════════ */

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

:root {
  --accent: #ffffff;
  --bg: #000000;
  --nav-h: 60px;
  --player-h: 72px;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: #fff;
  font-family: 'Segoe UI', Arial, sans-serif;
  overflow-x: hidden;
  min-height: 100vh;
}

/* ── Page fade-in from black ── */
body.page-enter {
  animation: pageEnter 0.9s ease forwards;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Fixed canvas background ── */
#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
}

/* ── Navigation ── */
#group-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  z-index: 30;
  background: linear-gradient(to bottom, rgba(0,0,0,0.72) 0%, transparent 100%);
}

#nav-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  pointer-events: none;
}

#nav-logo img {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 0 6px rgba(255,255,255,0.35));
}

#nav-logo span {
  font-size: 8px;
  font-weight: 300;
  letter-spacing: 0.65em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
}

#nav-back {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  transition: color 0.25s, transform 0.25s;
  cursor: pointer;
  background: none;
  border: none;
}

#nav-back:hover {
  color: #fff;
  transform: translateX(-4px);
}

#nav-back svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#nav-group-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 14px var(--accent);
  opacity: 0.85;
  text-align: right;
}

/* ── Hero section ── */
#hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--nav-h) 24px 0;
}

.hero-genre {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.6;
  margin-bottom: 22px;
}

.hero-title {
  font-size: clamp(52px, 11vw, 140px);
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
}

.hero-subtitle {
  margin-top: 14px;
  font-size: 12px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 38px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 9px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  animation: scrollBounce 2s ease-in-out infinite;
}

.hero-scroll-hint svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ── Lore section ── */
#lore {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 28px 70px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
}

#lore p {
  font-size: 14px;
  line-height: 1.85;
  color: rgba(255,255,255,0.38);
  letter-spacing: 0.04em;
}

/* ── Streaming links ── */
#streaming {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 16px;
  padding: 0 28px 64px;
}

.stream-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px 28px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.stream-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
  transition: fill 0.28s;
}

/* Spotify */
.stream-btn.spotify:hover {
  border-color: #1DB954;
  color: #1DB954;
  background: rgba(29, 185, 84, 0.08);
  box-shadow: 0 0 28px rgba(29, 185, 84, 0.18), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* Apple Music */
.stream-btn.apple:hover {
  border-color: #fff;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.12), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* YouTube Music */
.stream-btn.ytmusic:hover {
  border-color: #FF0000;
  color: #FF0000;
  background: rgba(255, 0, 0, 0.08);
  box-shadow: 0 0 28px rgba(255, 0, 0, 0.18), 0 4px 20px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

/* ── Tracks section ── */
#tracks-section {
  position: relative;
  z-index: 1;
  padding: 0 28px calc(var(--player-h) + 40px);
  max-width: 1200px;
  margin: 0 auto;
}

.tracks-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.55em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.25);
  margin-bottom: 28px;
  padding-top: 10px;
}

/* ── Track grid ── */
#tracks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

/* ── Track card ── */
.track-card {
  position: relative;
  border-left: 3px solid var(--accent);
  background: rgba(10,10,18,0.75);
  backdrop-filter: blur(8px);
  border-radius: 0 10px 10px 0;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.track-card:hover {
  transform: translateY(-3px) scale(1.012);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 22px color-mix(in srgb, var(--accent) 30%, transparent);
  background: rgba(18,18,28,0.9);
}

.track-card.playing {
  box-shadow: 0 0 0 1px var(--accent), 0 0 30px color-mix(in srgb, var(--accent) 40%, transparent);
}

.track-cover-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.track-cover-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s;
}

.track-cover-wrap img.hidden {
  display: none;
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.04) 0%, rgba(0,0,0,0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cover-placeholder .cover-num {
  font-size: 48px;
  font-weight: 900;
  color: var(--accent);
  opacity: 0.12;
  letter-spacing: -0.04em;
}

.track-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.2s;
}

.track-card:hover .track-play-overlay,
.track-card.playing .track-play-overlay {
  opacity: 1;
}

.track-card.playing .track-play-overlay {
  background: rgba(0,0,0,0.25);
}

.play-btn-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 45%, transparent);
}

.track-card:hover .play-btn-circle {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  transform: scale(1.08);
}

.play-btn-circle svg {
  width: 20px;
  height: 20px;
  fill: var(--accent);
  flex-shrink: 0;
}

.track-info {
  padding: 12px 16px 14px;
}

.track-number {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--accent);
  opacity: 0.55;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.track-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Fixed player bar ── */
#player {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--player-h);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(8,8,14,0.94);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.08);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#player.visible {
  transform: translateY(0);
}

#player-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}

#player-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

#player-thumb .thumb-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 20%, transparent) 0%, rgba(0,0,0,0.5) 100%);
}

#player-meta {
  flex-shrink: 0;
  min-width: 0;
  max-width: 200px;
}

#player-track-name {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: rgba(255,255,255,0.9);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#player-group-name {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--accent);
  opacity: 0.65;
  text-transform: uppercase;
  margin-top: 3px;
}

#player-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin: 0 6px;
}

.ctrl-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: rgba(255,255,255,0.55);
  transition: color 0.2s, background 0.2s, transform 0.15s;
}

.ctrl-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.08);
  transform: scale(1.12);
}

.ctrl-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

#btn-play-pause svg {
  width: 26px;
  height: 26px;
}

#btn-play-pause {
  color: var(--accent);
}

#btn-play-pause:hover {
  color: #fff;
}

#player-progress-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#progress-bar-track {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 60%, transparent);
}

#progress-bar-track:hover #progress-bar-fill {
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 80%, transparent);
}

#player-time {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

/* ── Fade-out overlay for navigation ── */
#fade-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity 0.4s ease;
}

#fade-overlay.fading {
  opacity: 1;
  pointer-events: all;
}

/* ── Cinematic bars (HANTÉ) ── */
.cinematic-bar {
  position: fixed;
  left: 0; right: 0;
  height: 60px;
  background: #000;
  z-index: 25;
  pointer-events: none;
}

.cinematic-bar.top    { top: 0; }
.cinematic-bar.bottom { bottom: 0; }

* { -webkit-tap-highlight-color: transparent; }

#nav-back .back-text {
  display: inline;
}
@media (max-width: 600px) {
  #nav-back .back-text { display: none; }
}

/* ── Responsive ── */

/* Tablet */
@media (max-width: 900px) {
  #tracks-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  :root {
    --nav-h: 56px;
    --player-h: 64px;
  }

  /* Nav */
  #group-nav {
    padding: 0 14px;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
  }

  #nav-logo img { width: 26px; height: 26px; }
  #nav-logo span { font-size: 7px; letter-spacing: 0.5em; }

  #nav-group-name { font-size: 9px; letter-spacing: 0.3em; }

  /* Hero */
  .hero-title { font-size: clamp(36px, 13vw, 72px); }
  .hero-genre { font-size: 9px; letter-spacing: 0.4em; }

  .hero-scroll-hint {
    font-size: 8px;
    letter-spacing: 0.3em;
    bottom: 24px;
  }

  /* Lore */
  #lore { padding: 40px 20px 50px; }
  #lore p { font-size: 13px; }

  /* Streaming */
  #streaming {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 20px 48px;
  }

  .stream-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 13px 20px;
    font-size: 10px;
  }

  /* Tracks */
  #tracks-section { padding: 0 14px calc(var(--player-h) + 28px); }

  .tracks-heading { font-size: 9px; margin-bottom: 18px; }

  #tracks-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .track-info { padding: 8px 10px 10px; }
  .track-title { font-size: 11px; }
  .track-number { font-size: 8px; }

  .play-btn-circle { width: 40px; height: 40px; }
  .play-btn-circle svg { width: 16px; height: 16px; }

  /* Player */
  #player {
    padding: 0 12px;
    gap: 10px;
  }

  #player-thumb { width: 38px; height: 38px; }

  #player-meta { max-width: 120px; }
  #player-track-name { font-size: 10px; }
  #player-group-name { font-size: 9px; }

  #player-controls { gap: 4px; margin: 0 2px; }
  .ctrl-btn { padding: 4px; }
  .ctrl-btn svg { width: 17px; height: 17px; }
  #btn-play-pause svg { width: 22px; height: 22px; }

  #player-time { font-size: 9px; }

  /* Cinematic bars (HANTÉ) */
  .cinematic-bar { height: 40px; }
}

/* Very small phones */
@media (max-width: 360px) {
  #tracks-grid { gap: 8px; }
  .stream-btn { max-width: 260px; }
  #player-meta { max-width: 90px; }
}
