/* ===========================================================
   Mhara Haryana — matches the saloon.wtf reference layout:
   top bar (clock / online count / stream links), full-bleed
   background photo (title text is baked into the photo itself),
   and a floating glass "pill" player fixed near the bottom.
   =========================================================== */

* { box-sizing: border-box; }

:root{
  --white: #ffffff;
  --muted: rgba(255,255,255,0.62);
  --muted-2: rgba(255,255,255,0.42);
  --green: #35d461;

  --pill-bg-1: rgba(88, 32, 22, 0.72);
  --pill-bg-2: rgba(35, 12, 10, 0.68);
  --pill-border: rgba(255,255,255,0.14);

  --art-bg: #7a2b1e;

  --font-body: "Poppins", sans-serif;
  --font-mono: "DM Mono", monospace;
}

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

html, body{ margin: 0; height: 100%; font-family: var(--font-body); color: var(--white); }

body{
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---------- background ---------- */
.bg{
  position: fixed;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}
.bg-shade{
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 22%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);
}

/* ---------- top bar ---------- */
.topbar{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  font-size: 0.9rem;
}
.topbar__time{
  font-variant-numeric: tabular-nums;
  color: var(--white);
  opacity: 0.95;
  min-width: 70px;
}
.topbar__online{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
}
.dot{
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse{
  0%, 100%{ opacity: 1; transform: scale(1); }
  50%{ opacity: 0.55; transform: scale(0.85); }
}
.topbar__links{
  display: flex;
  align-items: center;
  gap: 18px;
}
.link-pill{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
  opacity: 0.92;
  transition: opacity 0.15s ease;
}
.link-pill:hover{ opacity: 1; }
.link-pill svg{ width: 17px; height: 17px; fill: var(--white); }

/* ---------- floating player pill ---------- */
.player{
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 10;
  width: min(560px, calc(100vw - 32px));
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 18px 10px 10px;
  border-radius: 44px;
  background: linear-gradient(135deg, var(--pill-bg-1), var(--pill-bg-2));
  border: 1px solid var(--pill-border);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
}

.player__art{
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--art-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(0,0,0,0.4);
}
.art-fallback{ width: 26px; height: 26px; fill: rgba(255,255,255,0.85); }

.player__body{
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.player__text{ display: flex; flex-direction: column; }
.player__title{
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player__artist{
  margin: 1px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player__progress{ width: 100%; }
.seek{
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.22);
  cursor: pointer;
}
.seek::-webkit-slider-thumb{
  -webkit-appearance: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  margin-top: -3.5px;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.18);
}
.seek::-moz-range-thumb{
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: none;
  cursor: pointer;
}
.seek::-webkit-slider-runnable-track{ height: 3px; border-radius: 2px; }

.player__time{
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--muted-2);
}

.player__controls{
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ctrl-btn{
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.ctrl-btn:hover{ opacity: 0.85; transform: translateY(-1px); }
.ctrl-btn:focus-visible{ outline: 2px solid var(--white); outline-offset: 3px; border-radius: 50%; }
.ctrl-btn svg{ width: 100%; height: 100%; fill: currentColor; }
.ctrl-btn--sm{ width: 20px; height: 20px; opacity: 0.85; }
.ctrl-btn--lg{
  width: 40px; height: 40px;
  background: var(--white);
  color: #3a1410;
  border-radius: 50%;
  padding: 10px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.ctrl-btn--lg:hover{ color: #3a1410; opacity: 1; }

/* ---------- playlist toggle + drawer ---------- */
.playlist-toggle{
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translateX(-50%);
  z-index: 9;
  border: 1px solid var(--pill-border);
  background: rgba(30,10,8,0.55);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.76rem;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.15s ease, transform 0.2s ease;
}
.playlist-toggle:hover{ opacity: 0.9; }

.playlist-drawer{
  position: fixed;
  left: 50%;
  bottom: 150px;
  transform: translateX(-50%) translateY(12px);
  z-index: 9;
  width: min(420px, calc(100vw - 32px));
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--pill-bg-1), var(--pill-bg-2));
  border: 1px solid var(--pill-border);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}
.playlist-drawer.open{
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.playlist-drawer__list{
  list-style: none;
  margin: 0;
  padding: 10px;
  max-height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pl-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.pl-item:hover{ background: rgba(255,255,255,0.08); }
.pl-item.active{ background: rgba(255,255,255,0.14); }
.pl-item__index{ font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); width: 18px; flex: 0 0 auto; }
.pl-item__meta{ min-width: 0; flex: 1; }
.pl-item__meta p{ margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-item__title{ font-size: 0.85rem; color: var(--white); }
.pl-item__artist{ font-size: 0.72rem; color: var(--muted); margin-top: 1px !important; }
.pl-note{ padding: 14px 10px; color: var(--muted); font-size: 0.82rem; }

/* ---------- responsive ---------- */
@media (max-width: 480px){
  .topbar{ padding: 16px 16px; font-size: 0.8rem; }
  .link-pill span{ display: none; }
  .player{ bottom: 18px; padding: 8px 14px 8px 8px; gap: 10px; }
  .player__art{ width: 50px; height: 50px; border-radius: 13px; }
  .ctrl-btn--lg{ width: 36px; height: 36px; }
  .playlist-toggle{ bottom: 94px; }
  .playlist-drawer{ bottom: 132px; }
}
