/* --- MOTYW JASNY (DOMYŚLNY) --- */
body {
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(240,240,255,0.8));
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-family: 'Poppins', sans-serif;
  margin: 0;
  backdrop-filter: blur(8px);
}

/* --- TOPBAR --- */
.topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 900px;
  background: rgba(255,255,255,0.6);
  border-radius: 0 0 22px 22px;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px) saturate(150%);
}

.logo img { height: 48px; border-radius: 10px; }

.nav {
  display: flex;
  gap: 24px;
}

.nav a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: opacity .2s, transform 0.2s;
}

.nav a:hover { opacity: 0.7; transform: scale(1.05); }
.nav i { font-size: 18px; }

/* --- PRZEŁĄCZNIK MOTYWU --- */
.theme-toggle {
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  color: #000;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 12px;
  transition: background 0.3s, transform 0.3s;
  backdrop-filter: blur(8px);
}
.theme-toggle:hover {
  background: rgba(255,255,255,0.7);
  transform: scale(1.1);
}

/* --- PLAYER --- */
.player {
  background: rgba(255,255,255,0.55);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  align-items: center;
  width: 90%;
  max-width: 680px;
  box-sizing: border-box;
  box-shadow: 0 0 12px rgba(0,0,0,0.15);
  backdrop-filter: blur(14px) saturate(160%);
}

.cover {
  width: 250px;
  height: 250px;
  border-radius: 18px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(0,0,0,0.1);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 250px;
  min-width: 200px;
}

.text { margin-bottom: 10px; }

.title {
  font-size: 22px;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
  text-shadow: 0 1px 3px rgba(255,255,255,0.5);
}

.artist {
  font-size: 17px;
  color: #333;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-top: 6px;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* --- VOLUME BAR --- */
.volume {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.volume-bar {
  position: relative;
  width: 100%;
  height: 10px;
  background: rgba(0,0,0,0.15);
  border-radius: 5px;
  cursor: pointer;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.volume-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0,0,0,0.4);
  border-radius: 5px;
  transform-origin: left;
  transform: scaleX(1);
  transition: transform 0.15s linear;
}

.volume-knob {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0,0,0,0.8);
  transition: left 0.1s linear;
}

/* --- PLAY BUTTON --- */
.btn {
  width: 66px;
  height: 66px;
  background: rgba(0,0,0,0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
  flex-shrink: 0;
  backdrop-filter: blur(6px);
}

.btn:hover {
  background: rgba(0,0,0,0.9);
  transform: scale(1.05);
}

.btn svg {
  width: 36px;
  height: 36px;
  fill: #fff;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 720px) {
  body {
    height: auto;
    min-height: 100vh;
    padding: 110px 0;
  }

  .player {
    flex-direction: column;
    width: 94%;
    max-width: 420px;
    gap: 22px;
    padding: 20px;
  }

  .cover {
    width: 100%;
    height: auto;
    aspect-ratio: 1/1;
  }

  .info {
    height: auto;
    text-align: center;
    align-items: center;
  }

  .controls {
    flex-direction: column;
    gap: 14px;
    width: 100%;
  }

  .btn {
    width: 72px;
    height: 72px;
  }

  .volume {
    width: 100%;
  }

  .volume-bar {
    height: 12px;
  }

  .topbar {
    flex-direction: column;
    gap: 10px;
    border-radius: 0 0 18px 18px;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }
}

/* --- CIEMNY MOTYW (ciemnoniebieski „liquid glass”) --- */
body.dark-theme {
  background: radial-gradient(circle at top, #0b0f1a 0%, #05080f 100%);
  color: #fff;
}

body.dark-theme .topbar {
  background: rgba(15, 20, 40, 0.6);
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(16px) saturate(180%);
}

body.dark-theme .nav a { color: #fff; }
body.dark-theme .theme-toggle { 
  color: #fff;
  background: rgba(255,255,255,0.08);
}

body.dark-theme .theme-toggle:hover {
  background: rgba(255,255,255,0.15);
}

body.dark-theme .player {
  background: rgba(20, 25, 50, 0.5);
  box-shadow: 0 0 20px rgba(0,0,0,0.6);
  backdrop-filter: blur(18px) saturate(200%);
}

body.dark-theme .title { color: #fff; text-shadow: 0 0 8px rgba(0,128,255,0.4); }

body.dark-theme .artist {
  color: #aab;
  border-top: 1px solid rgba(255,255,255,0.1);
}

body.dark-theme .volume-bar { background: rgba(255,255,255,0.1); }
body.dark-theme .volume-fill { background: linear-gradient(90deg, #2b80ff, #00d4ff); }
body.dark-theme .volume-knob { background: #fff; box-shadow: 0 0 8px rgba(0,128,255,0.6); }

body.dark-theme .btn { 
  background: linear-gradient(135deg, #007aff, #0050c8);
  box-shadow: 0 0 20px rgba(0,128,255,0.4);
}
body.dark-theme .btn:hover { 
  transform: scale(1.07);
  box-shadow: 0 0 28px rgba(0,150,255,0.6);
}
body.dark-theme .btn svg { fill: #fff; }

.theme-toggle {
  z-index: 200;
  color: inherit;
}

body, .player, .topbar {
  transition: background 0.4s ease, color 0.4s ease, box-shadow 0.4s ease;
}
/* === MODAL RAMÓWKA (LIGHT / DARK - dopasowane do playera) === */
/* podstawowe: dziedziczy fonty i kolory z body/player */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 300;
  font-family: 'Poppins', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.modal.active { display: flex; }

/* overlay: lekko rozjaśnia/ściemnia zgodnie z motywem */
.modal-overlay {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(18px) brightness(0.85);
  background: rgba(255,255,255,0.45); /* light default */
  transition: background 0.3s, backdrop-filter 0.3s;
}

/* content: wygląd "liquid glass" ale dopasowany do playera */
.modal-content {
  position: relative;
  background: rgba(255,255,255,0.60); /* light default */
  border-radius: 28px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  padding: 28px;
  width: 92%;
  max-width: 720px;
  max-height: 85vh;
  overflow-y: auto;
  color: #000; /* tekst w motywie jasnym jak w playerze */
  backdrop-filter: blur(14px) saturate(140%);
  animation: modalFade 0.32s ease;
  transition: background 0.3s, color 0.3s, box-shadow 0.3s;
}

/* przy dark-theme nadpisujemy wartości */
body.dark-theme .modal-overlay {
  background: rgba(0,0,30,0.45);
  backdrop-filter: blur(18px) brightness(0.7);
}

body.dark-theme .modal-content {
  background: rgba(20,25,50,0.55);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
}

/* tytuł i guziki - styl jak w topbar/player */
.close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,0.06);
  border: none;
  color: inherit;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: background 0.18s;
}
.close-btn:hover { background: rgba(0,0,0,0.12); }

.modal-title {
  font-size: 24px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: inherit;
}

/* === AUDYCJE (wygląd i animacje) === */
.schedule {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* każdy dzień: tło subtelne jak player, z animacją wejścia */
.day-block {
  background: rgba(0,0,0,0.03); /* subtle light shadow in light mode */
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  animation: fadeUp 0.42s ease both;
  opacity: 0;
  transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}

/* dark overrides for day-block */
body.dark-theme .day-block {
  background: rgba(255,255,255,0.02);
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

/* nagłówek dnia - używa tego samego koloru co tytuł playera (dziedziczy) */
.day-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: inherit; /* niebieskie usunięte - dziedziczy kolor z .modal-content */
}

/* pojedyncza audycja */
.show {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(0,0,0,0.02);
  box-shadow: inset 0 0 6px rgba(0,0,0,0.02);
  transition: background 0.18s, transform 0.18s;
}
.show:hover { transform: translateY(-4px); }

/* dark overrides for show */
body.dark-theme .show {
  background: rgba(255,255,255,0.015);
  box-shadow: inset 0 0 8px rgba(0,0,0,0.35);
}

.show-logo {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.04);
}

.show-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* info: tytuły i opis - typografia jak w playerze */
.show-info { flex: 1; }

.show-time {
  font-weight: 700;
  margin-bottom: 4px;
  color: inherit; /* usuwa niebieskie akcenty */
  opacity: 0.9;
  font-size: 14px;
}

.show-title {
  font-size: 16px;
  font-weight: 700;
  color: inherit;
}

.show-artist {
  font-size: 14px;
  color: inherit;
  opacity: 0.85;
  margin-bottom: 6px;
  border-top: none; /* usuń linię żeby było spójnie z playerem */
  padding-top: 0;
}

.show-desc {
  font-size: 13px;
  color: inherit;
  opacity: 0.78;
  line-height: 1.45;
}

/* animacja wejścia listy */
@keyframes fadeUp {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* responsywność modala */
@media (max-width: 720px) {
  .modal-content { padding: 20px; width: 96%; max-width: 420px; }
  .show { gap: 10px; }
  .show-logo { width: 48px; height: 48px; }
}

/* drobne usprawnienia -- dopasowanie akcentów do motywu playera */
.modal-content .show-time,
.modal-content .show-title,
.modal-content .show-artist,
.modal-content .show-desc {
  transition: color 0.22s, opacity 0.22s;
}

/* jeśli chcesz podkreślić aktywny element: (możesz włączyć w JS) */
.show.active {
  box-shadow: 0 6px 22px rgba(0,0,0,0.08);
}
body.dark-theme .show.active {
  box-shadow: 0 8px 26px rgba(0,0,0,0.5);
}
