/* =====================================================================
   HStream Clone — Global Dark Theme
   ===================================================================== */
:root {
  --hs-bg:       #0b0d12;
  --hs-bg-2:     #11141b;
  --hs-card:     #171b24;
  --hs-card-2:   #1e2430;
  --hs-border:   #262c3a;
  --hs-text:     #e8ecf3;
  --hs-muted:    #8b93a5;
  --hs-accent:   #7c5cff;      /* purple */
  --hs-accent-2: #4f8bff;      /* blue */
  --hs-accent-grad: linear-gradient(135deg,#7c5cff 0%,#4f8bff 100%);
  --hs-danger:   #ef4444;
  --hs-radius:   14px;
  --hs-radius-sm:10px;
  --hs-transition: all .25s ease;
}

* { box-sizing: border-box; }

html, body {
  background: var(--hs-bg);
  color: var(--hs-text);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100%;
  scroll-behavior: smooth;
}

body { padding-top: 0; }

a { color: var(--hs-text); text-decoration: none; transition: var(--hs-transition); }
a:hover { color: var(--hs-accent); }

h1,h2,h3,h4,h5,h6 { color: var(--hs-text); font-weight: 700; letter-spacing: -0.01em; }

.text-muted, .small.text-muted { color: var(--hs-muted) !important; }

/* ---------- NAVBAR ---------- */
.hs-navbar {
  background: rgba(11,13,18,.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hs-border);
  padding: .75rem 0;
}
.hs-brand {
  color: var(--hs-text) !important;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}
.hs-brand i { color: var(--hs-accent); }
.hs-navbar .nav-link {
  color: var(--hs-muted) !important;
  font-weight: 500;
  padding: .5rem 1rem !important;
  border-radius: var(--hs-radius-sm);
}
.hs-navbar .nav-link:hover,
.hs-navbar .nav-link.active { color: var(--hs-text) !important; background: rgba(124,92,255,.08); }

.hs-search .form-control {
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  border-radius: var(--hs-radius-sm) 0 0 var(--hs-radius-sm);
}
.hs-search .form-control:focus {
  background: var(--hs-card);
  color: var(--hs-text);
  border-color: var(--hs-accent);
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
}
.hs-search .form-control::placeholder { color: var(--hs-muted); }

.btn-hs-accent {
  background: var(--hs-accent-grad);
  border: 0;
  color: #fff;
  font-weight: 600;
  border-radius: var(--hs-radius-sm);
  padding: .5rem 1.1rem;
  transition: var(--hs-transition);
}
.btn-hs-accent:hover { color: #fff; filter: brightness(1.1); transform: translateY(-1px); }

.btn-hs-ghost {
  background: rgba(255,255,255,.05);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  border-radius: var(--hs-radius-sm);
  font-weight: 600;
  padding: .5rem 1rem;
  transition: var(--hs-transition);
}
.btn-hs-ghost:hover { background: rgba(255,255,255,.09); color: #fff; border-color: var(--hs-accent); }

.hs-dropdown {
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius-sm);
  box-shadow: 0 12px 32px rgba(0,0,0,.5);
}
.hs-dropdown .dropdown-item { color: var(--hs-text); padding: .55rem 1rem; }
.hs-dropdown .dropdown-item:hover { background: rgba(124,92,255,.15); color: #fff; }

/* ---------- MAIN ---------- */
.hs-main { min-height: calc(100vh - 240px); }

/* ---------- HERO ---------- */
.hs-hero {
  position: relative;
  min-height: 520px;
  border-radius: var(--hs-radius);
  overflow: hidden;
  margin: 1.5rem 0 2.5rem;
  background: #000;
  display: flex;
  align-items: flex-end;
}
.hs-hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.55) blur(0.5px);
  transform: scale(1.03);
}
/* .hs-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11,13,18,.92) 100%),
              linear-gradient(90deg, rgba(11,13,18,.85) 0%, transparent 60%);
} */
.hs-hero-content {
  position: relative; z-index: 2;
  padding: 3rem 2.5rem;
  max-width: 720px;
}
.hs-hero h1 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: .75rem;
}
.hs-hero p { color: #c9cfe0; max-width: 560px; }
.hs-badge {
  display: inline-block;
  padding: .3rem .75rem;
  background: var(--hs-accent-grad);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-right: .4rem;
}
.hs-badge.ghost { background: rgba(255,255,255,.14); backdrop-filter: blur(6px); }

/* ---------- SECTIONS ---------- */
.hs-section { margin-bottom: 3rem; }
.hs-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.hs-section-head h2 {
  font-size: 1.35rem;
  margin: 0;
  display: flex;
  align-items: center;
  gap: .6rem;
}
.hs-section-head h2::before {
  content: '';
  width: 4px; height: 22px;
  background: var(--hs-accent-grad);
  border-radius: 4px;
}
.hs-view-all { font-size: .85rem; color: var(--hs-muted) !important; font-weight: 600; }
.hs-view-all:hover { color: var(--hs-accent) !important; }

/* ---------- VIDEO CARD ---------- */
.hs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.1rem;
}
@media (min-width:1400px) { .hs-grid { grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); } }

.hs-card {
  display: block;
  background: var(--hs-card);
  border-radius: var(--hs-radius);
  overflow: hidden;
  transition: var(--hs-transition);
  border: 1px solid transparent;
}
.hs-card:hover {
  transform: translateY(-6px);
  border-color: rgba(124,92,255,.4);
  box-shadow: 0 18px 40px rgba(0,0,0,.5);
}

/* 🔥 FIX: Extra space remove karne ke liye object-fit cover kiya aur aspect-ratio wapas add kiya */
.hs-card-thumb {
  position: relative;
  aspect-ratio: 9/16; /* Vertical shape lock kar diya */
  max-height: 350px;
  background: var(--hs-bg-2);
  overflow: hidden;
  width: 100%;
}
.hs-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover; /* Image side se crop hogi aur side ka khali space khatam ho jayega */
  transition: transform .4s ease;
}
.hs-card:hover .hs-card-thumb img { transform: scale(1.06); }
.hs-card-duration,
.hs-card-quality {
  position: absolute;
  bottom: .55rem;
  padding: .2rem .55rem;
  font-size: .72rem;
  font-weight: 700;
  border-radius: 6px;
  background: rgba(0,0,0,.78);
  color: #fff;
  backdrop-filter: blur(4px);
}
.hs-card-duration { right: .55rem; }
.hs-card-quality  { left: .55rem; background: var(--hs-accent-grad); }

.hs-card-body { padding: .85rem 1rem 1rem; }
.hs-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--hs-text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 .35rem;
}
.hs-card-meta {
  font-size: .78rem;
  color: var(--hs-muted);
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.hs-card-meta i { margin-right: .2rem; }

/* ---------- CATEGORY CHIP ---------- */
.hs-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.hs-chip {
  padding: .4rem .9rem;
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  color: var(--hs-muted);
  font-size: .85rem;
  font-weight: 500;
  transition: var(--hs-transition);
}
.hs-chip:hover, .hs-chip.active {
  background: var(--hs-accent-grad);
  color: #fff;
  border-color: transparent;
}

/* ---------- FORM / AUTH ---------- */
.hs-auth-wrap {
  max-width: 440px;
  margin: 3rem auto;
  padding: 2.25rem;
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
}
.hs-auth-wrap h1 { font-size: 1.6rem; margin-bottom: .35rem; }
.hs-auth-wrap .form-control,
.hs-form .form-control,
.hs-form .form-select {
  background: var(--hs-bg-2);
  border: 1px solid var(--hs-border);
  color: var(--hs-text);
  padding: .7rem .9rem;
  border-radius: var(--hs-radius-sm);
}
.hs-form .form-control:focus,
.hs-form .form-select:focus,
.hs-auth-wrap .form-control:focus {
  background: var(--hs-bg-2);
  border-color: var(--hs-accent);
  color: var(--hs-text);
  box-shadow: 0 0 0 3px rgba(124,92,255,.15);
}
.form-label { color: var(--hs-muted); font-weight: 500; font-size: .88rem; }

/* ---------- PAGINATION / LOAD MORE ---------- */
.hs-pagination { display: flex; gap: .35rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.hs-pagination a, .hs-pagination span {
  padding: .5rem .85rem;
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: 8px;
  color: var(--hs-text);
  font-size: .9rem;
  min-width: 40px;
  text-align: center;
}
.hs-pagination a:hover { border-color: var(--hs-accent); color: #fff; }
.hs-pagination .current { background: var(--hs-accent-grad); border-color: transparent; color: #fff; }
.hs-pagination .disabled { opacity: .4; pointer-events: none; }

/* ---------- EMPTY STATE ---------- */
.hs-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--hs-muted);
}
.hs-empty i { font-size: 3.5rem; opacity: .35; margin-bottom: 1rem; display: block; }

/* ---------- FOOTER ---------- */
.hs-footer {
  background: var(--hs-bg-2);
  border-top: 1px solid var(--hs-border);
  margin-top: 4rem;
}
.hs-footer-brand { color: var(--hs-text); font-weight: 800; }
.hs-footer-brand i { color: var(--hs-accent); }
.hs-footer-title {
  color: var(--hs-text);
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .9rem;
}
.hs-footer ul a { color: var(--hs-muted); }
.hs-footer ul a:hover { color: var(--hs-accent); }
.hs-social { display: flex; gap: .75rem; }
.hs-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--hs-muted);
  transition: var(--hs-transition);
}
.hs-social a:hover { background: var(--hs-accent-grad); color: #fff; border-color: transparent; transform: translateY(-2px); }

/* ---------- WATCH PAGE ---------- */
.hs-player-wrap {
  background: #000;
  border-radius: var(--hs-radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
}
.hs-player-wrap video { width: 100%; display: block; max-height: 78vh; background: #000; }
.hs-watch-title { font-size: clamp(1.3rem, 2.4vw, 1.9rem); margin: 1.25rem 0 .5rem; }
.hs-watch-meta { color: var(--hs-muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.hs-watch-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1rem 0; }
.hs-btn-pill {
  padding: .5rem 1rem;
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: 999px;
  color: var(--hs-text);
  font-weight: 600;
  font-size: .85rem;
  transition: var(--hs-transition);
}
.hs-btn-pill:hover { border-color: var(--hs-accent); color: #fff; }
.hs-btn-pill.active { background: var(--hs-accent-grad); border-color: transparent; color: #fff; }

.hs-panel {
  background: var(--hs-card);
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  padding: 1.25rem 1.35rem;
}

/* ---------- RELATED RAIL ---------- */
.hs-rail { display: flex; flex-direction: column; gap: .9rem; }
.hs-rail-item { display: flex; gap: .75rem; padding: .55rem; border-radius: var(--hs-radius-sm); transition: var(--hs-transition); }
.hs-rail-item:hover { background: rgba(255,255,255,.04); }
.hs-rail-thumb {
  flex: 0 0 140px; aspect-ratio: 16/9;
  border-radius: 8px; overflow: hidden; background: var(--hs-bg-2);
}
.hs-rail-thumb img { width: 100%; height: 100%; object-fit: cover; }
.hs-rail-info { font-size: .85rem; }
.hs-rail-title {
  color: var(--hs-text); font-weight: 600; margin-bottom: .2rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hs-rail-meta { color: var(--hs-muted); font-size: .75rem; }

/* ---------- PROFILE ---------- */
.hs-profile-head {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1.75rem;
  background: linear-gradient(135deg, rgba(124,92,255,.15), rgba(79,139,255,.08));
  border: 1px solid var(--hs-border);
  border-radius: var(--hs-radius);
  margin-bottom: 2rem;
}
.hs-avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--hs-accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: #fff;
}
.hs-tabs { border-bottom: 1px solid var(--hs-border); margin-bottom: 1.5rem; display: flex; gap: .25rem; }
.hs-tabs a {
  padding: .7rem 1.2rem;
  color: var(--hs-muted);
  font-weight: 600;
  border-bottom: 2px solid transparent;
  font-size: .92rem;
}
.hs-tabs a.active { color: var(--hs-text); border-bottom-color: var(--hs-accent); }

/* ---------- MISC ---------- */
.alert { border: 1px solid var(--hs-border); border-radius: var(--hs-radius-sm); }
.alert-danger  { background: rgba(239,68,68,.12);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.12);  color: #86efac; }
.alert-info    { background: rgba(79,139,255,.12); color: #93c5fd; }
.alert-warning { background: rgba(245,158,11,.12); color: #fcd34d; }
.alert .btn-close { filter: invert(1) brightness(.8); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--hs-bg); }
::-webkit-scrollbar-thumb { background: var(--hs-card-2); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--hs-accent); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 991px) {
  .hs-hero { min-height: 400px; }
  .hs-hero-content { padding: 2rem 1.5rem; }
  .hs-search { width: 100%; }
}
@media (max-width: 575px) {
  .hs-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .75rem; }
  .hs-card-body { padding: .6rem .75rem .8rem; }
  .hs-card-title { font-size: .85rem; }
  .hs-rail-thumb { flex-basis: 110px; }
}