@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;600;700;800&display=swap');

/* --- The CSS Cage: No-Negotiation Grid Layout --- */
body { background-color: #000 !important; color: #fff; }

.video-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 15px; 
    padding: 20px;
}

/* Force the ad slots to stay 300x250 and never grow/shrink/bully */
.content-buffer-tile {
    width: 300px !important;
    height: 250px !important;
    min-width: 300px !important;
    min-height: 250px !important;
    max-width: 300px !important;
    max-height: 250px !important;
    overflow: hidden !important;
    display: block !important;
    margin: 10px auto !important;
    background: #000;
    position: relative;
    border: none !important;
    border-radius: var(--radius);
    flex-shrink: 0 !important; /* NO BULLYING */
}

.content-buffer-tile iframe {
    width: 300px !important;
    height: 250px !important;
    border: none !important;
    display: block;
    margin: 0 auto;
}

/* Ensure the sticky footer is ALWAYS on top and has height */
.sticky-premium-footer {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 270px !important; /* 250px ad + padding */
    z-index: 999999 !important; /* Maximum priority */
    background: rgba(0,0,0,0.95);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex !important;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
}

.sticky-premium-footer__content {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.sticky-premium-footer__close {
    position: absolute !important;
    right: 2rem !important;
    top: 1rem !important;
    background: #222 !important;
    color: #fff !important;
    border: 1px solid #444 !important;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000000 !important;
}

:root {
  --bg: #0a0a0a;
  --card: #121212;
  --border: rgba(255, 255, 255, 0.08);
  --accent: #f97316;
  --accent-hot: #ff4757;
  --text: #fafafa;
  --muted: #a1a1aa;
  --header-h: 4rem;
  --sidebar-w: 300px;
  --radius: 10px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.5rem 1.25rem;
  background: rgba(10, 10, 10, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}
.header-auth a {
  color: var(--muted);
  text-decoration: none;
}
.header-auth a:hover { color: var(--text); }
.header-auth__signup {
  color: var(--accent) !important;
  font-weight: 600;
}
.header-auth__user {
  color: var(--muted);
  max-width: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel {
  max-width: 400px;
  margin: 2rem auto;
  padding: 0 1rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.auth-form input {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
}
.auth-error {
  color: var(--accent-hot);
  font-size: 0.9rem;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text);
}
.logo span { color: var(--accent); font-family: "Bebas Neue", sans-serif; font-weight: 400; }

.header-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.header-filters input, .header-filters select {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font-size: 0.875rem;
  max-width: 12rem;
}

.btn-filter {
  background: linear-gradient(135deg, var(--accent), var(--accent-hot));
  border: none;
  color: #fff;
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.btn-filter:hover { filter: brightness(1.08); }

.shell {
  max-width: 1680px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr min(var(--sidebar-w), 100%);
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar-col { order: 3; }
  .main-col { order: 1; }
}

.shell.shell--with-skyscrapers {
  grid-template-columns: minmax(140px, var(--sidebar-w)) minmax(0, 1fr) minmax(140px, var(--sidebar-w));
}

@media (max-width: 1200px) {
  .shell.shell--with-skyscrapers {
    grid-template-columns: 1fr;
  }
  .shell.shell--with-skyscrapers .sidebar-col--left,
  .shell.shell--with-skyscrapers .sidebar-col--right {
    display: none;
  }
  .shell.shell--with-skyscrapers .main-col {
    order: 1;
  }
}

.skyscraper-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar-col--left,
.sidebar-col--right {
  min-width: 0;
}

.premium-box-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  max-width: 100%;
}

.premium-box-wrapper img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.main-col { min-width: 0; }

.sidebar-sticky, .grid-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 100;
  align-self: flex-start;
  transition: top 0.3s ease;
}

.sidebar-col {
  position: relative;
  height: 100%;
  min-height: 100vh;
}

.video-grid > .video-card-wrap {
  min-width: 0;
}

.grid-premium-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  aspect-ratio: 16/10;
  background: transparent !important;
}

.grid-premium-box .content-buffer-tile {
  flex-shrink: 0 !important;
}

@media (min-width: 640px) {
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.2s ease, border-color 0.2s;
}
.video-card:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.35);
}
.video-card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background: #1a1a1a;
  display: block;
}
.video-card h3 {
  margin: 0;
  padding: 0.65rem 0.75rem 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card .meta {
  padding: 0 0.75rem 0.65rem;
  font-size: 0.7rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.grid-engagement {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.grid-stat {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-weight: 500;
}
.grid-stat svg {
  opacity: 0.7;
}
.grid-source {
  opacity: 0.8;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.premium-content-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  background: transparent;
}

.btn-filter, .logout-btn, .watch-video-btn, .btn-sheen, .mobile-anchor-ad {
  position: relative;
  overflow: hidden;
}

.btn-filter::after, .logout-btn::after, .watch-video-btn::after, .btn-sheen::after, .mobile-anchor-ad::after {
  content: "";
  position: absolute;
  top: -50%;
  left: -100%;
  width: 50%;
  height: 200%;
  background: linear-gradient(135deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
  transform: rotate(30deg);
  pointer-events: none;
  z-index: 5;
}

.btn-filter:hover::after, .logout-btn:hover::after, .watch-video-btn:hover::after, .btn-sheen:hover::after,
.mobile-anchor-ad:hover::after,
.mobile-anchor-ad.sheen-trigger::after {
  animation: sheen 0.8s forwards;
}

@keyframes sheen {
  0% { left: -100%; }
  100% { left: 120%; }
}

.mobile-anchor-ad {
  display: none;
}

@media (max-width: 767px) {
  .mobile-anchor-ad {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: 120px;
    padding: 0.2rem 0.25rem;
    background: #09090b;
    border-top: 1px solid var(--border);
    z-index: 999;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.5);
  }
}

.btn-filter:hover, .logout-btn:hover, .btn-sheen:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  color: #fff;
}

.logout-btn {
  background-color: #27272a;
  border: 1px solid #444;
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  height: fit-content;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sheen {
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.back-link {
  margin-left: 2rem;
  font-weight: 600;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-navigation-group {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 40px;
}

.user-profile-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.watch-layout {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1024px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }
}

.sidebar-col-watch {
  width: 300px;
  position: sticky;
  top: 20px;
}

.player-wrap {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}

.player-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.related-section {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #27272a;
}

.watch-premium-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: sticky;
  top: calc(var(--header-h) + 0.5rem);
}

.banner-premium {
  margin: 0.75rem 0;
  min-height: 0;
  height: auto;
}

.login-frame {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  padding: 1rem 1rem 2rem;
  max-width: 100%;
  margin: 0 auto;
}

.side-buffer {
  width: auto;
  min-width: 160px;
  max-width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 1024px) {
  .side-buffer { display: none; }
}

.auth-panel {
  flex: 1;
  max-width: 500px;
  background: var(--card);
  padding: 1.5rem 2rem 2.5rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.auth-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: var(--muted); }
.auth-form input {
  background: #18181b;
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 8px;
  color: #fff;
}
