/* ==============================
   ROOT
============================== */
:root {
  --red: #d63638;
  --dark: #1f2933;
  --soft: #f4f6f8;
  --border: #e5e7eb;
}

/* ==============================
   LAYOUT
============================== */
.tvr-wrapper {
  display: flex;
  gap: 16px;
  align-items: stretch;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont;
}

.tvr-video {
  width: 70%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.tvr-sidebar {
  width: 30%;
  display: flex;
  flex-direction: column;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

/* ==============================
   PLAYER
============================== */
.tvr-video iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  background: #000;
}

/* ==============================
   BADGE
============================== */
.tvr-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  color: #fff;
  backdrop-filter: blur(6px);
}

.tvr-badge.live {
  background: linear-gradient(45deg, #ff0000, #ff6b6b);
}

.tvr-badge.soon {
  background: linear-gradient(45deg, #f59e0b, #fbbf24);
}

/* ==============================
   TAB
============================== */
.tvr-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.tab-btn {
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  border-radius: 8px;
  transition: 0.25s;
  font-weight: 600;
}

.tab-btn:hover {
  background: var(--soft);
}

.tab-btn.active {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

/* ==============================
   CONTENT
============================== */
.tvr-tab-content {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.tvr-tab-content.active {
  display: block;
}

/* ==============================
   PLAYLIST ITEM
============================== */
.playlist-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: 0.25s;
}

.playlist-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.playlist-item.live {
  border-left: 4px solid red;
}

.playlist-item.soon {
  border-left: 4px solid orange;
}

.playlist-item.archive {
  opacity: 0.65;
}

.playlist-item.active {
  background: #fff1f1;
  border-color: var(--red);
}

/* title */
.playlist-item div {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  color: #111;
}

.playlist-item small {
  font-size: 11px;
  color: #6b7280;
  margin-top: 4px;
}

/* ==============================
   OFF AIR
============================== */
.tvr-offline {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
  border-radius: 12px;
}

/* ==============================
   SCROLLBAR
============================== */
.tvr-tab-content::-webkit-scrollbar {
  width: 6px;
}
.tvr-tab-content::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 10px;
}

/* ==============================
   RESPONSIVE
============================== */
@media (max-width: 768px) {
  .tvr-wrapper {
    flex-direction: column;
  }

  .tvr-video,
  .tvr-sidebar {
    width: 100%;
  }

  .tvr-tab-content {
    max-height: 320px;
  }
}
