/* TuneTerra 2.0: The World in Your Ears */

:root {
  --bg: #080e1c;
  --surface: #111b30;
  --surface-light: #192740;
  --cyan: #35e1ed;
  --violet: #896bfa;
  --gold: #f4be62;
  --text: #f6f8ff;
  --muted: #a5b3cc;
  --border: rgba(255,255,255,.09);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system,
               "Segoe UI", sans-serif;
  background:
    radial-gradient(ellipse at 85% 10%,
      rgba(137,107,250,.10), transparent 35%),
    var(--bg);
}

/* Navigation */

.tt-nav {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1500px;
  margin: auto;
  padding: 18px 38px;
}

.tt-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.9px;
}

.tt-brand img {
  width: 48px;
  height: 48px;
}

.tt-brand span span {
  color: var(--cyan);
}

.tt-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.tt-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s;
}

.tt-links a:hover {
  color: var(--cyan);
}

.tt-account {
  display: flex;
  align-items: center;
  gap: 12px;
}

.tt-account a {
  padding: 11px 17px;
  color: white;
  text-decoration: none;
  border-radius: 11px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 700;
}

.tt-account .tt-signup {
  color: #08101e;
  background: var(--cyan);
  border-color: var(--cyan);
}

/* Hero */

header.tt-header {
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(ellipse at 50% 70%,
      rgba(31,137,195,.14), transparent 55%),
    linear-gradient(180deg,#101b31,#080e1c);
  border-bottom: 1px solid var(--border);
}

.tt-hero {
  position: relative;
  max-width: 1100px;
  margin: auto;
  padding: 85px 24px 100px;
  text-align: center;
}

.tt-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border-radius: 50px;
  border: 1px solid rgba(53,225,237,.25);
  background: rgba(53,225,237,.06);
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.tt-hero h1 {
  margin: 27px auto 18px;
  max-width: 1000px;
  font-size: clamp(48px,7vw,92px);
  line-height: 1.07;
  font-weight: 850;
  letter-spacing: -4px;
  color: white;
}

.tt-hero h1 span {
  display: block;
  background: linear-gradient(95deg,#39e5ed,#83aaff,#a88bff);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tt-hero-subtitle {
  margin: 0 auto;
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(16px,2vw,20px);
  line-height: 1.8;
  letter-spacing: 0;
}

.tt-hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-top: 35px;
  flex-wrap: wrap;
}

.tt-primary,
.tt-secondary {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 49px;
  padding: 13px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s, background .2s;
}

.tt-primary {
  color: #07111e;
  background: var(--cyan);
}

.tt-secondary {
  color: white;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.14);
}

.tt-primary:hover,
.tt-secondary:hover {
  transform: translateY(-3px);
}

/* Main directory */

main.tt-main {
  max-width: 1480px;
  margin: auto;
  padding: 75px 38px 130px;
}

.tt-section-heading {
  margin-bottom: 30px;
}

.tt-section-kicker {
  display: block;
  margin-bottom: 12px;
  color: var(--cyan);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.tt-section-heading h2 {
  margin: 0 0 15px;
  max-width: 1000px;
  font-size: clamp(29px,3.5vw,44px);
  line-height: 1.2;
  letter-spacing: -1.5px;
  color: white;
}

.tt-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.filters {
  display: flex;
  gap: 15px;
  padding: 19px;
  margin-bottom: 32px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: rgba(17,27,48,.9);
}

.filters input,
.filters select {
  min-height: 56px;
  padding: 14px 18px;
  background: #0b1426;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: 15px;
}

.filters input {
  flex: 2;
  min-width: 0;
}

.filters select {
  flex: 1;
  min-width: 0;
}

.filters input:focus,
.filters select:focus {
  outline: 2px solid var(--cyan);
  outline-offset: 1px;
}

/* Station grid */

#stations {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(225px,1fr));
  gap: 22px;
  align-items: stretch;
}

.station {
  position: relative;
  height: 245px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 14px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  border-radius: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(155deg,#1c2d49,#111b30 80%);
  box-shadow: 0 10px 30px rgba(0,0,0,.14);
  transition:
    transform .22s,
    border-color .22s,
    box-shadow .22s;
}

.station::after {
  content: "▶";
  position: absolute;
  right: 13px;
  top: 13px;
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  color: #07111e;
  background: var(--cyan);
  font-size: 11px;
  opacity: .85;
  pointer-events: none;
}

.station:hover {
  transform: translateY(-5px);
  border-color: rgba(53,225,237,.65);
  box-shadow: 0 18px 45px rgba(0,0,0,.3);
}

.station.active {
  border-color: var(--cyan);
  background: linear-gradient(155deg,#1c4050,#11233a);
}

.station.active::after {
  content: "♫";
}

.station-logo {
  display: block;
  width: 80px;
  height: 80px;
  min-height: 80px;
  margin: 0 0 14px;
  object-fit: contain;
  border-radius: 14px;
}

.station h3 {
  width: 100%;
  height: 44px;
  margin: 0 0 10px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow-wrap: anywhere;
  color: white;
  font-size: 16px;
  line-height: 22px;
  font-weight: 750;
}

.station p {
  width: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.station p:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.load-more {
  text-align: center;
  padding: 42px 0;
}

.load-more button[hidden] {
  display: none;
}

button {
  padding: 12px 25px;
  border: 0;
  border-radius: 12px;
  background: var(--cyan);
  color: #07111e;
  font-weight: 800;
  cursor: pointer;
}

button:hover {
  background: #80f2f6;
}

/* Player */

.player.tt-player {
  position: sticky;
  bottom: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 16px 35px;
  text-align: left;
  border-top: 1px solid rgba(53,225,237,.35);
  background: rgba(9,16,31,.97);
  box-shadow: 0 -15px 45px rgba(0,0,0,.35);
  backdrop-filter: blur(20px);
}

.tt-now-playing {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  flex: 1;
}

.tt-player-art {
  width: 55px;
  height: 55px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface-light);
}

.tt-track-info {
  min-width: 0;
}

.tt-track-info strong {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 15px;
}

.tt-track-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tt-player-controls {
  display: flex;
  align-items: center;
  gap: 22px;
}

.tt-player-controls label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

#play {
  min-width: 112px;
}

#volume {
  accent-color: var(--cyan);
}

/* Footer */

.tt-footer {
  padding: 45px 25px 125px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.tt-footer strong {
  display: block;
  margin-bottom: 10px;
  color: white;
  font-size: 19px;
}

/* Responsive */

@media (max-width: 900px) {
  .tt-links {
    gap: 14px;
  }

  .tt-nav {
    padding: 18px 22px;
  }

  .tt-brand {
    font-size: 23px;
  }
}

@media (max-width: 720px) {
  .tt-nav {
    flex-wrap: wrap;
    gap: 14px;
  }

  .tt-links {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 8px;
  }

  .tt-account {
    margin-left: auto;
  }

  .tt-account a {
    padding: 9px 11px;
    font-size: 12px;
  }

  .tt-hero {
    padding: 65px 18px 75px;
  }

  .tt-hero h1 {
    font-size: clamp(43px,9vw,65px);
    letter-spacing: -2px;
  }

  main.tt-main {
    padding: 48px 17px 85px;
  }

  .filters {
    flex-direction: column;
    padding: 14px;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  #stations {
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 13px;
  }

  .station {
    padding: 18px 10px;
  }

  .station h3 {
    font-size: 14px;
  }

  .player.tt-player {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 15px;
  }

  .tt-now-playing {
    flex-basis: 100%;
  }

  .tt-player-controls {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 380px) {
  #stations {
    grid-template-columns: 1fr;
  }

  .tt-brand {
    font-size: 20px;
  }

  .tt-brand img {
    width: 38px;
    height: 38px;
  }

  .tt-player-controls label {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
