:root {
  --bg: #212121;
  --bg2: #2a2a2a;
  --card: #2e2e2e;
  --card-hover: #363636;
  --border: #3a3a3a;
  --text: #e6e6e6;
  --text2: #999;
  --text3: #666;
  --red: #e74c3c;
  --red-hover: #c0392b;
  --live: #3fb950;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  color: var(--red);
}

img {
  max-width: 100%;
  height: auto;
}

.wrap {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 360px;
  min-width: 360px;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 2rem;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--border);
}

/* Sidebar tabs */
.sidebar-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.sidebar-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 6px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text3);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}

.sidebar-tab:hover {
  color: var(--text2);
}

.sidebar-tab.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

/* Sidebar panels */
.sidebar-panel {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 10px 0;
}

.sidebar-panel.active {
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 0 10px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text2);
  font-size: 15px;
  font-weight: 500;
  transition: background .15s, color .15s;
}

.sidebar-link:hover {
  background: var(--bg2);
  color: var(--text);
}

.sidebar-link.active {
  background: var(--card);
  color: var(--red);
}

.sidebar-link svg {
  flex-shrink: 0;
}

/* Sidebar channel list */
.sidebar-section {
  padding: 0 10px;
  margin-bottom: 12px;
}

.sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 8px 16px;
}

.sidebar-section-title {
  display: block;
  font-size: 1.2rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text3);
  padding: 6px 10px;
  letter-spacing: .5px;
}-

.sidebar-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  color: var(--text2);
  font-size: 1rem;
  transition: background .15s, color .15s;
}

.sidebar-item:hover {
  background: var(--bg2);
  color: var(--text);
}

.sidebar-item img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  background: var(--bg2);
  padding: 2px;
  flex-shrink: 0;
}

/* Main */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 4px;
}

.search {
  margin-left: auto;
  max-width: 360px;
  position: relative;
}

.search input {
  width: 100%;
  padding: 7px 12px 7px 32px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .85rem;
  outline: none;
  font-family: var(--font);
}

.search input:focus {
  border-color: var(--red);
}

.search input::placeholder {
  color: var(--text3);
}

.search .si {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
}

/* Category Chips */
.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 20px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
}

.chip {
  padding: 5px 14px;
  font-size: .78rem;
  font-weight: 500;
  white-space: nowrap;
  background: var(--card);
  color: var(--text2);
  border: 1px solid var(--border);
  transition: .15s;
  cursor: pointer;
}

.chip:hover {
  background: var(--card-hover);
  color: var(--text);
  border-color: var(--red);
}

.chip.on {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* Content */
.content {
  padding: 20px;
}
.page-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 20px;
}
.page-section .container,
.contact-section .container {
  max-width: 900px;
  margin: 0 auto;
}

.shead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.shead h2 {
  font-size: 1.3rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shead .more {
  font-size: .82rem;
  color: var(--text2);
}

.shead .more:hover {
  color: var(--red);
}

.sec {
  margin-bottom: 36px;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.card {
  background: var(--card);
  cursor: pointer;
  transition: .2s;
  border: 1px solid var(--border);
}

.card:hover {
  background: var(--card-hover);
  border-color: var(--red);
}

.card-img {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.card-body {
  padding: 6px 10px 12px;
  text-align: center;
}

.card-name {
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-sub {
  font-size: .7rem;
  color: var(--text3);
  display: block;
  margin-top: 2px;
}

.badge-type {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 2px 7px;
  font-size: .55rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(231, 76, 60, .15);
  color: var(--red);
}

.badge-type.tv {
  background: rgba(52, 152, 219, .15);
  color: #3498db;
}

/* Live badge */
.live {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(63, 185, 80, .15);
  color: var(--live);
}

.live-dot {
  width: 5px;
  height: 5px;
  background: var(--live);
  animation: pulse 1.5s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1
  }

  50% {
    opacity: .3
  }
}

/* Player Bar */
.pbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  z-index: 9999;
  padding: 8px 20px;
}

.pbar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1400px;
  margin: 0 auto;
}

.pbar-play {
  width: 36px;
  height: 36px;
  background: var(--red);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pbar-play:hover {
  background: var(--red-hover);
}

.pbar-info {
  flex: 1;
  min-width: 0;
}

.pbar-title {
  display: block;
  font-weight: 600;
  font-size: .85rem;
}

.pbar-status {
  font-size: .75rem;
  color: var(--text3);
}

.pbar-vol input {
  width: 80px;
  accent-color: var(--red);
}

.pbar-close {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  padding: 6px;
}

.pbar-close:hover {
  color: var(--text);
}

/* Footer */
.footer {
  background: var(--bg2);
  border-top: 1px solid var(--border);
  padding: 20px 20px 20px;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: .85rem;
  color: var(--text3);
}

.footer-inner a {
  color: var(--text2);
  text-decoration: underline;
}

.footer-inner a:hover {
  color: var(--red);
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 999;
}

.overlay.on {
  display: block;
}

/* Pages */
.pban {
  padding: 16px 0;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.pban h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* Player detail */
.play-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.play-main {
  min-width: 0;
}

.play-card {
  background: var(--card);
  padding: 20px;
}

.play-aside {
  position: sticky;
  top: 80px;
}

.play-info-card {
  background: var(--card);
  padding: 20px;
}

.play-info-logo {
  width: 100%;
  max-width: 200px;
  height: auto;
  object-fit: contain;
  margin-bottom: 16px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.play-info-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.play-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.play-info-desc {
  font-size: 1rem;
  color: var(--text2);
  line-height: 1.5;
  margin-bottom: 12px;
}

.play-info-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.play-info-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg2);
  color: var(--text2);
  font-size: .85rem;
  transition: background .15s, color .15s;
}

.play-info-link:hover {
  background: var(--card-hover);
  color: var(--text);
}

.play-badge {
  font-size: .75rem;
  padding: 2px 8px;
  background: var(--bg2);
  color: var(--text2);
}

.badge-tech {
  font-size: .75rem;
  padding: 2px 8px;
  background: var(--bg2);
  color: var(--text2);
}

/* Player wrapper - fixed 16:9 ratio for video only */
.player-wrapper {
  position: relative;
  width: 100%;
}

.video-player-wrapper,
.hls-player-wrapper,
.youtube-wrapper,
.twitch-wrapper,
.iframe-wrapper {
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
}

.audio-player-wrapper {
  background: var(--card);
  padding: 16px;
}

.player-wrapper video,
.player-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

audio {
  width: 100%;
}

.player-logo-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, .6);
  cursor: pointer;
  transition: opacity .3s;
}

.player-logo-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.player-logo-play {
  width: 72px;
  height: 72px;
  background: var(--red);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s, background .15s;
  animation: pulse-play 1.5s infinite;
}

.player-logo-play:hover {
  background: var(--red-hover);
  transform: scale(1.1);
  animation: none;
}

@keyframes pulse-play {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(231, 76, 60, .5);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 12px rgba(231, 76, 60, 0);
  }
}

/* Listing filters */
.lbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.lbar select {
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .82rem;
  outline: none;
  font-family: var(--font);
}

.lbar select:focus {
  border-color: var(--red);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 16px;
  font-weight: 600;
  font-size: .82rem;
  border: none;
  cursor: pointer;
  transition: .15s;
  font-family: var(--font);
}

.btn-primary {
  background: var(--red);
  color: #fff;
}

.btn-primary:hover {
  background: var(--red-hover);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text2);
}

.btn-outline:hover {
  border-color: var(--red);
  color: var(--red);
}

.btn-sm {
  padding: 4px 10px;
  font-size: .75rem;
}

/* Alerts */
.alert {
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: .85rem;
}

.alert-ok {
  background: rgba(63, 185, 80, .15);
  color: var(--live);
  border: 1px solid rgba(63, 185, 80, .3);
}

.alert-err {
  background: rgba(231, 76, 60, .15);
  color: var(--red);
  border: 1px solid rgba(231, 76, 60, .3);
}

/* Pagination */
.pag {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 4px;
}

.pag a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  font-size: .82rem;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text2);
}

.pag a:hover {
  border-color: var(--red);
  color: var(--red);
}

.pag .on a {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* Contact Page */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  max-width: 900px;
  margin: 0 auto;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.contact-details {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--bg2);
}
.contact-item strong {
  font-size: .85rem;
  color: var(--text);
}
.contact-item a {
  color: var(--text2);
  font-size: .9rem;
}
.contact-item a:hover {
  color: var(--red);
}
.contact-form-wrapper {
  padding: 24px 0;
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.form-group label {
  font-size: .85rem;
  color: var(--text2);
  margin-bottom: 6px;
  display: block;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .9rem;
  font-family: var(--font);
  outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--red);
}
.btn-block {
  width: 100%;
  padding: 12px;
  font-size: .95rem;
}
.alert-success {
  background: rgba(63,185,80,.15);
  color: var(--live);
  padding: 16px;
  border: 1px solid rgba(63,185,80,.3);
}
.alert-success h3 {
  margin-bottom: 6px;
  font-size: 1rem;
}
.alert-error {
  background: rgba(231,76,60,.15);
  color: var(--red);
  padding: 12px;
  border: 1px solid rgba(231,76,60,.3);
  font-size: .9rem;
}

/* About Page */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.7;
  color: var(--text2);
}
.page-content p {
  margin-bottom: 14px;
}
.page-content h2,
.page-content h3 {
  color: var(--text);
  margin-bottom: 10px;
  margin-top: 20px;
}
.page-content a {
  color: var(--red);
}
.page-content a:hover {
  text-decoration: underline;
}
.page-content ul,
.page-content ol {
  padding-left: 20px;
  margin-bottom: 14px;
}
.page-content li {
  margin-bottom: 6px;
}
.page-content img {
  max-width: 100%;
  margin: 14px 0;
}

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

/* Forms */
form label {
  display: block;
  font-weight: 600;
  margin-bottom: 4px;
  font-size: .85rem;
  color: var(--text2);
}

form input,
form select,
form textarea {
  width: 100%;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  outline: none;
  font-size: .88rem;
}

form input:focus,
form select:focus,
form textarea:focus {
  border-color: var(--red);
}

form .fg {
  margin-bottom: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -380px;
    width: 360px;
    z-index: 1000;
    transition: left .25s;
  }

  .sidebar.open {
    left: 0;
  }

  .menu-btn {
    display: block;
  }

  .wrap {
    display: block;
  }

  .content {
    padding: 1px;
  }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .play-grid {
    grid-template-columns: 1fr;
  }

  .play-aside {
    position: static;
  }

  .chips {
    padding: 6px 14px;
  }

  .footer-inner {
    text-align: center;
  }

  .play-card {
    padding: 0px;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .shead h2 {
    font-size: 1rem;
  }
}

/* Custom Radio Player */
.custom-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.custom-player-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(30px);
  transform: scale(1.2);
}
.custom-player-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 400px;
  padding: 20px;
}
.custom-player-logo {
  width: 250px;
  height: 250px;
  object-fit: contain;
  box-shadow: 0 4px 20px rgba(0,0,0,.5);
}
.custom-player-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.custom-vol-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  color: #fff;
}
.custom-vol {
  flex: 1;
  width: 100%;
  accent-color: var(--red);
  cursor: pointer;
}
.custom-play-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.custom-play-btn:hover {
  background: var(--red-hover);
}

/* Share FAB */
.share-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9998;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: 8px;
}
.share-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s;
}
.share-btn:hover {
  background: var(--red-hover);
}
.share-menu {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.share-menu.open {
  display: flex;
}
.share-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform .15s;
}
.share-item:hover {
  transform: scale(1.1);
  color: #fff;
}
.share-item.whatsapp { background: #25D366; }
.share-item.facebook { background: #1877F2; }
.share-item.x { background: #000; }
.share-item.telegram { background: #0088cc; }

/* Tablet/Desktop small - player full screen */
@media (max-width: 1513px) {
  .play-grid {
    grid-template-columns: 1fr;
  }

  .play-aside {
    position: static;
  }

  .custom-player {
    aspect-ratio: auto;
    width: 100%;
    height: 70vh;
  }
}