/* home.css - load AFTER style.css. Keeps the original orange theme. */

:root {
  --sv-panel: #f5700f;
  --sv-white: #ffffff;
  --sv-soft: #ffe6cc;
  --sv-hover: #ffe14d;
  --sv-red: #d62a1b;
  --sv-card: rgba(0, 0, 0, .26);
  /* header.php is position:fixed (~90px tall). Raise/lower if the top is cut off. */
  --sv-header-offset: 92px;
}

.sv-main {
  background: transparent;
  padding: calc(22px + var(--sv-header-offset)) 0 48px;
  font-family: "Noto Sans Telugu", "Nirmala UI", "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.4;
  color: var(--sv-white);
  text-align: left;
}
.sv-main a { text-decoration: none; color: inherit; }
.sv-main img { display: block; max-width: 100%; }
.sv-wrap { max-width: 1320px; margin: 0 auto; padding: 0 20px; }

/* ---------- HERO ---------- */
.sv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.sv-hero-player {
  background: var(--sv-card);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
}
.sv-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  cursor: pointer;
}
.sv-player img,
.sv-player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0; object-fit: cover;
}
.sv-play {
  position: absolute; top: 50%; left: 50%;
  width: 78px; height: 54px;
  transform: translate(-50%, -50%);
  border: 0; border-radius: 14px;
  background: var(--sv-red);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  cursor: pointer; transition: background .15s, transform .15s;
}
.sv-play::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  transform: translate(-35%, -50%);
  border-style: solid; border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.sv-player:hover .sv-play { background: #f03a28; transform: translate(-50%, -50%) scale(1.08); }
.sv-player[data-ready] .sv-play,
.sv-player[data-ready] img { display: none; }

.sv-hero-meta { padding: 14px 18px 16px; display: grid; gap: 6px; justify-items: start; }
.sv-hero-title {
  font-size: 20px; font-weight: 700; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sv-hero-title:hover { color: var(--sv-hover); }
.sv-hero-channel {
  padding: 2px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  font-size: 13px; font-weight: 600;
}
.sv-hero-channel:hover { background: rgba(255, 255, 255, .3); }

/* rail: 2 x 4 thumbnails (true 16:9, nothing cropped) with channel name */
.sv-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: space-between;
}
.sv-rail a:nth-child(n+9) { display: none; }
.sv-rail a {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .4);
}
.sv-rail img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s, filter .25s;
}
.sv-rail a:hover img { transform: scale(1.06); filter: brightness(1.12); }
.sv-rail-label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 8px 6px;
  font-size: 12px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  background: linear-gradient(transparent, rgba(0, 0, 0, .82));
}

/* ---------- CHANNEL PANELS ---------- */
.sv-channel {
  margin-top: 30px;
  padding: 18px 20px 22px;
  background: var(--sv-panel);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.sv-channel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
}
.sv-channel-head h2 {
  margin: 0; font-size: 19px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .2px; color: var(--sv-white);
}
.sv-channel-head h2 a:hover { color: var(--sv-hover); }
.sv-viewall {
  flex: none; padding: 5px 16px;
  border: 1px solid var(--sv-white); border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .15s, color .15s;
}
.sv-viewall:hover { background: var(--sv-white); color: var(--sv-panel); }

/* uniform grid: 4 x 2 cards */
.sv-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px 16px;
}
.sv-video {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--sv-card);
  border-radius: 8px;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.sv-video:hover {
  transform: translateY(-3px);
  background: rgba(0, 0, 0, .38);
  box-shadow: 0 10px 20px rgba(0, 0, 0, .4);
}
.sv-thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden; background: #000;
}
.sv-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .25s, filter .25s;
}
.sv-video:hover .sv-thumb img { transform: scale(1.05); filter: brightness(1.1); }

/* play badge on hover */
.sv-thumb::after {
  content: ""; position: absolute; right: 10px; bottom: 10px;
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(0, 0, 0, .65);
  opacity: 0; transition: opacity .2s;
}
.sv-thumb::before {
  content: ""; position: absolute; right: 18px; bottom: 17px; z-index: 1;
  border-style: solid; border-width: 8px 0 8px 12px;
  border-color: transparent transparent transparent #fff;
  opacity: 0; transition: opacity .2s;
}
.sv-video:hover .sv-thumb::after,
.sv-video:hover .sv-thumb::before { opacity: 1; }

.sv-title {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.8em;                 /* keeps all cards the same height */
  padding: 0 12px; margin-top: 10px;
  font-size: 14px; font-weight: 600; line-height: 1.4;
  color: var(--sv-white);
}
.sv-video:hover .sv-title { color: var(--sv-hover); }
.sv-date {
  display: block;
  padding: 4px 12px 12px;
  font-size: 12px; color: var(--sv-soft);
}

.sv-main a:focus-visible, .sv-play:focus-visible {
  outline: 3px solid var(--sv-hover); outline-offset: 3px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 960px) {
  .sv-hero { grid-template-columns: 1fr; }
  .sv-rail { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .sv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sv-wrap { padding: 0 10px; }
  .sv-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-channel { padding: 12px 12px 16px; }
  .sv-channel-head h2 { font-size: 15px; }
  .sv-hero-title { font-size: 17px; }
  .sv-grid { gap: 12px 10px; }
  .sv-title { font-size: 13px; padding: 0 9px; }
  .sv-date { padding: 4px 9px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .sv-main * { transition: none !important; }
  .sv-video:hover { transform: none; }
}

/* =====================================================
   CHANNEL PAGE (page.php)
   ===================================================== */
.sv-ad {
  display: flex; justify-content: center;
  margin: 0 0 20px; overflow: hidden; max-width: 100%;
}
.sv-ad:empty { display: none; }
.sv-ad--side { margin-bottom: 18px; }

.sv-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: start;
}
.sv-channel--page { margin-top: 0; }

.sv-channel-head h1 {
  margin: 0; font-size: 22px; font-weight: 700; color: var(--sv-white);
}
.sv-crumb { margin-bottom: 4px; font-size: 13px; color: var(--sv-soft); }
.sv-crumb a:hover { color: var(--sv-hover); }

.sv-share { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-share a {
  padding: 5px 14px;
  border: 1px solid var(--sv-white); border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .15s, color .15s;
}
.sv-share a:hover { background: var(--sv-white); color: var(--sv-panel); }

.sv-grid--auto { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.sv-empty { margin: 0; padding: 24px 0; font-weight: 600; }

/* sidebar */
.sv-side-box {
  padding: 16px;
  background: var(--sv-panel);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.sv-side-box h2 {
  margin: 0 0 14px; padding-bottom: 10px;
  font-size: 16px; font-weight: 700; text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, .5);
  color: var(--sv-white);
}
.sv-rel-list { display: grid; gap: 10px; }
.sv-rel {
  display: grid; grid-template-columns: 128px minmax(0, 1fr); gap: 10px;
  padding: 8px;
  background: var(--sv-card);
  border-radius: 8px;
  transition: background .2s, transform .2s;
}
.sv-rel:hover { background: rgba(0, 0, 0, .38); transform: translateY(-2px); }
.sv-rel-thumb {
  position: relative; display: block;
  aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 4px; background: #000;
}
.sv-rel-thumb img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.sv-rel-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sv-rel-title {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px; font-weight: 600; line-height: 1.35;
}
.sv-rel:hover .sv-rel-title { color: var(--sv-hover); }
.sv-rel-ch { font-size: 12px; color: var(--sv-soft); }

@media (max-width: 960px) {
  .sv-layout { grid-template-columns: 1fr; }
  .sv-rel-list { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}
@media (max-width: 560px) {
  .sv-channel-head { flex-direction: column; align-items: flex-start; }
  .sv-channel-head h1 { font-size: 18px; }
  .sv-grid--auto { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-rel { grid-template-columns: 110px minmax(0, 1fr); }
}

/* =====================================================
   SINGLE VIDEO PAGE (single.php)
   ===================================================== */
.sv-col { min-width: 0; }

.sv-watch {
  padding: 16px 18px 18px;
  background: var(--sv-panel);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
.sv-watch .sv-crumb { margin-bottom: 12px; }
.sv-watch .sv-crumb a { font-weight: 600; }

.sv-watch-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.sv-watch-player iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: 0;
}

.sv-watch h1 {
  margin: 16px 0 10px;
  font-size: 22px; font-weight: 700; line-height: 1.4;
  color: var(--sv-white);
  word-break: break-word;
}
.sv-watch-meta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 8px 16px;
  font-size: 13px; color: var(--sv-soft);
}
.sv-chip {
  padding: 3px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
  color: var(--sv-white);
  font-weight: 700;
  transition: background .15s;
}
.sv-chip:hover { background: rgba(255, 255, 255, .36); }

.sv-watch-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .5);
}
.sv-watch-share-label { font-size: 13px; font-weight: 700; text-transform: uppercase; }

.sv-desc {
  margin-top: 14px;
  padding: 10px 14px;
  background: var(--sv-card);
  border-radius: 8px;
}
.sv-desc summary { cursor: pointer; font-weight: 700; }
.sv-desc-body {
  margin-top: 10px; max-height: 320px; overflow: auto;
  font-size: 14px; line-height: 1.65; word-break: break-word;
}

.sv-col .sv-channel { margin-top: 24px; }

@media (max-width: 560px) {
  .sv-watch { padding: 12px; }
  .sv-watch h1 { font-size: 18px; }
}