* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000;
  --card: #111;
  --border: #333;
  --text: #fff;
  --text-secondary: #aaa;
  --accent: #444;
  --accent-hover: #666;
  --success: #0f0;
  --error: #f00;
  --primary: #fff;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.banner-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 0;
  background: var(--bg);
}

.banner-container.banner-bottom {
  margin-top: 10px;
}

.banner-container .banner-ad {
  width: 728px;
  max-width: calc(100% - 20px);
  height: 90px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #4ecca3;
  border-radius: 6px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #4ecca3;
  font-size: 11px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(78, 204, 163, 0.15);
  transition: all 0.3s ease;
}

.banner-container .banner-ad:hover {
  box-shadow: 0 3px 12px rgba(78, 204, 163, 0.25);
  border-color: #45b393;
}

/* Mobile: 320x50 */
@media (max-width: 767px) {
  .banner-container .banner-ad {
    width: 320px;
    height: 50px;
    font-size: 10px;
  }
}


.banner-content {
  display: flex;
  padding: 10px;
  width: 100%;
  height: 100%;
}

.banner-horizontal {
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.banner-vertical {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  text-align: center;
}

.banner-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.banner-icon-large {
  font-size: 32px;
}

.banner-text {
  flex: 1;
}

.banner-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.banner-subtitle {
  font-size: 10px;
  color: var(--text-secondary);
}

.banner-title-vertical {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  margin: 5px 0;
}

.banner-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.feature-item {
  font-size: 9px;
  color: var(--text-secondary);
  text-align: left;
  padding: 3px 6px;
  background: var(--bg);
  border-radius: 2px;
}


.content-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  padding: 0 5px;
  max-width: 100%;
  margin: 0 auto;
}

.banner-left,
.banner-right {
  display: none;
  width: 160px;
  flex-shrink: 0;
}

.banner-left .banner-ad,
.banner-right .banner-ad {
  width: 160px;
  height: 100%;
  max-height: 400px;
  background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
  border: 1px solid #4ecca3;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #4ecca3;
  font-size: 10px;
  font-weight: 600;
  padding: 15px 8px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(78, 204, 163, 0.15);
  transition: all 0.3s ease;
  writing-mode: horizontal-tb;
}

.banner-left .banner-ad:hover,
.banner-right .banner-ad:hover {
  box-shadow: 0 3px 12px rgba(78, 204, 163, 0.25);
  border-color: #45b393;
}

/* Show sidebar ads on large screens (min 1280px to fit 160+800+160+gaps) */
@media (min-width: 1280px) {
  .banner-left,
  .banner-right {
    display: flex;
  }
  
  .content-wrapper {
    gap: 20px;
  }
}


.main-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  padding: 5px;
  max-width: 800px;
  width: 100%;
}

.app-layout {
  width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.menu-buttons {
  display: flex;
  gap: 4px;
  justify-content: center;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  padding: 0;
  margin: 0;
  border-radius: 0;
}

.menu-btn {
  flex: 1;
  min-width: 40px;
  padding: 4px 2px;
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  line-height: 1.2;
}

.menu-btn:hover {
  color: var(--text);
  background: var(--accent);
  border-color: var(--primary);
}

.menu-btn.active {
  color: var(--text);
  background: var(--accent);
  border-color: var(--primary);
}


.media-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  display: block;
  padding: 8px;
}


.two-column-layout {
  display: flex;
  flex-direction: row;
  gap: 6px;
  height: 350px;
  padding: 0;
  width: 100%;
}

.left-column {
  flex: 0 0 30%;
  max-width: 30%;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.right-column {
  flex: 0 0 calc(70% - 10px);
  max-width: calc(70% - 10px);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}


.list-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  height: 100%;
}

.list-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-title {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.list-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.list-actions select {
  padding: 4px 5px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 9px;
  cursor: pointer;
  flex: 1;
  max-width: 100%;
  width: 100%;
}

.list-actions select option {
  background: var(--card);
  color: var(--text);
  padding: 4px;
}

.refresh-btn {
  width: 24px;
  height: 24px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.refresh-btn:hover {
  background: var(--accent);
  transform: scale(1.05);
}


.items-list {
  flex: 1;
  overflow-y: auto;
}

.items-list::-webkit-scrollbar {
  width: 4px;
}

.items-list::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 2px;
}

.items-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.item, .list-item {
  padding: 8px 6px;
  background: transparent;
  border-radius: 0;
  margin-bottom: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  border-bottom: 1px solid var(--border);
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.item:last-child, .list-item:last-child {
  border-bottom: none;
}

.item:hover, .list-item:hover {
  background: var(--accent);
  padding-left: 10px;
}

.item.active, .list-item.active {
  background: var(--accent);
  border-left: 3px solid var(--primary);
  padding-left: 8px;
}

.item-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.item-name, .item-title {
  font-size: 10px;
  font-weight: 600;
  margin-bottom: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.item-info {
  flex: 1;
  overflow: hidden;
}

.item-meta {
  display: none;
}


.player-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  height: 100%;
}

.player-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-icon {
  font-size: 18px;
  flex-shrink: 0;
}

.player-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
}

.fullscreen-btn {
  padding: 4px 8px;
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.fullscreen-btn:hover {
  background: var(--accent-hover);
  border-color: var(--primary);
  transform: scale(1.05);
}

.now-title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.now-info {
  font-size: 10px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.bar:nth-child(6) { background: linear-gradient(to top, #00ff88, #00d4ff); }
.bar:nth-child(7) { background: linear-gradient(to top, #ffeb3b, #00ff88); }


.tv-frame {
  height: 175px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.tv-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: relative;
  z-index: 1;
}


.tv-frame::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: transparent;
  pointer-events: none;
  z-index: 2;
}


.player-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-btn {
  padding: 8px;
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


.music-controls {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.music-control-btn {
  padding: 8px;
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
  white-space: nowrap;
}

.music-control-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.music-control-btn.active {
  background: var(--primary);
  color: var(--bg);
  border-color: var(--primary);
}

.music-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: var(--bg);
  border-radius: 5px;
}

.volume-control span {
  font-size: 14px;
  cursor: pointer;
}

.volume-control input {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

.volume-control input::-webkit-slider-thumb {
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
}


.status {
  padding: 8px 12px;
  background: var(--bg);
  border-radius: 5px;
  font-size: 11px;
  text-align: center;
  border: 1px solid var(--border);
}

.status.success {
  color: var(--success);
  border-color: var(--success);
}

.status.error {
  color: var(--error);
  border-color: var(--error);
}


.news-content {
  flex: 1;
  background: var(--bg);
  border-radius: 6px;
  overflow-y: auto;
  padding: 10px;
  min-height: 0;
}

.news-content::-webkit-scrollbar {
  width: 4px;
}

.news-content::-webkit-scrollbar-track {
  background: var(--card);
  border-radius: 2px;
}

.news-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.news-article {
  padding: 8px;
  margin-bottom: 8px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s ease;
}

.news-article:hover {
  border-color: var(--primary);
  transform: translateX(2px);
}

.news-article-title {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 4px;
}

.news-article-desc {
  font-size: 11px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.news-article-date {
  font-size: 10px;
  color: var(--text-secondary);
}


.market-content {
  flex: 1;
  background: var(--bg);
  border-radius: 6px;
  overflow-y: auto;
  padding: 10px;
  min-height: 0;
}

.market-content::-webkit-scrollbar {
  width: 4px;
}

.market-content::-webkit-scrollbar-track {
  background: var(--card);
  border-radius: 2px;
}

.market-content::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.market-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  margin-bottom: 6px;
  background: var(--card);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.market-info {
  flex: 1;
}

.market-symbol {
  font-size: 13px;
  font-weight: 600;
}

.market-name {
  font-size: 10px;
  color: var(--text-secondary);
}

.market-price {
  text-align: right;
}

.market-value {
  font-size: 13px;
  font-weight: 600;
}

.market-change {
  font-size: 11px;
}

.market-change.positive {
  color: var(--success);
}

.market-change.negative {
  color: var(--error);
}


.loading {
  text-align: center;
  padding: 25px 15px;
}

.spinner {
  display: inline-block;
  width: 25px;
  height: 25px;
  border: 2px solid var(--border);
  border-top: 2px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


@keyframes livePulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    border-color: var(--border);
  }
  50% {
    box-shadow: 0 0 15px 5px rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
  }
}

.menu-btn.live-active {
  animation: livePulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, var(--card) 0%, rgba(255, 0, 0, 0.1) 100%);
}

.menu-btn.live-active::before {
  content: '🔴 ';
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}


.empty {
  text-align: center;
  padding: 25px 15px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 30px;
  margin-bottom: 12px;
  opacity: 0.3;
}




.media-card .section-container {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  left: -9999px !important;
}

.media-card .section-container.active {
  display: block !important;
  visibility: visible !important;
  position: relative !important;
  left: 0 !important;
}



.visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: space-evenly;
  gap: 8px;
  height: 100%;
  padding: 10px;
}

.visualizer .bar {
  flex: 1 !important;
  max-width: 40px !important;
  min-width: 20px !important;
  height: 20px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease !important;
}

.visualizer .bar:nth-child(1) { background: #ff006e !important; }
.visualizer .bar:nth-child(2) { background: #fb5607 !important; }
.visualizer .bar:nth-child(3) { background: #ffbe0b !important; }
.visualizer .bar:nth-child(4) { background: #3a86ff !important; }
.visualizer .bar:nth-child(5) { background: #00f5ff !important; }
.visualizer .bar:nth-child(6) { background: #8338ec !important; }
.visualizer .bar:nth-child(7) { background: #06ffa5 !important; }

.visualizer.active .bar {
  animation: pulse 0.8s ease-in-out infinite !important;
}

.visualizer.active .bar:nth-child(1) { animation-delay: 0s !important; }
.visualizer.active .bar:nth-child(2) { animation-delay: 0.1s !important; }
.visualizer.active .bar:nth-child(3) { animation-delay: 0.2s !important; }
.visualizer.active .bar:nth-child(4) { animation-delay: 0.3s !important; }
.visualizer.active .bar:nth-child(5) { animation-delay: 0.4s !important; }
.visualizer.active .bar:nth-child(6) { animation-delay: 0.5s !important; }
.visualizer.active .bar:nth-child(7) { animation-delay: 0.6s !important; }

@keyframes pulse {
  0% {
    min-height: 20px;
    max-height: 20px;
    opacity: 0.6;
  }
  50% {
    min-height: 120px;
    max-height: 120px;
    opacity: 1;
  }
  100% {
    min-height: 20px;
    max-height: 20px;
    opacity: 0.6;
  }
}


.media-content {
  height: 220px;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-btn {
  width: 100%;
  padding: 8px;
  background: var(--accent);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.control-btn:hover:not(:disabled) {
  background: var(--accent-hover);
}

.control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-control span {
  font-size: 16px;
  flex-shrink: 0;
}

.volume-control input[type="range"] {
  flex: 1;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.volume-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
}

.volume-control input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}








/* FORCE ALL SECTIONS EXACT SAME AS RADIO */
#section-tv .list-container,
#section-tv .player-container,
#section-music .list-container,
#section-music .player-container,
#section-podcast .list-container,
#section-podcast .player-container,
#section-news .list-container,
#section-news .player-container,
#section-market .list-container,
#section-market .player-container,
#section-live .list-container,
#section-live .player-container,
#section-mecca .list-container,
#section-mecca .player-container,
#section-nasa .list-container,
#section-nasa .player-container,
#section-gaming .list-container,
#section-gaming .player-container,
#section-edu .list-container,
#section-edu .player-container,
#section-cam .list-container,
#section-cam .player-container {
  padding: 12px !important;
  margin: 0 !important;
}
