/* =====================================
   ROOT & GLOBAL RESET
   ===================================== */

:root {
  --brand: #ff2f92;
  --bg: #000;
  --text: #fff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto;
  overflow-y: auto; 
  overflow-x: hidden; /* reels page needs this */
}

/* =====================================
   HEADER (SINGLE DEFINITION)
   ===================================== */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  z-index: 10000;
}

.header-left,
.header-right {
  font-size: 22px;
  color: #fff;
  cursor: pointer;
  user-select: none;
}

.header-logo {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.header-logo img {
  height: 55px;
  display: block;
}

/* =====================================
   SIDE NAV
   ===================================== */

.side-nav {
  position: fixed;
  top: 56px;
  left: -240px;
  width: 240px;
  height: calc(100vh - 56px);
  background: #111;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: left .3s ease;
  z-index: 9999;
}

.side-nav.open {
  left: 0;
}

.side-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 16px;
  padding: 10px 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* =====================================
   SEARCH OVERLAY
   ===================================== */

#searchOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(10px);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 80px;
  opacity: 0;
  pointer-events: none;
  transition: .25s;
  z-index: 20000;
}

#searchOverlay.open {
  opacity: 1;
  pointer-events: auto;
}

.search-box {
  width: 92%;
  max-width: 680px;
  position: relative;
}

#searchInput {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: none;
  padding: 0 50px 0 16px;
  font-size: 16px;
  background: #111;
  color: #fff;
}

.search-close {
  position: absolute;
  right: 14px;
  top: 11px;
  font-size: 22px;
  cursor: pointer;
  color: #aaa;
}

#searchResults {
  margin-top: 12px;
  background: #111;
  border-radius: 14px;
  max-height: 380px;
  overflow-y: auto;
}

/* =====================================
   REELS CONTAINER (ONLY SCROLLER)
   ===================================== */

.reels-container {
  margin-top: 0px;
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.reels-container::-webkit-scrollbar {
  display: none;
}

/* =====================================
   SINGLE REEL
   ===================================== */

.reel {
  position: relative;
  width: 100%;
  height: 100vh;
  scroll-snap-align: start;
  background: black;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* =====================================
   VIDEO
   ===================================== */

.reel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* =====================================
   PLAY INDICATOR
   ===================================== */

.play-indicator {
  position: absolute;
  font-size: 64px;
  color: white;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 6;
}

.reel.paused .play-indicator {
  opacity: .9;
  transform: scale(1);
}

/* =====================================
   REEL INFO
   ===================================== */

.reel-info {
  position: absolute;
  left: 14px;
  bottom: 18px;
  max-width: 70%;
  z-index: 5;
}

.reel-title {
  font-weight: 600;
  font-size: 15px;
}

.reel-desc {
  font-size: 13px;
  opacity: .9;
}

/* =====================================
   REEL ACTION BUTTONS
   ===================================== */

.reel-actions {
  position: absolute;
  right: 12px;
  bottom: 90px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 5;
}

.reel-actions button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
}

/* =====================================
   DESKTOP / TABLET FRAME
   ===================================== */

.reel-frame {
  position: relative;
  width: 100%;
  height: 100%;
}

@media (min-width: 768px) {
  .reel-frame {
    width: 520px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: black;
  }

  .reel video {
    max-width: 520px;
    margin: 0 auto;
    border-radius: 18px;
  }

  .reel::before {
    content: "";
    position: absolute;
    inset: 0;
    background: black;
    z-index: -1;
  }
}

/* =====================================
   HOME GALLERY GRID
   ===================================== */

#gallery {
  max-width: 1400px;
  margin: auto;
  padding: 16px;
  padding-top: 72px; /* header spacing */
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* =====================================
   VIDEO CARD
   ===================================== */

.card {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,.6);
  transition: transform .2s ease;
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: #000;
}

.card h3 {
  padding: 12px;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  min-height: 52px;
}

/* =====================================
   WATCH BUTTON
   ===================================== */

.watch-btn {
  display: block;
  margin: 12px;
  padding: 10px;
  background: #ff2f92;
  color: #fff;
  text-align: center;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
}

.watch-btn:hover {
  background: #ff5fa8;
}

/* =====================================
   MOBILE GALLERY
   ===================================== */

@media (max-width: 768px) {
  #gallery {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .card img {
    height: 150px;
  }

  .card h3 {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  #gallery {
    padding: 50px;
  }
}

/* =====================================
   SEARCH RESULTS PAGE
   ===================================== */

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  color: white;
}

#searchTitle {
  font-size: 24px;
  margin-bottom: 6px;
}

.page-subtitle {
  color: #aaa;
  margin-bottom: 16px;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.video-card {
  background: #111;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .2s ease;
}

.video-card:hover {
  transform: translateY(-4px);
}

.video-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  background: black;
}

.video-card-content {
  padding: 10px;
}

.video-card-content h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: white;
}

.video-card-content small {
  color: #ff5fa8;
}

/* =====================================
   PAGINATION
   ===================================== */

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin: 30px 0;
}

.pagination button {
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  background: #ff2f92;
  color: #fff;
  cursor: pointer;
}

.pagination button:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* =====================================
   FOOTER
   ===================================== */

.site-footer {
  background: linear-gradient(180deg, #6a1232, #3b061c);
  color: #fff;
  padding: 22px 16px 26px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-title {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .5px;
}

.footer-links {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  font-size: 14px;
}

.footer-links a:hover {
  text-decoration: underline;
}
header {
  transition: transform .3s ease;
}

header.hide {
  transform: translateY(-100%);
}

