/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Jost', sans-serif;
  background: #050505;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }

/* ============================================================
   APP SHELL
============================================================ */
#app {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 48px 16px;
  box-sizing: border-box;
}

/* ============================================================
   FACE  (the main panel — the "face" metaphor)
   Five bands stacked vertically; band--wheel absorbs all slack.
============================================================ */
#face {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 420px;
  /* Tall enough to feel substantial but always fits within the padded viewport */
  height: calc(100dvh - 96px);
  max-height: 860px;
  background: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 34px;
  box-shadow: 0 44px 110px rgba(0,0,0,.5);
}
#face.search--open .band--footer { overflow: visible; }

/* ── Bands ── */
.band {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-shrink: 0;
}

.band--eye {
  /* Enough room for the eye + satellite buttons */
  padding: 24px 0 16px;
}

.band--status {
  padding: 0 24px 12px;
  overflow: hidden;
}

.band--wheel {
  /* Absorbs all remaining vertical space */
  flex: 1;
  min-height: 0;
  align-items: stretch;
}

.band--wheel #wheel-container {
  width: 100%;
}

.band--volume {
  padding: 8px 32px 16px;
  display: none;
}

.band--footer {
  flex-shrink: 0;
}

/* ============================================================
   MOBILE  (≤ 620px) — face fills the screen edge to edge
============================================================ */
@media (max-width: 620px) {
  body {
    background: #050505;
  }

  #app {
    padding: 0;
  }

  #face {
    height: 100dvh;
    min-height: unset;
    max-width: unset;
    border-radius: 0;
    border: 0;
    box-shadow: none;
  }

  /* Eye scales down to leave room for everything else */
  #eye-container,
  .eye__stack,
  .eye__layer {
    width: 120px; height: 120px;
  }

  .eye__iris {
    width: 50px; height: 50px;
  }

  .band--eye {
    padding: 16px 0 8px;
  }

  .band--status {
    padding: 0 24px 4px;
  }

  #status-label {
    font-size: 18px;
  }

  .band--volume {
    display: none;
  }
}

/* ============================================================
   BAND — EYE
   Relative container so sat-btns position against it.
============================================================ */
.band--eye {
  position: relative;
}

/* ── Satellite buttons ── */
.sat-btn {
  position: absolute;
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  opacity: .62;
  transition: opacity .2s, transform .15s;
  z-index: 2;
}
.sat-btn:hover  { opacity: .9; }
.sat-btn:active { transform: scale(.88); }
.sat-btn.is-active { opacity: 1; }
.sat-btn--tl { top: 50%; left: 48px;  transform: translateY(-50%); }
.sat-btn--tr { top: 50%; right: 48px; transform: translateY(-50%); }
.sat-btn--bl { bottom: 8px; left: 12px; }
.sat-btn--br { bottom: 8px; right: 12px; visibility: hidden; }

.sat-btn__icon {
  display: block;
  width: 52px; height: 52px;
  object-fit: contain;
}

.sat-btn--tr .sat-btn__icon {
  width: 58px; height: 52px;
}

.sat-badge {
  position: absolute; top: 14px; left: 50%;
  min-width: 30px; height: 30px;
  background: #ff4148; border-radius: 15px;
  font-size: 15px; color: #fff;
  font-weight: 700; letter-spacing: 0;
  display: none; align-items: center; justify-content: center;
  padding: 0 8px;
  transform: translateX(-50%);
  z-index: 2;
}

/* ── Eye container (play/stop button) ── */
#eye-container {
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  width: 176px; height: 176px;
  transform: scaleY(0.80);
  transition: transform .22s cubic-bezier(.34,1.56,.64,1);
  z-index: 1;
  outline: none;
}
#eye-container:hover  { transform: scaleY(0.85); }
#eye-container:active { transform: scaleY(0.72); }
#eye-container.eye--loading { animation: eyePulse 1.1s ease-in-out infinite; }
@keyframes eyePulse {
  0%,100% { opacity: 1; }
  50%     { opacity: .4; }
}

.eye__stack {
  position: relative;
  width: 176px; height: 176px;
}

/* All layers sit in the same spot; opacity cross-fades between them */
.eye__layer {
  position: absolute;
  top: 0; left: 0;
  width: 176px; height: 176px;
  object-fit: contain;
  opacity: 0;
  transition: opacity .45s ease-in-out;
  pointer-events: none;
}

.eye__layer--visible {
  opacity: 1;
}

.eye__iris {
  position: absolute;
  width: 72px; height: 72px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  pointer-events: none;
  opacity: 0;
  transition: opacity .45s ease-in-out;
}

.eye__iris.eye__layer--visible {
  animation: irisPulse 1.4s ease-in-out infinite;
}

@keyframes irisPulse {
  0%,100% { transform: translate(-50%, -50%) scale(1);    opacity: 1;  }
  50%     { transform: translate(-50%, -50%) scale(1.32); opacity: .6; }
}

/* ============================================================
   BAND — STATUS LABEL
============================================================ */
#status-label {
  font-size: 22px; font-weight: 400;
  letter-spacing: 0; text-transform: lowercase;
  color: #1a1a1a;
  text-align: center;
  width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
  transition: color .3s;
}
/* Marquee — applied by JS when text overflows the band width */
#status-label.is-scrolling {
  text-align: left;
  text-overflow: clip;
  animation: marquee var(--marquee-duration, 8s) linear infinite;
  animation-delay: 1.2s;
}
@keyframes marquee {
  0%   { transform: translateX(0); }
  10%  { transform: translateX(0); }  /* brief hold at start */
  90%  { transform: translateX(var(--marquee-offset)); }
  100% { transform: translateX(var(--marquee-offset)); }  /* brief hold at end */
}
#status-label.status--playing { color: #1a1a1a; font-weight: 400; }
#status-label.status--loading { color: #4BA3D4; }
#status-label.status--timer   { color: #e07b00; }
#status-label.status--error   { color: #e74c3c; }

/* ============================================================
   BAND — STATION WHEEL
============================================================ */
.band--wheel {
  overflow: hidden;
}

#wheel-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.wheel__viewport {
  flex: 1;
  width: 100%; overflow: hidden;
  position: relative; cursor: grab;
  user-select: none; -webkit-user-select: none;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}
.wheel__viewport:active { cursor: grabbing; }

.wheel__viewport,
.wheel__viewport * {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-select: none;
}

/* Top/bottom fade masks */
.wheel__viewport::before,
.wheel__viewport::after {
  content: ''; position: absolute;
  left: 0; right: 0; height: 110px;
  pointer-events: none; z-index: 3;
}
.wheel__viewport::before {
  top: 0;
  background: linear-gradient(to bottom, #fff 28%, rgba(255,255,255,0));
}
.wheel__viewport::after {
  bottom: 0;
  background: linear-gradient(to top, #fff 28%, rgba(255,255,255,0));
}

.wheel__track {
  position: relative;
  width: 100%;
  will-change: transform;
  z-index: 1;
}

.wheel__item {
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 0 58px;
  user-select: none; -webkit-user-select: none;
  will-change: opacity, transform;
  transition: opacity .08s linear, transform .08s linear;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.wheel__name {
  font-family: 'Jost', sans-serif;
  color: var(--wheel-color, #aaa);
  line-height: 1;
  display: block;
  text-align: center;
  white-space: nowrap; overflow: hidden;
  text-overflow: clip;
  width: min(330px, 100%);
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
  font-size: 21px;
  font-weight: var(--wheel-weight, 400);
}

.wheel__name-scale {
  display: inline-block;
  min-width: max-content;
  transform: scale(var(--wheel-scale, 1));
  transform-origin: center center;
}

.wheel__name-text {
  display: inline-block;
  min-width: max-content;
  transform: translateX(0);
}

.wheel__name--marquee .wheel__name-text {
  animation: wheelNameMarquee 6.5s ease-in-out infinite;
  animation-delay: .65s;
}

@keyframes wheelNameMarquee {
  0%, 14%   { transform: translateX(0); }
  72%, 86%  { transform: translateX(var(--wheel-marquee-offset)); }
  100%      { transform: translateX(0); }
}

.wheel__country {
  display: none;
  position: absolute;
  right: 58px;
  font-family: 'Jost', sans-serif;
  font-size: 9px; color: #ccc;
  font-weight: 400; letter-spacing: .07em;
  text-transform: uppercase; flex-shrink: 0;
}

/* Center-slot indicator */
.wheel__selector {
  position: absolute; left: 34px; right: 34px;
  background: #f1f1f1;
  border-radius: 999px;
  pointer-events: none; z-index: 0;
}

/* Reorder mode overlay — sits in the selector slot, hidden by default */
.wheel__reorder {
  position: absolute; left: 0; right: 0;
  display: none; align-items: center; justify-content: center;
  gap: 12px; z-index: 10;
  pointer-events: none;
}
.wheel__reorder.is-active {
  display: flex;
  pointer-events: auto;
}
.wheel__reorder-btn {
  width: 40px; height: 40px; border-radius: 50%;
  background: #1a1a1a; color: #fff;
  font-size: 14px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  opacity: .85;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
.wheel__reorder-btn:hover  { opacity: 1; }
.wheel__reorder-btn:active { transform: scale(.88); }
.wheel__reorder-btn--del {
  background: #e74c3c;
}
.wheel__reorder-btn--done {
  background: #e0e0e0; color: #1a1a1a;
  font-size: 12px;
}
/* Dim the viewport content while in reorder mode */
.wheel__viewport--reorder .wheel__track {
  opacity: .4;
  pointer-events: none;
}

/* ============================================================
   VOLUME / MOUTH
============================================================ */
#volume-container {
  width: 100%;
}

.volume__wrap {
  position: relative; height: 48px;
  display: flex; align-items: center;
}

.volume__svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}

.volume__slider {
  -webkit-appearance: none; appearance: none;
  position: relative; z-index: 1;
  width: 100%; height: 48px;
  background: transparent; outline: none; cursor: pointer;
}
.volume__slider::-webkit-slider-runnable-track {
  background: transparent; height: 4px;
}
.volume__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 50px; height: 50px; border-radius: 50%;
  background: #1a1a1a;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.22), inset 0 0 0 19px #050505;
  cursor: pointer; margin-top: -23px;
  transition: transform .15s, box-shadow .15s;
}
.volume__slider::-webkit-slider-thumb:hover {
  transform: scale(1.12);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
.volume__slider::-moz-range-track { background: transparent; height: 4px; }
.volume__slider::-moz-range-thumb {
  width: 50px; height: 50px; border-radius: 50%;
  background: #1a1a1a; border: 2px solid #fff; cursor: pointer;
}

/* ============================================================
   BAND — FOOTER / BRANDING
============================================================ */
.band--footer {
  background: #050505;
  border-top: 1px solid #1d1d1d;
  overflow: visible;
  z-index: 10;
}

#branding {
  display: flex; align-items: center; justify-content: flex-start;
  width: 100%;
  height: 100px;
  padding: 0 28px;
  position: relative;
  overflow: visible;
}
.branding__search-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.branding__search-label {
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #ccc;
  pointer-events: none;
}

.branding__mark {
  width: 76px; height: 76px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  transition: opacity .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.branding__mark:hover  { opacity: .8; }
.branding__mark:active { transform: scale(.92); }

.branding__logo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

.branding__name {
  position: relative;
  z-index: 1;
  font-family: 'Jost', sans-serif; font-size: 16px;
  font-weight: 700; color: #fff;
  letter-spacing: 0;
  text-shadow: 0 1px 4px rgba(0,0,0,.75);
  margin-bottom: 15px;
}

/* ============================================================
   MODALS (bottom sheets)
============================================================ */
.modal {
  position: fixed; inset: 0; z-index: 500;
  display: none; align-items: flex-end; justify-content: center;
}
.modal.is-open { display: flex; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.22);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.modal__panel {
  position: relative; background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 20px 24px 48px;
  width: 100%; max-width: 420px; z-index: 1;
  animation: slideUp .28s cubic-bezier(.25,.46,.45,.94) both;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0);    }
}

.modal__handle {
  width: 38px; height: 4px;
  background: #e0e0e0; border-radius: 2px;
  margin: 0 auto 20px;
}

.modal__title {
  font-family: 'Spectral', serif;
  font-size: 21px; font-weight: 400;
  text-align: center; margin-bottom: 22px;
}

.modal__close {
  display: block; width: 100%; padding: 13px;
  text-align: center;
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 500;
  letter-spacing: .04em;
  border: 1.5px solid #e8e8e8; border-radius: 100px;
  transition: border-color .15s; margin-top: 14px;
}
.modal__close:hover { border-color: #1a1a1a; }
.modal__close--secondary {
  color: #aaa; border-color: #f0f0f0; margin-top: 6px;
}
.modal__close--secondary:hover { border-color: #ccc; color: #666; }

/* ── Timer ── */
.timer__presets {
  display: flex; gap: 8px;
  justify-content: center; flex-wrap: wrap;
  margin-bottom: 20px;
}
.timer__btn {
  padding: 9px 16px;
  border: 1.5px solid #e8e8e8; border-radius: 100px;
  font-family: 'Jost', sans-serif;
  font-size: 13px; font-weight: 500;
  transition: all .15s;
}
.timer__btn:hover { border-color: #555; }
.timer__btn.is-active {
  border-color: #1a1a1a;
  background: #1a1a1a; color: #fff;
}

.timer__countdown {
  display: none; text-align: center; padding: 12px 0 4px;
}
.timer__remaining {
  display: block;
  font-family: 'Spectral', serif;
  font-size: 54px; font-weight: 300;
  letter-spacing: -.02em; margin-bottom: 4px;
}
.timer__sub {
  display: block; font-size: 11px; color: #aaa;
  letter-spacing: .07em; margin-bottom: 12px;
}
#tcb { display: none; }
#tcb.is-visible { display: block; }

/* ── Stream selector ── */
.stream__list { margin-bottom: 8px; }
.stream__item {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1.5px solid #e8e8e8; border-radius: 14px;
  margin-bottom: 8px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.stream__item:hover    { border-color: #888; }
.stream__item.is-active {
  border-color: #1a1a1a; background: #f8f8f8;
}
.stream__label {
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 500;
}
.stream__meta {
  font-family: 'Jost', sans-serif;
  font-size: 11px; color: #bbb; text-align: right;
}
.stream__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #1a1a1a; flex-shrink: 0;
  display: none; margin-left: 10px;
}
.stream__item.is-active .stream__dot { display: block; }

/* ============================================================
   INLINE FOOTER SEARCH
============================================================ */

/* Container lives inside #branding; grows to fill remaining width */
#search-modal-container {
  flex: 1;
  position: relative;
  margin-left: 16px;
  display: flex;
  align-items: center;
}

/* Input — hidden by default, revealed when search--active */
.search__footer-input {
  width: 100%;
  padding: 10px 16px;
  font-family: 'Jost', sans-serif;
  font-size: 15px;
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 100px;
  outline: none;
  background: rgba(255,255,255,.10);
  color: #fff;
  -webkit-appearance: none;
  appearance: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, border-color .2s;
}
.search__footer-input::placeholder { color: rgba(255,255,255,.4); }
.search__footer-input::-webkit-search-cancel-button { display: none; }
.search__footer-input:focus { border-color: rgba(255,255,255,.5); }

/* Active state — input visible */
.search--active .search__footer-input {
  opacity: 1;
  pointer-events: auto;
}

/* Results overlay — slides up from the footer over the wheel */
.search__overlay {
  position: absolute;
  bottom: calc(100% + 12px);
  left: -104px;   /* align flush with left edge of #branding */
  right: 0;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.25,.46,.45,.94),
              opacity .2s;
  opacity: 0;
  pointer-events: none;
}
.search--active .search__overlay.has-content {
  max-height: 52vh;
  opacity: 1;
  pointer-events: auto;
  overflow-y: auto;
}

.search__overlay-status {
  font-family: 'Jost', sans-serif;
  font-size: 12px; color: #bbb;
  letter-spacing: .04em; text-align: center;
  padding: 12px 0 4px;
  min-height: 0;
}
.search__overlay-status:empty { padding: 0; }

.search__overlay-list {
  padding: 4px 0 8px;
}

/* Result rows */
.si {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid #f4f4f4;
}
.si:last-child { border-bottom: none; }

.si__info {
  display: flex; flex-direction: column; gap: 2px;
  overflow: hidden; min-width: 0;
}
.si__name {
  font-family: 'Jost', sans-serif;
  font-size: 14px; font-weight: 500; color: #1a1a1a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.si__meta {
  font-family: 'Jost', sans-serif;
  font-size: 10px; color: #bbb;
  letter-spacing: .05em; text-transform: uppercase;
}

.si__actions {
  display: flex; gap: 8px; flex-shrink: 0; margin-left: 12px;
}

.si__btn {
  width: 34px; height: 34px; border-radius: 50%;
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #e8e8e8; color: #1a1a1a;
  transition: border-color .15s, background .15s, color .15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.si__btn--play:hover  { border-color: #1a1a1a; }
.si__btn--play.is-playing {
  background: #1a1a1a; color: #fff; border-color: #1a1a1a;
}
.si__btn--add { font-size: 18px; }
.si__btn--add:hover { border-color: #1a1a1a; }
.si__btn--add.is-owned {
  background: #e8f5e9; color: #2e7d32;
  border-color: #a5d6a7; font-size: 13px;
}
.si__btn--add.is-owned:hover {
  background: #ffebee; color: #c62828;
  border-color: #ef9a9a;
}

/* ============================================================
   LOADING OVERLAY
============================================================ */
#loading-overlay {
  position: fixed; inset: 0; background: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 1000; gap: 16px;
}
.loading__spinner {
  width: 28px; height: 28px;
  border: 2px solid #e8e8e8;
  border-top-color: #1a1a1a;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading__text {
  font-family: 'Jost', sans-serif;
  font-size: 13px; color: #bbb; letter-spacing: .05em;
}


/* /////////////////////////////////////////////////////////////////////////////
//
// END OF FILE
//
///////////////////////////////////////////////////////////////////////////// */
