/* ============================================================
   GLOBAL VARIABLES — DARK MODE DEFAULT
   ============================================================ */

:root {
  /* Accent */
  --accent: #1DB954;
  --accent-focus: rgba(29,185,84,0.35);

  /* Dark mode defaults */
  --bg: #0b0b0b;
  --text: #fff;

  /* Tiles */
  --tile-bg: #141414;
  --tile-border: rgba(255,255,255,0.05);

  /* Dropdowns / inputs */
  --select-bg: rgba(255,255,255,0.06);
  --select-bg-hover: rgba(255,255,255,0.12);
  --select-border: rgba(255,255,255,0.15);
  --select-text: #fff;

  /* Buttons */
  --btn-bg: rgba(255,255,255,0.08);
  --btn-hover: rgba(255,255,255,0.16);
  --btn-text: #fff;

  /* Icon buttons */
  --icon-btn-bg: rgba(255,255,255,0.08);
  --icon-btn-hover: rgba(255,255,255,0.16);

  /* Cards / popup */
  --card-bg: #141414;
  --nav-border: rgba(255,255,255,0.12);

  /* Misc */
  --badge-text: #fff;
}

/* ============================================================
   LIGHT MODE — OWN STYLE
   ============================================================ */

body.light {
  --bg: #f4f6f9;
  --text: #111;

  --tile-bg: #141414; /* tiles always dark */
  --tile-border: rgba(0,0,0,0.1);

  --select-bg: rgba(255,255,255,0.85);
  --select-bg-hover: rgba(255,255,255,1);
  --select-border: rgba(0,0,0,0.2);
  --select-text: #111;

  --btn-bg: rgba(255,255,255,0.85);
  --btn-hover: rgba(255,255,255,1);
  --btn-text: #111;

  --icon-btn-bg: rgba(0,0,0,0.08);
  --icon-btn-hover: rgba(0,0,0,0.15);

  --card-bg: rgba(255,255,255,0.9);
  --nav-border: rgba(0,0,0,0.15);

  --badge-text: #000;
}

/* ============================================================
   RESET + BASE
   ============================================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s, color 0.3s;
  padding-bottom: 140px;
}

/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  background: #111;
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo {
  font-size: 22px;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
}

.theme-btn {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
  transition: 0.2s;
}

.theme-btn:hover {
  background: var(--btn-hover);
}

/* ============================================================
   CONTENT
   ============================================================ */

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header-area {
  text-align: center;
  padding: 40px 20px 20px;
}

.header-area h1 {
  font-size: 36px;
  color: var(--accent);
}

.timestamp {
  margin-top: 8px;
  opacity: 0.7;
  font-size: 16px;
}

/* ============================================================
   STATION GRID
   ============================================================ */

.station-grid {
  display: grid;
  gap: 26px;
  margin-top: 20px;
}

@media (min-width: 900px) {
  .station-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 600px) and (max-width: 899px) {
  .station-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 599px) {
  .station-grid { grid-template-columns: 1fr; }
}

.station-card {
  background: var(--tile-bg);
  padding: 30px;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  transition: 0.25s;
  font-size: 22px;
  font-weight: 600;
  height: 110px;
  border: 1px solid var(--tile-border);
  opacity: 0;
  transform: translateY(12px);
  animation: fadeIn 0.45s ease forwards;
}

.station-card:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,0.06);
}

@keyframes fadeIn {
  to { opacity: 1; transform: translateY(0); }
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.green { background: var(--accent); }
.red { background: #ff4444; }

/* ============================================================
   SPOTLISTR POPUP
   ============================================================ */

#spotlistrPopup {
  position: absolute;
  top: 60px;
  right: 20px;
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  padding: 18px;
  width: 320px;
  z-index: 100;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#spotlistrPopup p {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 8px;
  text-align: center;
}

.pantex-textarea {
  width: 100%;
  height: 280px;
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  padding: 14px;
  font-size: 15px;
  resize: none;
  transition: 0.2s;
}

.pantex-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-focus);
}

/* ============================================================
   CUSTOM DROPDOWNS
   ============================================================ */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background: var(--select-bg);
  color: var(--select-text);
  border: 1px solid var(--select-border);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(14px);
  transition: 0.2s ease;
  min-width: 60px;
}

.dropdown-btn:hover {
  background: var(--select-bg-hover);
  border-color: var(--accent);
}

.dropdown-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--card-bg);
  border: 1px solid var(--nav-border);
  border-radius: 14px;
  box-shadow: 0 12px 35px rgba(0,0,0,0.35);
  backdrop-filter: blur(18px);
  padding: 6px 0;
  width: 200px;
  display: none;
  flex-direction: column;
  animation: dropdownOpen 0.18s ease;
  z-index: 9999;
}

@keyframes dropdownOpen {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

#liveDropdown .dropdown-list {
  top: auto;
  bottom: calc(100% + 6px);
  animation: dropdownUp 0.18s ease;
}

@keyframes dropdownUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-list div {
  padding: 12px 16px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.15s ease;
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: center;
}

.dropdown-list div:hover {
  background: rgba(29,185,84,0.18);
}

.dropdown-list div.selected {
  background: rgba(29,185,84,0.28);
  font-weight: 600;
}

/* ============================================================
   MINI PLAYER — ALWAYS DARK
   ============================================================ */

.mini-player {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(12,12,12,0.78);
  backdrop-filter: blur(18px) saturate(160%);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  z-index: 999;
  box-shadow: 0 -10px 35px rgba(0,0,0,0.55);
  transition: transform 0.28s ease, opacity 0.2s ease;
}

.mini-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.mini-main {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-station-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.mini-live-badge.active {
  opacity: 1;
  transform: translateY(0);
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.mini-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.18s ease;
}

.mini-btn:hover {
  filter: brightness(1.12);
}

.mini-icon-btn {
  background: var(--icon-btn-bg);
  color: var(--btn-text);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.18s ease;
}

.mini-icon-btn:hover {
  background: var(--icon-btn-hover);
}

.mini-volume-slider {
  position: absolute;
  bottom: 82px;
  right: 18px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(12,12,12,0.9);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mini-volume-slider.hidden {
  display: none;
}

.mini-volume-slider input[type="range"] {
  writing-mode: vertical-lr;
  direction: rtl;
  width: 24px;
  height: 64px;
  background: transparent;
}

/* ============================================================
   WIDGET PLAYER — SPOTIFY CLEAN
   ============================================================ */

.mini-player.widget.clean-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 320px;
  background: #181818;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(18px);
  z-index: 9998;
}

/* LEFT SIDE */
.widget-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.widget-icon {
  font-size: 20px;
}

.widget-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.widget-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
}

.widget-station {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
}

.widget-live {
  font-size: 11px;
  color: #1DB954;
  opacity: 0;
  transition: 0.18s ease;
}

.widget-live.active {
  opacity: 1;
}

/* CONTROLS */
.widget-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.widget-icon-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
}

.widget-icon-btn:hover {
  background: rgba(255,255,255,0.16);
}

.widget-play-btn {
  background: #1DB954;
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.15s ease;
}

.widget-play-btn:hover {
  filter: brightness(1.08);
}

/* VOLUME SLIDER */
.clean-widget .mini-volume-slider {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}


/* ============================================================
   MINI PLAYER LAUNCHER
   ============================================================ */

#miniPlayerLauncher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(0,255,157,0.35);
  box-shadow: 0 0 12px rgba(0,255,157,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #00ff9d;
  cursor: pointer;
  backdrop-filter: blur(14px) saturate(180%);
  transition: 0.25s ease;
  z-index: 9999;
}

#miniPlayerLauncher:hover {
  transform: scale(1.12) translateY(-2px);
  background: rgba(0,255,157,0.12);
}

/* ============================================================
   POPUP PLAYER — SPOTIFY CLEAN THEME
   ============================================================ */

.popup-player.clean {
  background: #121212;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  padding: 24px;
  font-family: "Inter", sans-serif;
}

/* CLOSE BUTTON */
.popup-close-btn {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s ease;
  z-index: 10;
}

.popup-close-btn:hover {
  background: rgba(255,255,255,0.16);
}

/* MAIN CARD */
.popup-card {
  width: 320px;
  padding: 20px 18px 22px;
  border-radius: 16px;
  background: #181818;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* TOP: STATION INFO */
.player-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.station-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.station-icon {
  font-size: 20px;
}

.station-texts {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.station-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
}

.station-name {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

/* LIVE BADGE */
.mini-live-badge {
  font-size: 11px;
  color: #1DB954;
  opacity: 0;
  transition: 0.18s ease;
}

.mini-live-badge.active {
  opacity: 1;
}

/* MIDDLE: CONTROLS */
.player-middle {
  display: flex;
  justify-content: center;
}

.mini-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* BUTTONS */
.popup-player.clean .mini-btn {
  background: #1DB954;
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 15px;
  cursor: pointer;
  transition: 0.15s ease;
}

.popup-player.clean .mini-btn:hover {
  filter: brightness(1.08);
}

.popup-player.clean .mini-icon-btn {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.15s ease;
}

.popup-player.clean .mini-icon-btn:hover {
  background: rgba(255,255,255,0.16);
}

/* BOTTOM: DROPDOWN */
.player-bottom {
  display: flex;
  justify-content: center;
}

.popup-player.clean .dropdown {
  width: 100%;
}

.popup-player.clean .dropdown-btn {
  width: 100%;
  text-align: left;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.popup-player.clean .dropdown-btn:hover {
  background: rgba(255,255,255,0.12);
}

.popup-player.clean .dropdown-list {
  background: #181818;
  border: 1px solid rgba(255,255,255,0.12);
}

/* VOLUME SLIDER */
.popup-player.clean .mini-volume-slider {
  position: absolute;
  bottom: 18px;
  right: 18px;
  background: #181818;
  border: 1px solid rgba(255,255,255,0.12);
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn-accent {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  padding: 10px 18px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  cursor: pointer !important;
  transition: 0.2s ease !important;
  font-weight: 600 !important;
  backdrop-filter: blur(12px) !important;
}

.btn-accent:hover {
  filter: brightness(1.12) !important;
  transform: translateY(-1px) !important;
}

.trigger-btn {
  background: var(--btn-bg) !important;
  color: var(--accent) !important;
  border: 1px solid var(--select-border) !important;
  padding: 12px 22px !important;
  border-radius: 12px !important;
  cursor: pointer !important;
  font-size: 15px !important;
  transition: 0.2s ease !important;
  backdrop-filter: blur(12px) !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px !important;
}

.trigger-wrapper {
  display: flex !important;
  justify-content: center !important;
  margin-top: 40px !important;
  margin-bottom: 40px !important;
}

.trigger-btn:hover {
  background: var(--btn-hover) !important;
  border-color: var(--accent) !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   IND STATIONS
   ============================================================ */

.songlist {
  list-style: none;
  margin-top: 30px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.songlist li {
  background: var(--tile-bg);
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid var(--tile-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.songlist a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}

.new-flag {
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
}
