/* ═══════════════════════════════════════════════
   INDIA NEWS RADIO — SPOTIFY STYLE DESIGN SYSTEM
   ═══════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --bg-base: #000000;
  --bg-surface: #0d0d0d;
  --bg-elevated: #161616;
  --bg-card: #1a1a1a;
  --bg-card-hover: #252525;
  --bg-highlight: #2a2a2a;
  --bg-input: #2a2a2a;
  --accent: #e63946;
  --accent-hover: #ff4757;
  --accent-glow: rgba(230, 57, 70, 0.35);
  --accent-soft: rgba(230, 57, 70, 0.1);
  --green: #1db954;
  --blue: #4a9eff;
  --gold: #f4a261;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #6a6a6a;
  --border: rgba(255,255,255,0.07);
  --sidebar-w: 280px;
  --player-h: 80px;
  --topbar-h: 64px;
  --radius: 8px;
  --radius-lg: 12px;
  --font: 'Outfit', 'Sora', -apple-system, sans-serif;
  --transition: 0.2s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font);
  overflow: hidden;
  height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
button { font-family: var(--font); cursor: pointer; border: none; }
input, textarea, select { font-family: var(--font); }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ═══════ APP LAYOUT ═══════ */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: 1fr var(--player-h);
  height: 100vh;
}

/* ═══════ SIDEBAR ═══════ */
.sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  grid-row: 1 / 3;
  overflow: hidden;
}
.sidebar-logo {
  padding: 24px 24px 20px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--border);
}
.s-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.s-logo-icon svg { width: 18px; height: 18px; fill: #fff; }
.s-logo-text { font-size: 1.1rem; font-weight: 700; letter-spacing: -0.3px; }
.s-logo-text span { color: var(--accent); }

.sidebar-nav { padding: 16px 12px; flex: 1; overflow-y: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-title {
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted);
  padding: 0 12px; margin-bottom: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 0.88rem; font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
}
.nav-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.nav-item.active { background: var(--bg-highlight); color: var(--text-primary); font-weight: 600; }
.nav-item svg { width: 20px; height: 20px; fill: currentColor; flex-shrink: 0; opacity: 0.7; }
.nav-item.active svg { opacity: 1; fill: var(--accent); }
.nav-item .badge {
  margin-left: auto;
  background: var(--accent); color: #fff;
  font-size: 0.6rem; font-weight: 700;
  padding: 2px 7px; border-radius: 10px;
}

.sidebar-playlists {
  padding: 0 12px 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.playlist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border-radius: var(--radius);
  cursor: pointer; transition: background var(--transition);
}
.playlist-item:hover { background: var(--bg-elevated); }
.pl-thumb {
  width: 42px; height: 42px; border-radius: 6px;
  overflow: hidden; flex-shrink: 0;
  background: var(--bg-highlight);
}
.pl-info h5 { font-size: 0.82rem; font-weight: 500; }
.pl-info span { font-size: 0.7rem; color: var(--text-muted); }

/* ═══════ MAIN CONTENT ═══════ */
.main {
  display: flex; flex-direction: column;
  overflow: hidden;
  background: var(--bg-base);
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(230,57,70,0.08) 0%, transparent 100%);
}
.topbar-nav { display: flex; gap: 8px; }
.topbar-nav button {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.topbar-nav button:hover { background: rgba(255,255,255,0.1); }
.topbar-nav button svg { width: 16px; height: 16px; fill: var(--text-secondary); }

.topbar-center { flex: 1; display: flex; justify-content: center; }
.topbar-pills { display: flex; gap: 8px; }
.tp {
  padding: 7px 16px; border-radius: 100px;
  background: rgba(255,255,255,0.07);
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
}
.tp:hover { background: rgba(255,255,255,0.12); color: #fff; }
.tp.active { background: #fff; color: #000; font-weight: 600; }

.topbar-right { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--bg-highlight);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700; color: var(--text-secondary);
  cursor: pointer;
}
.btn-upgrade {
  padding: 8px 18px; border-radius: 100px;
  background: #fff; color: #000;
  font-size: 0.78rem; font-weight: 700;
  transition: all var(--transition);
}
.btn-upgrade:hover { transform: scale(1.04); }

/* Scrollable content */
.content {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 32px;
}

/* ═══════ COMMON COMPONENTS ═══════ */

/* Page Title */
.page-title {
  font-size: 2rem; font-weight: 800;
  letter-spacing: -1px; margin-bottom: 6px;
}
.page-subtitle {
  font-size: 0.92rem; color: var(--text-secondary);
  margin-bottom: 30px;
}

/* Row sections */
.row-section { margin-bottom: 36px; }
.row-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 16px;
}
.row-header h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.5px; }
.row-header a {
  font-size: 0.78rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px;
  transition: color var(--transition);
}
.row-header a:hover { color: var(--text-primary); }

/* Horizontal scroll */
.h-scroll {
  display: flex; gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
}
.h-scroll::-webkit-scrollbar { height: 0; }

/* Square Card */
.s-card {
  min-width: 180px; max-width: 180px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: all 0.3s;
  scroll-snap-align: start;
}
.s-card:hover { background: var(--bg-card-hover); }
.s-card-thumb {
  position: relative;
  width: 100%; aspect-ratio: 1;
  border-radius: 6px; overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.s-card-thumb img { transition: transform 0.4s; }
.s-card:hover .s-card-thumb img { transform: scale(1.05); }
.s-card-play {
  position: absolute; bottom: 8px; right: 8px;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  opacity: 0; transform: translateY(8px);
  transition: all 0.3s;
}
.s-card:hover .s-card-play { opacity: 1; transform: translateY(0); }
.s-card-play svg { width: 18px; height: 18px; fill: #fff; margin-left: 2px; }
.s-card h4 {
  font-size: 0.88rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.s-card p {
  font-size: 0.75rem; color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}

/* Wide Card */
.w-card {
  min-width: 340px; max-width: 340px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden; display: flex;
  cursor: pointer; transition: all 0.3s;
  scroll-snap-align: start;
}
.w-card:hover { background: var(--bg-card-hover); }
.w-card-thumb { width: 100px; min-height: 100px; flex-shrink: 0; }
.w-card-body {
  flex: 1; padding: 14px 16px;
  display: flex; flex-direction: column; justify-content: center;
}
.w-card-body .cat {
  font-size: 0.62rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--accent); margin-bottom: 4px;
}
.w-card-body h4 {
  font-size: 0.88rem; font-weight: 600;
  line-height: 1.3; margin-bottom: 6px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.w-card-body .meta {
  font-size: 0.72rem; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.w-card-body .meta svg { width: 12px; height: 12px; fill: var(--text-muted); }

/* Track List */
.track-header {
  display: grid;
  grid-template-columns: 32px 52px 1fr 120px 80px 40px;
  align-items: center; gap: 14px;
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.track-header span {
  font-size: 0.68rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-muted);
}
.track-header .t-dur { text-align: right; }

.track-list { display: flex; flex-direction: column; gap: 2px; }
.track-row {
  display: grid;
  grid-template-columns: 32px 52px 1fr 120px 80px 40px;
  align-items: center; gap: 14px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer; transition: background var(--transition);
}
.track-row:hover { background: var(--bg-elevated); }
.track-num { font-size: 0.82rem; color: var(--text-muted); text-align: center; position: relative; }
.track-thumb { width: 42px; height: 42px; border-radius: 4px; overflow: hidden; }
.track-info h5 { font-size: 0.88rem; font-weight: 500; margin-bottom: 2px; }
.track-info span { font-size: 0.75rem; color: var(--text-muted); }
.track-cat { font-size: 0.75rem; color: var(--text-muted); }
.track-dur { font-size: 0.78rem; color: var(--text-muted); text-align: right; }
.track-more {
  background: none; display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition);
}
.track-row:hover .track-more { opacity: 1; }
.track-more svg { width: 16px; height: 16px; fill: var(--text-muted); }

/* ═══════ BOTTOM PLAYER ═══════ */
.player {
  grid-column: 1 / 3;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  padding: 0 20px;
  height: var(--player-h);
}
.p-left { display: flex; align-items: center; gap: 14px; }
.p-thumb { width: 52px; height: 52px; border-radius: 6px; overflow: hidden; flex-shrink: 0; }
.p-info h5 {
  font-size: 0.85rem; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 200px;
}
.p-info h5:hover { text-decoration: underline; cursor: pointer; }
.p-info span { font-size: 0.7rem; color: var(--text-muted); }
.p-heart { background: none; margin-left: 10px; }
.p-heart svg { width: 16px; height: 16px; fill: none; stroke: var(--text-muted); stroke-width: 2; }
.p-heart:hover svg { stroke: var(--accent); }

.p-center { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.p-controls { display: flex; align-items: center; gap: 18px; }
.p-controls button { background: none; display: flex; align-items: center; justify-content: center; }
.p-controls button svg { width: 16px; height: 16px; fill: var(--text-secondary); }
.p-controls button:hover svg { fill: var(--text-primary); }
.p-controls .p-play {
  width: 34px; height: 34px; border-radius: 50%; background: #fff;
}
.p-controls .p-play svg { fill: #000; width: 14px; height: 14px; margin-left: 2px; }
.p-controls .p-play:hover { transform: scale(1.06); }

.p-progress { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 520px; }
.p-progress .time { font-size: 0.68rem; color: var(--text-muted); min-width: 32px; text-align: center; }
.p-bar {
  flex: 1; height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; position: relative; cursor: pointer; overflow: hidden;
}
.p-bar:hover { height: 5px; }
.p-bar-fill { width: 35%; height: 100%; background: var(--text-primary); border-radius: 2px; }
.p-bar:hover .p-bar-fill { background: var(--accent); }

.p-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.p-right button { background: none; display: flex; align-items: center; justify-content: center; }
.p-right button svg { width: 16px; height: 16px; fill: var(--text-muted); }
.p-right button:hover svg { fill: var(--text-primary); }
.vol-slider {
  width: 90px; height: 4px; background: rgba(255,255,255,0.1);
  border-radius: 2px; overflow: hidden; cursor: pointer;
}
.vol-slider:hover { height: 5px; }
.vol-fill { width: 70%; height: 100%; background: var(--text-primary); border-radius: 2px; }
.vol-slider:hover .vol-fill { background: var(--accent); }

/* ═══════ PLAY ICONS (reusable) ═══════ */
.icon-play { display: inline-block; }
.play-svg { fill: #fff; }

/* ═══════ GRID LAYOUTS ═══════ */
.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.grid-4 .s-card { min-width: unset; max-width: unset; }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ═══════ FORM ELEMENTS ═══════ */
.form-input {
  width: 100%; padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color var(--transition);
  outline: none;
}
.form-input:focus { border-color: var(--accent); }
.form-input::placeholder { color: var(--text-muted); }
.form-textarea {
  width: 100%; padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 0.9rem;
  resize: vertical; min-height: 120px;
  outline: none;
  transition: border-color var(--transition);
}
.form-textarea:focus { border-color: var(--accent); }
.form-textarea::placeholder { color: var(--text-muted); }
.form-label {
  display: block; font-size: 0.78rem; font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px; text-transform: uppercase; letter-spacing: 1px;
}
.form-group { margin-bottom: 20px; }

.btn-accent {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px;
  background: var(--accent); color: #fff;
  font-size: 0.88rem; font-weight: 600;
  transition: all var(--transition);
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-accent:hover { background: var(--accent-hover); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: 100px;
  background: transparent; color: #fff;
  font-size: 0.88rem; font-weight: 600;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all var(--transition);
}
.btn-ghost:hover { border-color: #fff; }

/* ═══════ SEARCH BAR ═══════ */
.search-bar {
  position: relative; max-width: 480px; margin-bottom: 30px;
}
.search-bar input {
  width: 100%; padding: 14px 20px 14px 48px;
  background: var(--bg-highlight);
  border: 1px solid transparent;
  border-radius: 100px;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition);
}
.search-bar input:focus { border-color: var(--accent); background: var(--bg-elevated); }
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg {
  position: absolute; left: 18px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px; fill: var(--text-muted);
}

/* ═══════ CATEGORY CHIPS ═══════ */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 30px; }
.chip {
  padding: 10px 22px; border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer; transition: all var(--transition);
}
.chip:hover, .chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .player { grid-column: 1; }
}
@media (max-width: 768px) {
  .content { padding: 0 16px 24px; }
  .topbar { padding: 0 16px; }
  .s-card { min-width: 150px; max-width: 150px; padding: 10px; }
  .w-card { min-width: 280px; max-width: 280px; }
  .track-row { grid-template-columns: 32px 42px 1fr 60px; }
  .track-cat, .track-more { display: none; }
  .track-header { grid-template-columns: 32px 42px 1fr 60px; }
  .player { grid-template-columns: 1fr auto; }
  .p-center { display: none; }
  .grid-4 { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
