/* Goomavo — a warm old radio set carved from wood and brass. */

:root {
  --wood: #3a2a1a;
  --wood-deep: #2a1d10;
  --case: #57402a;
  --case-deep: #47331f;
  --brass: #d9a441;
  --brass-soft: #e8c168;
  --cream: #f2e8d5;
  --cream-dim: #c4b394;
  --grille: #2c2015;
  --glow: #ffcf7d;
}

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

[hidden] { display: none !important; }

body {
  min-height: 100dvh;
  background:
    repeating-linear-gradient(88deg, transparent 0 60px, rgba(0, 0, 0, 0.12) 60px 62px),
    linear-gradient(180deg, var(--wood-deep), var(--wood) 45%);
  color: var(--cream);
  font-family: "Archivo", system-ui, sans-serif;
  padding-bottom: 56px;
}

[lang^="dux"] { font-family: "Charis SIL", serif; }

#top { padding: max(16px, env(safe-area-inset-top)) 20px 8px; display: flex; align-items: center; }

#top h1 { font-size: 1.8rem; font-weight: 400; color: var(--brass-soft); }
#top h1 .sub { display: block; font-family: "Archivo", sans-serif; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cream-dim); }

#net-badge { margin-left: auto; border: 1px solid var(--brass); color: var(--brass-soft); border-radius: 999px; padding: 2px 10px; font-size: 0.7rem; }

/* ---------- the set ---------- */

#radio {
  margin: 10px 16px 6px;
  max-width: 560px;
  border-radius: 26px;
  background:
    radial-gradient(140% 100% at 50% -20%, rgba(255, 226, 160, 0.12), transparent 50%),
    linear-gradient(165deg, var(--case), var(--case-deep));
  border: 2px solid #6b5236;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  padding: 18px 18px 16px;
}

@media (min-width: 600px) { #radio { margin: 10px auto 6px; } }

#dial-strip {
  position: relative;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1c150c, #241a0e);
  border: 1px solid #6b5236;
  overflow: hidden;
}

#dial-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, rgba(232, 193, 104, 0.5) 0 1.5px, transparent 1.5px 14px);
  opacity: 0.55;
}

#needle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 30%;
  width: 3px;
  background: var(--glow);
  box-shadow: 0 0 10px var(--glow);
  transition: left 0.7s cubic-bezier(0.3, 0.8, 0.3, 1);
}

#display {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 14px 8px 8px;
}

#np-kind {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brass);
}

#np-word {
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  line-height: 1.18;
  color: var(--cream);
  text-shadow: 0 0 26px rgba(255, 207, 125, 0.3);
  overflow-wrap: anywhere;
}

#np-gloss { font-size: 0.95rem; color: var(--cream-dim); line-height: 1.5; margin-top: 4px; }

/* VU bars */
#vu {
  display: flex;
  justify-content: center;
  gap: 5px;
  height: 26px;
  align-items: flex-end;
  margin: 6px 0 12px;
}

#vu span {
  width: 7px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--brass-soft), var(--brass));
  height: 18%;
  transition: height 0.2s;
}

#vu.live span { animation: vu 0.7s ease-in-out infinite alternate; }
#vu.live span:nth-child(1) { animation-delay: 0s; }
#vu.live span:nth-child(2) { animation-delay: 0.12s; }
#vu.live span:nth-child(3) { animation-delay: 0.24s; }
#vu.live span:nth-child(4) { animation-delay: 0.05s; }
#vu.live span:nth-child(5) { animation-delay: 0.3s; }
#vu.live span:nth-child(6) { animation-delay: 0.18s; }
#vu.live span:nth-child(7) { animation-delay: 0.09s; }

@keyframes vu {
  from { height: 15%; }
  to { height: 96%; }
}

/* controls */
#controls { display: flex; justify-content: center; align-items: center; gap: 20px; }

#playpause {
  width: 78px;
  height: 78px;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, var(--brass-soft), var(--brass) 62%, #a87724);
  color: var(--wood-deep);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 0 #8a6220, 0 12px 32px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}

#playpause:active { transform: scale(0.93) translateY(2px); }
#playpause svg { width: 30px; height: 30px; }

#next, #fav {
  width: 56px;
  height: 56px;
  border: 1.6px solid #6b5236;
  border-radius: 50%;
  background: rgba(28, 21, 12, 0.55);
  color: var(--cream);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s, color 0.2s;
}

#next:active, #fav:active { transform: scale(0.9); }
#next svg, #fav svg { width: 22px; height: 22px; }

#fav.faved { color: var(--brass-soft); }
#fav.faved svg path { fill: currentColor; }

/* ---------- stations ---------- */

#stations {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 18px 6px;
  max-width: 600px;
  margin: 0 auto;
  scrollbar-width: none;
}

#stations::-webkit-scrollbar { display: none; }

.station {
  flex: 0 0 auto;
  border: 1.5px solid #6b5236;
  background: rgba(28, 21, 12, 0.5);
  color: var(--cream-dim);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s;
}

.station:active { transform: scale(0.94); }
.station.active { background: var(--brass); border-color: var(--brass); color: var(--wood-deep); }

/* favorites list */
#fav-list-zone { padding: 8px 18px 24px; max-width: 600px; margin: 0 auto; }

#fav-title { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 8px 0; }

.fav-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-bottom: 1px solid rgba(107, 82, 54, 0.5);
  padding: 9px 2px;
}

.fav-row .w { font-family: "Charis SIL", serif; font-size: 1.2rem; color: var(--brass-soft); cursor: pointer; }
.fav-row .g { font-size: 0.82rem; color: var(--cream-dim); }
.fav-row .rm { margin-left: auto; border: 0; background: transparent; color: var(--cream-dim); font-size: 1rem; cursor: pointer; }

#foot {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 9px 18px calc(9px + env(safe-area-inset-bottom));
  background: rgba(42, 29, 16, 0.95);
  border-top: 1px solid #6b5236;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--cream-dim);
}

#foot a { color: var(--brass-soft); text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
