/* ═══ Channel Page — Modern Design ═══ */

:root {
  --ch-bg: #030712;
  --ch-surface: #111827;
  --ch-surface-2: #1e293b;
  --ch-border: rgba(255,255,255,0.06);
  --ch-text: #f1f5f9;
  --ch-text-2: #94a3b8;
  --ch-text-3: #64748b;
  --ch-primary: #f59e0b;
  --ch-primary-glow: rgba(245,158,11,.25);
  --ch-accent: #fb923c;
  --ch-radius: 18px;
  --ch-radius-sm: 12px;
  --ch-ease: 0.3s cubic-bezier(0.4,0,0.2,1);
}

body.channel-page { background: var(--ch-bg); color: var(--ch-text); }

.channel-page .site-header {
  position: relative;
  z-index: 30;
  margin-bottom: 0;
}

/* ═══ Banner ═══ */
.ch-banner {
  height: 140px;
  margin-top: -48px;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.ch-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 80%, rgba(245,158,11,.15) 0%, transparent 60%);
  pointer-events: none;
}
.ch-banner__fade {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60px;
  background: linear-gradient(transparent, var(--ch-bg));
  pointer-events: none;
}

/* ═══ Channel Info ═══ */
.ch-info { position: relative; z-index: 4; margin-top: -82px; padding-bottom: 0; }
.ch-info__inner { display: flex; align-items: center; gap: 24px; }

.ch-info__avatar {
  width: 110px; height: 110px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ch-primary), var(--ch-accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 800; color: #000;
  flex-shrink: 0; border: 4px solid var(--ch-bg);
  box-shadow: 0 8px 32px rgba(245,158,11,.3);
  font-family: var(--font-d);
}

.ch-info__text { flex: 1; min-width: 0; }
.ch-info__name {
  font-family: var(--font-d); font-size: clamp(1.6rem,3vw,2.2rem);
  font-weight: 800; line-height: 1.15; margin-bottom: 8px;
}
.ch-info__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ch-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700;
}
.ch-badge--role { background: rgba(245,158,11,.12); color: var(--ch-primary); border: 1px solid rgba(245,158,11,.2); }
.ch-badge--verified { background: rgba(16,185,129,.12); color: #34d399; border: 1px solid rgba(16,185,129,.2); }

.ch-info__stats { display: flex; gap: 24px; flex-wrap: wrap; }
.ch-stat { text-align: center; }
.ch-stat strong { display: block; font-family: var(--font-d); font-size: 1.1rem; font-weight: 800; color: var(--ch-text); }
.ch-stat span { font-size: .75rem; color: var(--ch-text-3); font-weight: 600; }

.ch-info__actions { display: flex; gap: 10px; flex-shrink: 0; }
.ch-sub-btn {
  min-width: auto; height: 42px; padding: 0 24px;
  font-size: .88rem; font-weight: 700;
}
.ch-sub-btn--active {
  background: transparent; color: var(--ch-text-2);
  border: 1.5px solid var(--ch-border);
}
.ch-sub-btn--active:hover { border-color: var(--ch-primary); color: var(--ch-primary); }

/* ═══ Tabs ═══ */
.ch-tabs {
  position: sticky; top: 64px; z-index: 40;
  background: rgba(3,7,18,.92);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--ch-border);
}
.ch-tabs__inner { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.ch-tabs__inner::-webkit-scrollbar { display: none; }

.ch-tab {
  background: none; border: none;
  color: var(--ch-text-3); font-family: var(--font-b);
  font-size: .9rem; font-weight: 600;
  padding: 14px 20px; cursor: pointer;
  white-space: nowrap; position: relative;
  transition: color var(--ch-ease);
}
.ch-tab::after {
  content: ''; position: absolute; bottom: 0; left: 50%;
  transform: translateX(-50%); width: 0; height: 2px;
  background: var(--ch-primary); border-radius: 2px;
  transition: width var(--ch-ease);
}
.ch-tab:hover { color: var(--ch-text); }
.ch-tab:hover::after { width: 40%; }
.ch-tab.is-active { color: var(--ch-primary); font-weight: 700; }
.ch-tab.is-active::after { width: 60%; }

/* ═══ Main ═══ */
.ch-main { padding: 32px 0 64px; position: relative; z-index: 1; }

.ch-tab-content {
  display: none;
  animation: chFadeIn .25s ease;
}
.ch-tab-content.is-active { display: block; }

@keyframes chFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══ Featured ═══ */
.ch-featured {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 28px;
  padding: 24px;
  background: var(--ch-surface);
  border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius);
  margin-bottom: 32px;
  transition: transform var(--ch-ease), box-shadow var(--ch-ease);
}
.ch-featured:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
}
.ch-featured__cover { position: relative; flex-shrink: 0; }
.ch-featured__thumb {
  width: 320px; aspect-ratio: 16/9; border-radius: 16px;
  background: linear-gradient(135deg, #1a1040, #2d1b69);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.ch-featured__thumb img,
.ch-featured__thumb .ch-featured__thumb-img {
  width: 100%; height: 100%; object-fit: cover;
}
.ch-featured__thumb span {
  font-family: var(--font-d); font-size: 36px; font-weight: 800;
  color: rgba(255,255,255,.25);
}
.ch-featured__play {
  position: absolute; bottom: 10px; right: 10px;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--ch-primary); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer;
  box-shadow: 0 4px 16px var(--ch-primary-glow);
  transition: transform var(--ch-ease);
  z-index: 2;
}
.ch-featured__play:hover { transform: scale(1.1); }

.ch-featured__info {
  display: flex; flex-direction: column;
  justify-content: center; gap: 8px; min-width: 0;
}
.ch-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.2);
  color: var(--ch-primary); padding: 5px 14px; border-radius: 999px;
  font-weight: 700; font-size: .78rem; width: fit-content;
}
.ch-featured__title {
  font-family: var(--font-d); font-size: 1.75rem; font-weight: 800; line-height: 1.2;
}
.ch-featured__meta { color: var(--ch-primary); font-weight: 700; font-size: .88rem; }
.ch-featured__desc {
  color: var(--ch-text-2); font-size: .88rem; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ch-featured__actions { display: flex; gap: 10px; margin-top: 8px; }
.ch-featured__actions .btn { min-width: auto; height: 40px; padding: 0 20px; font-size: .85rem; }

/* ═══ Stats Row ═══ */
.ch-stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 36px;
}
.ch-stat-card {
  background: var(--ch-surface); border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-sm); padding: 18px 16px;
  display: flex; align-items: center; gap: 12px;
  transition: border-color var(--ch-ease);
}
.ch-stat-card:hover { border-color: rgba(245,158,158,.15); }
.ch-stat-card i {
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(245,158,11,.1); color: var(--ch-primary);
  display: flex; align-items: center; justify-content: center; font-size: .95rem;
}
.ch-stat-card strong {
  font-family: var(--font-d); font-size: 1.15rem; font-weight: 800; display: block;
}
.ch-stat-card span { font-size: .75rem; color: var(--ch-text-3); font-weight: 600; }

/* ═══ Section ═══ */
.ch-section { margin-bottom: 36px; }
.ch-section__head {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px;
}
.ch-section__head h2 {
  font-family: var(--font-d); font-size: 1.15rem; font-weight: 800;
}
.ch-more {
  color: var(--ch-text-3); font-size: .82rem; font-weight: 700;
  text-decoration: none; transition: color var(--ch-ease);
}
.ch-more:hover { color: var(--ch-primary); }

/* ═══ Playlist Card ═══ */
.ch-playlist-card {
  background: transparent;
  transition: all var(--ch-ease);
}
.ch-playlist-card:hover { transform: translateY(-3px); }
.ch-playlist-card__link {
  display: block; text-decoration: none; color: inherit;
}
.ch-playlist-card__thumb {
  position: relative;
  width: 100%; aspect-ratio: 16/9; border-radius: 12px;
  background: linear-gradient(135deg, #1a1040, #2d1b69);
  background-size: cover; background-position: center;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 10px;
  border: 1px solid var(--ch-border);
}
.ch-playlist-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: 12px;
}
.ch-playlist-card__thumb i {
  font-size: 28px; color: rgba(255,255,255,.3);
}
.ch-playlist-card__badge {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(0,0,0,.7); color: #fff;
  font-size: .72rem; font-weight: 700;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.ch-playlist-card__title {
  font-size: .92rem; font-weight: 700; color: var(--ch-text);
  margin-bottom: 2px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}
.ch-playlist-card__meta {
  font-size: .78rem; color: var(--ch-text-3); margin-bottom: 4px;
}
.ch-playlist-card__link-text {
  font-size: .78rem; color: var(--ch-text-2); font-weight: 600;
}

/* ═══ Sort ═══ */
.ch-sort-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.ch-sort-btn {
  background: var(--ch-surface); color: var(--ch-text-2);
  border: 1px solid var(--ch-border); padding: 8px 18px;
  border-radius: 999px; font-size: .82rem; font-weight: 600;
  cursor: pointer; transition: all var(--ch-ease);
}
.ch-sort-btn:hover { background: var(--ch-surface-2); color: var(--ch-text); }
.ch-sort-btn.is-active {
  background: var(--ch-primary); color: #000;
  border-color: var(--ch-primary); box-shadow: 0 4px 12px var(--ch-primary-glow);
}

/* ═══ Empty ═══ */
.ch-empty { text-align: center; padding: 80px 20px; color: var(--ch-text-3); }
.ch-empty i { font-size: 48px; margin-bottom: 16px; opacity: .4; }
.ch-empty p { font-size: .95rem; font-weight: 600; }

/* ═══ About ═══ */
.ch-about { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.ch-about__main {
  background: var(--ch-surface); border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius); padding: 24px;
}
.ch-about__main h3 {
  font-family: var(--font-d); font-size: 1rem; font-weight: 800;
  margin: 20px 0 10px; color: var(--ch-primary);
}
.ch-about__main h3:first-child { margin-top: 0; }
.ch-about__main p { color: var(--ch-text-2); font-size: .88rem; line-height: 1.7; }

.ch-about__side { display: flex; flex-direction: column; gap: 12px; }
.ch-about__stat {
  background: var(--ch-surface); border: 1px solid var(--ch-border);
  border-radius: var(--ch-radius-sm); padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
}
.ch-about__stat i {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(245,158,11,.1); color: var(--ch-primary);
  display: flex; align-items: center; justify-content: center; font-size: .85rem;
}
.ch-about__stat strong { font-size: .82rem; color: var(--ch-text-3); font-weight: 600; display: block; }
.ch-about__stat span { font-family: var(--font-d); font-size: 1rem; font-weight: 800; color: var(--ch-text); }

.ch-about__socials { display: flex; gap: 10px; }
.ch-social-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px; border-radius: var(--ch-radius-sm);
  background: rgba(255,255,255,.04); border: 1px solid var(--ch-border);
  color: var(--ch-text-2); font-weight: 600; font-size: .85rem;
  text-decoration: none; transition: all var(--ch-ease);
}
.ch-social-btn:hover { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.15); color: var(--ch-primary); }

/* ═══ Footer ═══ */
.channel-page .site-footer {
  border-top: 1px solid var(--ch-border); background: #030712;
}
.channel-page .site-footer .container p { text-align: center; color: var(--ch-text-3); font-size: .82rem; }

/* ═══ Playlist Grid ═══ */
.ch-playlists-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

/* ═══ Responsive ═══ */
@media (max-width: 1080px) {
  .ch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ch-playlists-grid { grid-template-columns: repeat(3, 1fr); }
  .ch-stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .ch-info__inner { flex-wrap: wrap; justify-content: center; text-align: center; gap: 16px; }
  .ch-info__text { width: 100%; order: 2; }
  .ch-info__badges { justify-content: center; }
  .ch-info__stats { justify-content: center; }
  .ch-info__actions { justify-content: center; width: 100%; order: 3; }
  .ch-about { grid-template-columns: 1fr; }
  .ch-featured { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .ch-featured__thumb { width: 260px; }
  .ch-featured__info { align-items: center; }
  .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-playlists-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .ch-banner { height: 140px; margin-top: -48px; }
  .ch-info__avatar { width: 80px; height: 80px; font-size: 30px; }
  .ch-info__name { font-size: 1.3rem; }
  .ch-info__stats { gap: 16px; }
  .ch-grid { grid-template-columns: 1fr; }
  .ch-playlists-grid { grid-template-columns: repeat(2, 1fr); }
  .ch-stats-row { grid-template-columns: 1fr 1fr; }
  .ch-featured { grid-template-columns: 1fr; }
  .ch-featured__thumb { width: 100%; }
}
