:root{
  --bg:#0b0b0f;
  --panel:#12121a;
  --panel2:#171723;
  --text:#e9e9ef;
  --muted:#a6a6b3;
  --accent:#ff8a00;
  --border:#232334;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:var(--bg);
  color:var(--text);
}

/* =========================
   LAYOUT: sidebar RIGHT (desktop), bottom (mobile)
   ========================= */
.layout{
  display:grid;
  grid-template-columns: 1fr 280px;
  grid-template-areas: "main sidebar";
  min-height:100vh;
}

.main{
  grid-area: main;
  padding:18px 22px;
}

.sidebar{
  grid-area: sidebar;

  background:linear-gradient(180deg, var(--panel), #0d0d14);
  border-left:1px solid var(--border);
  border-right:none;

  padding:18px 14px;
  position:sticky;
  top:0;
  height:100vh;
  overflow:auto;
}

/* MOBILE: sidebar becomes bottom section */
@media (max-width: 1100px){
  .layout{
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "sidebar";
  }

  .sidebar{
    position:relative;
    height:auto;
    top:auto;
    border-left:none;
    border-top:1px solid var(--border);
  }
}

/* =========================
   SIDEBAR
   ========================= */
.brand{
  font-weight:800;
  letter-spacing:.3px;
  font-size:22px;
  margin-bottom:14px;
}
.brandA{ color:var(--text); }
.brandB{
  color:#111;
  background:var(--accent);
  padding:2px 8px;
  border-radius:6px;
  margin-left:6px;
}
.brandLink{ text-decoration:none; color:inherit; }

.sidebarSection{ margin-top:18px; }
.sidebarTitle{
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.14em;
  margin:10px 8px;
}
.sidebarList{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:0 6px;
}

.sideItem{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 10px;
  border:1px solid var(--border);
  border-radius:10px;
  background:rgba(255,255,255,0.03);
  text-decoration:none;
  color:var(--text);
}
.sideItem:hover{ border-color: rgba(255,138,0,.5); }

.sideLeft{ display:flex; flex-direction:column; gap:2px; }
.sideName{ font-weight:700; font-size:14px; }
.sideMeta{ color:var(--muted); font-size:12px; }

.sideRank{
  font-weight:800;
  color:#111;
  background:var(--accent);
  border-radius:999px;
  padding:4px 10px;
  font-size:12px;
}

.sideAllBtn{
  display:block;
  margin:10px 6px 0;
  padding:10px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.03);
  color:var(--text);
  text-decoration:none;
  font-weight:800;
  text-align:center;
}
.sideAllBtn:hover{ border-color: rgba(255,138,0,.6); }

/* =========================
   TOP BAR / CONTROLS
   ========================= */
.topbar{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:flex-end;
  margin-bottom:14px;
  flex-wrap:wrap;
}

.titleBlock{ display:flex; flex-direction:column; gap:4px; }
.pageTitle{ font-size:20px; font-weight:800; }
.pageMeta{ color:var(--muted); font-size:13px; }

.controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:flex-end;
  justify-content:flex-end;
}

.control{ display:flex; flex-direction:column; gap:6px; }
.control label{ font-size:12px; color:var(--muted); }
.control select, .control input{
  background:var(--panel2);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  outline:none;
  min-width: 180px;
}
.control.search input{ min-width: 260px; }

.navLeft{
  display:flex;
  gap:10px;
  align-items:center;
}
.navBtn{
  text-decoration:none;
  color:var(--text);
  background:var(--panel2);
  border:1px solid var(--border);
  padding:10px 12px;
  border-radius:10px;
  font-weight:800;
}
.navBtn:hover{ border-color: rgba(255,138,0,.6); }

/* =========================
   GRID + CARDS
   ========================= */
.grid{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap:12px;
}

@media (max-width: 1400px){ .grid{ grid-template-columns: repeat(4, 1fr);} }
@media (max-width: 1100px){ .grid{ grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px){ .grid{ grid-template-columns: repeat(2, 1fr);} }

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  overflow:hidden;
  box-shadow:var(--shadow);
  display:flex;
  flex-direction:column;
}

.thumb{
  background:linear-gradient(135deg, #1f1f2b, #10101a);
  aspect-ratio: 16 / 9;
  position:relative;
}

.duration{
  position:absolute;
  right:10px; bottom:10px;
  background:rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.08);
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
}

.playBtn{
  position:absolute;
  left:12px;
  bottom:12px;
  width:52px;
  height:52px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size:20px;
  cursor:pointer;
  display:grid;
  place-items:center;
  backdrop-filter: blur(6px);
}
.playBtn:hover{ border-color: rgba(255,138,0,.7); }

.ytFrame{
  width:100%;
  height:100%;
  border:0;
}

.cardBody{
  padding:10px 12px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.cardTitle{
  font-weight:800;
  font-size:14px;
  line-height:1.2;
  max-height: 2.4em;
  overflow:hidden;
}

.cardMeta{
  color:var(--muted);
  font-size:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.badge{
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  padding:4px 8px;
  border-radius:999px;
}

.linkBadge{
  text-decoration:none;
  color:var(--text);
}
.linkBadge:hover{ border-color: rgba(255,138,0,.5); }

/* =========================
   PAGINATION
   ========================= */
.pagination{
  margin-top:16px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
}

.pageBtn{
  background:var(--panel2);
  border:1px solid var(--border);
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
  min-width:44px;
}
.pageBtn:hover{ border-color: rgba(255,138,0,.5); }
.pageBtn.active{
  background:var(--accent);
  color:#111;
  border-color: rgba(255,138,0,.9);
  font-weight:900;
}

/* =========================
   RATING TABLE
   ========================= */
.tableWrap{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.ratingTable{
  width:100%;
  border-collapse: collapse;
}

.ratingTable th, .ratingTable td{
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.ratingTable th{
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  user-select:none;
}

.ratingTable tr:hover td{
  background: rgba(255,255,255,0.03);
}

.sortHint{
  opacity:.7;
  margin-left:6px;
  font-size:11px;
}

.performerLink{
  color: var(--text);
  text-decoration:none;
  font-weight:900;
}
.performerLink:hover{ color: var(--accent); }

/* =========================
   COMEDIANS LIST PAGE
   ========================= */
.comediansGrid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
}
@media (max-width: 1100px){ .comediansGrid{ grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 720px){ .comediansGrid{ grid-template-columns: 1fr; } }

.comedianCard{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:14px;
  padding:14px;
  box-shadow:var(--shadow);
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  text-decoration:none;
  color:var(--text);
}
.comedianCard:hover{ border-color: rgba(255,138,0,.55); }

.comedianName{ font-weight:900; font-size:16px; }
.comedianMeta{
  color:var(--muted);
  font-size:12px;
  margin-top:6px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.comedianPill{
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  padding:4px 8px;
  border-radius:999px;
}

/* =========================
   ABOUT PAGE
   ========================= */
.aboutWrap{
  max-width: 980px;
}

.aboutTitle{
  font-size: 28px;
  font-weight: 950;
  margin: 6px 0 14px;
}

.aboutCard{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 14px 14px;
  margin: 12px 0;
}

.aboutCard h2{
  margin: 0 0 10px;
  font-size: 18px;
}

.aboutCard p{
  margin: 10px 0;
  color: var(--text);
  line-height: 1.45;
}

.aboutCard ul{
  margin: 10px 0 0 18px;
  color: var(--text);
  line-height: 1.45;
}

.formula{
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px;
  overflow:auto;
  color: #eaeaf2;
}

/* =========================
   THEATER PLAYER (LIGHTBOX)
   ========================= */
.ytModal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.78);
  backdrop-filter: blur(6px);
  display:none;
  align-items:center;
  justify-content:center;
  z-index: 9999;
  padding: 16px;
}
.ytModal.open{ display:flex; }

.ytModalPanel{
  width: min(1100px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 20px 70px rgba(0,0,0,.6);
  background: rgba(10,10,14,.6);
  overflow: hidden;
  position:relative;
}

.ytModalTop{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.ytModalTitle{
  font-weight: 900;
  font-size: 14px;
  color: var(--text);
  opacity: .95;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
  max-width: 85%;
}
.ytModalClose{
  cursor:pointer;
  width:36px;
  height:36px;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 18px;
}
.ytModalClose:hover{ border-color: rgba(255,138,0,.65); }

.ytModalVideo{
  aspect-ratio: 16 / 9;
  background:#000;
}

.ytModalFrame{
  width:100%;
  height:100%;
  border:0;
}

@media (max-width: 720px){
  .ytModal{ padding: 10px; }
  .ytModalPanel{
    width: 98vw;
    border-radius: 14px;
  }
  .ytModalTitle{ max-width: 78%; }
}

/* =========================
   Home slogan animation
   ========================= */
.slogan{
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;

  opacity: 0;
  transform: translateY(6px);
  animation: sloganIn 520ms ease-out 120ms forwards;
}

@keyframes sloganIn{
  to{
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced-motion */
@media (prefers-reduced-motion: reduce){
  .slogan{
    animation: none;
    opacity: 1;
    transform: none;
  }
}

.comediansGrid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px){
  .comediansGrid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .comediansGrid{ grid-template-columns: 1fr; }
}

.comedianCard{
  display:block;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  text-decoration: none;
  color: inherit;
}
.comedianCard:hover{
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}

.comedianTop{
  display:flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}
.comedianName{ font-weight: 800; font-size: 16px; }
.comedianRank{ color: var(--muted); font-weight: 700; }

.comedianMeta{
  display:flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sortHint{ margin-left: 8px; opacity: .65; font-size: 12px; }
.performerLink{ color: inherit; text-decoration: underline; text-underline-offset: 3px; }
