:root {
  --bg: #020c16;
  --bg2: #071828;
  --bg3: #0d2137;
  --accent: #584BC5;
  --accent2: #4BA4C5;
  --text: #e8f4f8;
  --text2: #8ab4c8;
  --red: #e53935;
  --radius: 16px;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== HEADER ===== */
.app-header {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.app-header h1 { font-size: 20px; font-weight: 700; color: #fff; }
.app-header span { font-size: 12px; color: rgba(255,255,255,0.8); display: block; }


/* ===== PLAYER CARD ===== */
.player-card {
  margin: 20px 16px;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(88,75,197,0.3);
  text-align: center;
}

.album-art {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 20px;
  border: 4px solid var(--accent);
  box-shadow: 0 0 40px rgba(88,75,197,0.5);
  transition: box-shadow 0.3s;
  display: block;
}

.album-art.playing {
  animation: spin 20s linear infinite;
  box-shadow: 0 0 60px rgba(88,75,197,0.8);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.track-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.track-artist {
  font-size: 14px;
  color: var(--text2);
  margin-bottom: 20px;
}

/* Progress bar */
.progress-bar {
  background: var(--bg3);
  border-radius: 4px;
  height: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 4px;
  transition: width 1s linear;
  width: 0%;
}

.time-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 20px;
}

/* Controls */
.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.btn-play {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(88,75,197,0.5);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-play:active { transform: scale(0.93); }
.btn-play svg { width: 28px; height: 28px; fill: #fff; }

.btn-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg3);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text2);
  transition: background 0.2s, color 0.2s;
}

.btn-icon:active { background: var(--accent); color: #fff; }
.btn-icon svg { width: 20px; height: 20px; fill: currentColor; }

/* Volume */
.volume-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
}

.volume-row svg { width: 18px; height: 18px; fill: var(--text2); flex-shrink: 0; }

input[type=range] {
  -webkit-appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 4px;
  background: var(--bg3);
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* ===== DJ LIVE CARD ===== */
.dj-live-card {
  margin: 0 16px 20px;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid rgba(229,57,53,0.4);
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.dj-live-card.hidden { display: none; }

.dj-photo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--red);
  box-shadow: 0 0 16px rgba(229,57,53,0.5);
  flex-shrink: 0;
}

.dj-info { flex: 1; min-width: 0; }
.dj-info .live-badge {
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  display: inline-block;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.dj-info .dj-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dj-info .dj-sub { font-size: 12px; color: var(--text2); }

/* ===== SECTION ===== */
.section {
  margin: 0 16px 20px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

/* ===== SCHEDULE ===== */
.schedule-list { display: flex; flex-direction: column; gap: 8px; }

.schedule-item {
  background: var(--bg2);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255,255,255,0.05);
}

.schedule-item.active {
  border-color: rgba(88,75,197,0.5);
  background: rgba(88,75,197,0.1);
}

.schedule-item.active .sched-time { color: var(--accent2); }

.schedule-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--bg3);
  flex-shrink: 0;
}

.schedule-item.active .schedule-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(88,75,197,0.7);
}

.sched-info { flex: 1; }
.sched-dj { font-size: 14px; font-weight: 600; }
.sched-show { font-size: 12px; color: var(--text2); }
.sched-time { font-size: 13px; color: var(--text2); margin-left: auto; flex-shrink: 0; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg2);
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  z-index: 100;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 0 8px;
  cursor: pointer;
  color: var(--text2);
  font-size: 11px;
  gap: 4px;
  transition: color 0.2s;
  border: none;
  background: none;
  text-decoration: none;
}

.nav-item.active { color: var(--accent2); }
.nav-item svg { width: 22px; height: 22px; fill: currentColor; }

/* ===== TABS ===== */
.tab-content { display: none; padding-bottom: 80px; }
.tab-content.active { display: block; }

/* ===== LOADING ===== */
.loading {
  text-align: center;
  color: var(--text2);
  padding: 40px;
  font-size: 14px;
}

/* ===== INSTALL BANNER ===== */
.install-banner {
  margin: 0 16px 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.install-banner.hidden { display: none; }
.install-banner p { flex: 1; font-size: 13px; color: #fff; }
.install-banner strong { display: block; font-size: 15px; }

.btn-install {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

/* CHAT LINK */
.chat-link-card {
  margin: 0 16px 20px;
  background: var(--bg2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(88,75,197,0.3);
  text-decoration: none;
  display: block;
  color: var(--text);
}

.chat-link-card svg { width: 40px; height: 40px; fill: var(--accent2); margin-bottom: 8px; }
.chat-link-card h3 { font-size: 18px; margin-bottom: 4px; }
.chat-link-card p { font-size: 13px; color: var(--text2); }

/* ===== SCHEDULE TAB ===== */
.sch-loading, .sch-empty {
  color: #aaa;
  text-align: center;
  padding: 2rem;
  font-size: 0.9rem;
}

/* Day tabs - horizontal scrollable strip */
.sch-tabs {
  display: flex;
  overflow-x: auto;
  gap: 0.4rem;
  padding: 1rem 1rem 0.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.sch-tabs::-webkit-scrollbar { display: none; }

.sch-tab {
  flex: 0 0 auto;
  background: #0d1f35;
  color: #aaa;
  border: 1px solid #1e3a5f;
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.sch-tab.today {
  border-color: #7c3aed;
  color: #c084fc;
}
.sch-tab.active {
  background: #7c3aed;
  color: #fff;
  border-color: #7c3aed;
}

/* Schedule rows */
.sch-rows {
  padding: 0.5rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0d1f35;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 0.8rem 1rem;
  transition: border-color 0.2s;
}
.sch-row.on-air {
  border-color: #ef4444;
  background: #1a0d0d;
}

.sch-row-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.sch-dj-name {
  font-size: 1rem;
  font-weight: 700;
  color: #e2e8f0;
}
.sch-show-name {
  font-size: 0.75rem;
  color: #94a3b8;
}

.sch-row-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.sch-onair {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  animation: pulse-red 1.5s infinite;
}
@keyframes pulse-red {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}
.sch-time {
  font-size: 0.85rem;
  color: #c084fc;
  font-weight: 600;
}

/* Loading spinner pe buton play */
.btn-play svg.spin {
  animation: btn-spin 0.8s linear infinite;
  transform-origin: center;
}
@keyframes btn-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
