/* ===== BASE ===== */
:root {
  --cyan: #00f2ff;
  --magenta: #ff00c8;
  --bg: #090d18;
  --surface: rgba(255,255,255,0.04);
  --border: rgba(255,255,255,0.08);
  --text: #e8eaf0;
  --text-muted: rgba(255,255,255,0.45);
  --radius: 16px;
}
.green { color: #4ade80; }
.red { color: #f87171; }
* { box-sizing: border-box; }

body {
  font-family: 'Inter', 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0; padding: 0;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse at 10% 20%, rgba(0, 242, 255, 0.13) 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 0, 200, 0.13) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 90%, rgba(0, 200, 255, 0.07) 0%, transparent 40%);
  filter: blur(70px);
  pointer-events: none;
}
body > * { position: relative; z-index: 1; }

/* ===== NAVBAR ===== */
.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 28px; height: 58px;
  background: rgba(9, 13, 24, 0.75);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.navbar-brand {
  font-family: 'Rajdhani', sans-serif; font-size: 1.5rem; font-weight: 700;
  letter-spacing: 0.04em; color: #fff; display: flex; align-items: center; gap: 10px;
}
.navbar-logo { height: 32px; width: auto; object-fit: contain; }
.navbar-actions { display: flex; gap: 10px; align-items: center; }

/* ===== SEARCH BOX ===== */
.search-wrap { position: relative; display: flex; align-items: center; }
.search-wrap svg { position: absolute; left: 12px; color: var(--text-muted); }
.search-input {
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--border);
  border-radius: 20px; padding: 6px 16px 6px 36px; color: #fff;
  font-family: inherit; font-size: 0.85rem; width: 220px; transition: all 0.2s;
}
.search-input:focus { outline: none; border-color: rgba(0, 242, 255, 0.4); background: rgba(255, 255, 255, 0.08); }

/* ===== BUTTONS ===== */
.btn-pill {
  padding: 5px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border); background: rgba(255,255,255,0.06);
  color: var(--text); transition: all 0.2s; text-decoration: none;
  display: inline-flex; align-items: center; gap: 5px; font-family: inherit;
}
.btn-pill:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.18); }
.btn-login { background: linear-gradient(135deg, #1a6cf0, #0d4fc0); border-color: transparent; color: #fff !important; }
.btn-login:hover { background: linear-gradient(135deg, #2275ff, #1358d0); }

/* ===== TABS ===== */
.tabs-wrap {
   display: flex;
   justify-content: center;
   padding: 16px 0 8px;
}
.tabs { display: flex; gap: 14px; }
.tab-btn {
  position: relative; padding: 8px 20px; border-radius: 999px; font-size: 0.85rem;
  font-weight: 500; cursor: pointer; background: transparent; border: 1px solid transparent;
  color: var(--text-muted); transition: all 0.25s ease; text-decoration: none;
}
.tab-btn:hover { color: #fff; text-shadow: 0 0 10px rgba(0,242,255,0.4); }
.tab-btn.active {
  background: rgba(255,255,255,0.1); color: #fff;
  box-shadow: 0 0 12px rgba(0,242,255,0.5), 0 0 24px rgba(255,0,200,0.35);
}
.tab-btn.active::before {
  content: ""; position: absolute; inset: 0; border-radius: 999px; padding: 1px;
  background: linear-gradient(135deg, #00f2ff, #ff00c8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}

/* ===== TAB DROPDOWN ===== */
.tab-dropdown { position: relative; }
.tab-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: rgba(14, 18, 32, 0.97); backdrop-filter: blur(16px);
  border: 1px solid var(--border); border-radius: 12px; min-width: 150px;
  overflow: hidden; z-index: 200; box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.profile-dropdown { left: auto; right: 0; transform: none; min-width: 120px; }
.tab-dropdown-item { padding: 10px 16px; font-size: 0.82rem; cursor: pointer; transition: background 0.15s; color: var(--text); text-decoration: none; display: block; }
.tab-dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* ===== CONTENT & TYPOGRAPHY ===== */
.content { padding: 16px 24px 60px; max-width: 1300px; margin: 0 auto; }
.section-group { margin-bottom: 32px; }
.section-title { font-family: 'Inter', sans-serif; font-size: 1.25rem; font-weight: 600; color: #fff; margin: 0 0 16px 2px; }

/* ===== GRIDS FOR HOME DASHBOARD ===== */
.home-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px; 
}
.hero-card {
  grid-row: span 1;
  min-height: 380px;
  display: flex;
  flex-direction: column; 
}
.side-cards-wrapper {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%; 
}
.nature-mini-card, .music-home-card {
  flex: 1;
  min-height: 180px; 
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px; 
}
.data-specialized-wrapper {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  align-content: stretch; 
}
.unlock-library-wrapper { 
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
 }
.unlock-library-wrapper .locked-card { min-height: 150px; }
.bottom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.bottom-row > * { height: 100%; }

/* ===== CARDS & NEON BORDERS ===== */
.stream-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07); cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.stream-card.neon-border::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.85; z-index: 5;
}
.stream-card:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(0, 0, 0, 0.45); }

/* Common Image/Video container setup */
.card-media { position: absolute; inset: 0; width: 100%; height: 100%; overflow: hidden; }
.card-media img, .cover-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.stream-card:hover .card-media img, .stream-card:hover .cover-media { transform: scale(1.04); }

.card-gradient-overlay {
  position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: linear-gradient(to top, rgba(9,13,24,0.85) 0%, transparent 55%);
}
.card-bottom-info { position: absolute; bottom: 0; left: 0; right: 0; padding: 14px 16px; z-index: 3; }
.card-bottom-title { font-size: 1rem; font-weight: 600; color: #fff; margin: 0 0 6px; text-shadow: 0 1px 6px rgba(0,0,0,0.6); }

/* Lock Cards */
.locked-card {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none; 
}
.locked-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  z-index: 2;
  text-align: center; 
}
.lock-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px rgba(0,242,255,0.5)); 
}
.locked-card-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.05em; 
}
.stat-panel { padding: 16px; min-height: 120px;}

/* Utilities & Fallbacks */
[x-cloak] { display: none !important; }
.live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #e0220a;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 10;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: livePulse 1.4s infinite; 
}
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.7); } }
.viewers-pill {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 5px; 
}
.viewer-dot { 
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan); 
}
.watch-btn { 
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  padding: 6px 16px;
  border-radius: 6px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.2s; 
}
.watch-btn:hover {
  background: rgba(0,242,255,0.12);
  border-color: rgba(0,242,255,0.4);
  color: var(--cyan); 
}

/* Modals */
.modal-overlay { 
  position: fixed; 
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  display: flex;
  align-items: center;
  justify-content:
  center; z-index: 500; 
}
.modal-box {
  width: 100%;
  max-width: 860px;
  padding: 20px;
  background: rgba(12, 16, 28, 0.98);
  border-radius: 18px;
  border: 1px solid var(--border);
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7); 
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255,255,255,0.08);
  border: none;
  color: #fff;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.2s; 
}
.modal-close:hover { background: rgba(255,255,255,0.16); }

/* Responsive Grid Adjustments */
@media (max-width: 768px) {
  .home-grid { grid-template-columns: 1fr; }
  .data-specialized-wrapper { grid-template-columns: 1fr; height: auto; }
  .unlock-library-wrapper { grid-template-columns: 1fr; height: auto; }
  .tabs { display: none; }
  .search-input { width: 140px; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
.data-specialized-wrapper {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 16px;
  height: 320px;
}
.data-specialized-wrapper > * { height: 100%; }
.side-cards-wrapper { display: flex; flex-direction: column; gap: 16px; height: 100%; }
.side-cards-wrapper > * { flex: 1; }

.unlock-library-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
  height: 320px;
}
.unlock-library-wrapper > * { height: 100%; }

.news-2x2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 16px;
}

.news-2x2-grid > * {
  min-height: 300px;
}

@media (max-width: 768px) {
  .news-2x2-grid { grid-template-columns: 1fr; }
}

/* ===== MUSIC PAGE ===== */
.now-playing-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: rgba(255,255,255,0.03); backdrop-filter: blur(14px);
  border: 1px solid transparent; padding: 28px;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 320px;
}
.now-playing-card::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta), var(--cyan));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; opacity: 0.85;
}
.album-art-placeholder {
  width: 160px; height: 160px; border-radius: 12px;
  margin: 0 auto 20px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(0,242,255,0.15), rgba(255,0,200,0.15));
  border: 1px solid rgba(255,255,255,0.1); font-size: 3rem;
}
.station-name {
  font-family: 'Rajdhani', sans-serif; font-size: 1.6rem; font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
}
.track-name { font-size: 0.85rem; color: var(--text-muted); margin: 0 0 20px; }
.listen-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0,242,255,0.15), rgba(255,0,200,0.15));
  border: 1px solid rgba(0,242,255,0.4);
  color: var(--cyan);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}
.listen-btn:hover, .listen-btn.playing {
  background: linear-gradient(135deg, rgba(0,242,255,0.25), rgba(255,0,200,0.25));
  box-shadow: 0 0 20px rgba(0,242,255,0.3);
}
.waveform {
  display: flex; align-items: center; justify-content: center;
  gap: 3px; height: 32px; margin-bottom: 16px;
}
.waveform-bar {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(to top, var(--cyan), var(--magenta));
  opacity: 0.5;
  animation: wave 1.2s ease-in-out infinite;
}
.waveform.active .waveform-bar { opacity: 1; }
.genres-card {
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 20px;
}
.genre-btn {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  transition: all 0.2s;
  font-family: inherit;
}
.genre-btn:hover { color: #fff; border-color: rgba(255,255,255,0.25); }
.genre-btn.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1px solid transparent;
  box-shadow: 0 0 12px rgba(0,242,255,0.4), 0 0 24px rgba(255,0,200,0.25);
  position: relative;
}
.genre-btn.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 1px;
  background: linear-gradient(135deg, #00f2ff, #ff00c8);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.station-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255,255,255,0.07);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.station-card:hover { transform: translateY(-2px); border-color: rgba(255,255,255,0.15); box-shadow: 0 8px 28px rgba(0,0,0,0.4); }
.station-card.active-station { border-color: transparent; }
.station-card.active-station::before {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius); padding: 1px;
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.station-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(0,242,255,0.15), rgba(255,0,200,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.station-info { flex: 1; min-width: 0; }
.station-title {
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  margin: 0 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; 
}
.station-listeners {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px; 
}
.listener-dot {
  width: 6px; 
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan); 
}
.player-bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 64px;
  background: rgba(9,13,24,0.92); backdrop-filter: blur(20px);
  border-top: 1px solid var(--border); z-index: 200;
  display: flex; align-items: center; padding: 0 24px; gap: 20px;
  transform: translateY(100%); transition: transform 0.3s ease;
}
.player-bar.visible { transform: translateY(0); }
.player-station-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  min-width: 140px; 
}
.player-controls {
  display: flex;
  align-items: center;
  gap: 12px; 
}
.ctrl-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.2s;
  background: rgba(255,255,255,0.08);
  color: #fff;
}
.ctrl-btn.primary {
  background: linear-gradient(135deg, var(--cyan), var(--magenta));
  color: #000;
  width: 42px;
  height: 42px;
  font-size: 1rem;
}
.ctrl-btn:hover { transform: scale(1.1); }
.volume-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.85rem; 
}
.volume-slider {
  -webkit-appearance: none;
  width: 80px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.15);
  outline: none; 
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--cyan);
  cursor: pointer; 
}
.player-waveform {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 24px; 
}
.player-waveform-bar {
  width: 2px;
  border-radius: 1px;
  background: var(--cyan);
  animation: wave 1s ease-in-out infinite; 
}
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  margin-bottom: 20px; 
}
.stations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px; 
}
.light .now-playing-card { background: rgba(255,255,255,0.6); }
.light .genres-card { background: rgba(255,255,255,0.6); }
.light .station-card { background: rgba(255,255,255,0.6); }
.light .station-title { color: #1a1f2e; }
.light .player-bar { background: rgba(232,236,245,0.95); }

@media (max-width: 768px) {
  .main-grid { grid-template-columns: 1fr; }
  .stations-grid { grid-template-columns: 1fr; }
}

/* ===== LIGHT THEME ===== */
.light {
  --bg: #f0f2f5;
  --surface: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.1);
  --text: #1a1d23;
  --text-muted: rgba(0, 0, 0, 0.5);
}

.light body {
  background-color: var(--bg) !important;
  color: var(--text) !important;
}

.light .navbar {
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--border);
}

.light .stream-card {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.light .tab-btn.active {
  background: rgba(0, 0, 0, 0.08);
  color: #000;
}

.light .card-gradient-overlay {
  background: linear-gradient(to top, rgba(240, 242, 245, 0.9) 0%, transparent 55%);
}

.light .modal-box {
  background: #ffffff;
  border: 1px solid var(--border);
}

.light .search-input {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
  color: #000;
}
