@font-face {
  font-family: 'LanaPixel';
  src: url('lanapixel.ttf') format('truetype');
}

:root {
  --bg: #0a0a0b;
  --white: #ffffff;
  --grey: #8a8a92;
  --dim: #5c5c64;
  --line: #26262c;
  --track: #2c2c34;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--white);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---- nav ---- */

.pill {
  position: relative;
  z-index: 10;
  width: fit-content;
  margin: 0 auto;
  padding: 12px 22px;
  display: flex;
  align-items: center;
  gap: 40px;
  border-radius: 999px;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.02) 55%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.35),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 10px 30px rgba(0, 0, 0, 0.35);
}

.nav-wrap {
  position: sticky;
  top: 20px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}

.brand {
  display: flex;
  align-items: center;
}

.logo { width: 28px; height: 28px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}

.nav-link {
  color: var(--grey);
  font-size: 14px;
  white-space: nowrap;
}
.nav-link:hover { color: var(--white); }

.nav-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.premium-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--bg);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.premium-btn:hover { opacity: 0.85; }

.lang-toggle {
  display: flex;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  padding: 3px;
}

.lang-toggle button {
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}

.lang-toggle button.active {
  background: var(--white);
  color: var(--bg);
}

.login-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 8px 14px;
  border-radius: 999px;
}
.login-btn:hover { border-color: rgba(255, 255, 255, 0.3); }

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--white);
  cursor: pointer;
  flex-shrink: 0;
}

.menu-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  padding: 14px;
  width: 220px;
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(20, 20, 22, 0.95), rgba(12, 12, 13, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
}

.nav-wrap.menu-open .menu-panel { display: flex; }

.menu-handle { display: none; }

.menu-links {
  display: flex;
  flex-direction: column;
}

.menu-links .nav-link {
  padding: 9px 8px;
  border-radius: 8px;
}
.menu-links .nav-link:hover { background: rgba(255, 255, 255, 0.06); }

.menu-divider {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.menu-panel .premium-btn {
  justify-content: center;
  margin: 2px 4px 0;
}

.menu-mobile-only {
  display: none;
  flex-direction: column;
  gap: 10px;
}

.menu-mobile-only .lang-toggle { align-self: center; }
.menu-mobile-only .login-btn { justify-content: center; margin: 0 4px; }

/* ---- tablette + mobile : liens (+ Premium) dans un menu, présenté en
   feuille qui remonte du bas avec poignée à glisser ou à cliquer ---- */
@media (max-width: 860px) {
  .nav-links, .nav-divider, .nav-right .premium-btn { display: none; }
  .menu-toggle { display: flex; }

  .menu-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
    z-index: 40;
  }

  .nav-wrap.menu-open .menu-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .menu-panel {
    display: flex;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    z-index: 50;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 10px 16px 20px;
    border-radius: 26px;
    background: linear-gradient(155deg, rgba(40, 40, 44, 0.55), rgba(14, 14, 16, 0.65) 55%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.3),
      0 30px 60px rgba(0, 0, 0, 0.55),
      0 8px 24px rgba(0, 0, 0, 0.4);
    /* display reste "flex" en permanence : la feuille est toujours dans
       le DOM, juste poussée hors écran. Un display:none couperait net
       la transition de fermeture. */
    transform: translateY(calc(100% + 20px));
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .nav-wrap.menu-open .menu-panel {
    transform: translateY(0);
  }

  .menu-handle {
    display: flex;
    align-self: center;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 28px;
    margin: -8px 0 2px;
    touch-action: none;
    cursor: pointer;
  }

  .menu-handle span {
    width: 36px;
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    transition: background 0.2s;
  }

  .menu-handle:active span { background: rgba(255, 255, 255, 0.45); }

  .menu-links .nav-link { padding: 13px 10px; font-size: 16px; }
  .menu-panel .premium-btn { padding: 13px 14px; }
}

/* ---- mobile : barre pleine largeur (logo, langue, menu), la connexion
   rejoint la feuille du bas ---- */
@media (max-width: 600px) {
  .menu-mobile-only { display: flex; }

  .nav-wrap {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
  }

  .pill {
    width: 100%;
    justify-content: space-between;
    border-radius: 0 0 22px 22px;
    border-top: 0;
    padding: 10px 14px 10px 20px;
  }

  .nav-right {
    display: flex;
    gap: 10px;
  }

  .nav-right .login-btn { display: none; }
}

/* ---- hero ---- */

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 18px;
}

h1 {
  font-size: 44px;
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.5px;
}

h1 .dim { color: var(--grey); }

.lead {
  color: var(--grey);
  font-size: 16px;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 0 32px;
}

.cta { display: flex; align-items: center; gap: 24px; }

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
}

.btn.primary {
  background: var(--white);
  color: var(--bg);
}
.btn.primary:hover { opacity: 0.85; }

.btn:not(.primary) {
  padding: 0;
  color: var(--grey);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn:not(.primary):hover { color: var(--white); border-color: var(--grey); }

/* ---- stats ---- */

.stats {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  justify-content: center;
  gap: 56px;
}

.stats div { text-align: center; }

.stats span {
  display: block;
  font-size: 32px;
  font-weight: 700;
}

.stats p {
  margin: 4px 0 0;
  color: var(--dim);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ---- live ---- */

.live {
  max-width: 900px;
  margin: 0 auto;
  padding: 56px 24px 90px;
}

#tracks {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s, background 0.2s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
}

.cover {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--track);
  flex-shrink: 0;
}

.info { flex: 1; min-width: 0; }

.guild {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 4px;
}

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

.artist {
  color: var(--grey);
  font-size: 14px;
  margin: 0 0 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar {
  height: 3px;
  background: var(--track);
  border-radius: 2px;
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  background: var(--white);
}

.meta {
  color: var(--dim);
  font-size: 12px;
  flex-shrink: 0;
  text-align: right;
  min-width: 70px;
}

.paused { opacity: 0.5; }

.empty {
  color: var(--dim);
  font-size: 14px;
}

footer {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px;
  color: var(--dim);
  font-family: 'LanaPixel', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .hero { padding-top: 60px; }
  .stats { gap: 36px; }
}

@media (max-width: 600px) {
  h1 { font-size: 32px; }
  .lead { font-size: 15px; }
  .cta { flex-wrap: wrap; }
}

@media (max-width: 480px) {
  .card { flex-wrap: wrap; }
  .meta { flex-basis: 100%; text-align: left; margin-left: 72px; margin-top: 6px; }
  .stats span { font-size: 26px; }
}
