@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap");

:root {
  --purple-dark: #6a0dad;
  --purple-mid: #8a2be2;
  --purple-light: #a45ee5;
  --pink-accent: #ff6b9e;
  --neon-blue: #00f5ff;
  --dark: #0f0f1a;
  --light: #f8f8ff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--dark);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.welcome {
  text-align: center;
  background: linear-gradient(to right, var(--purple-light), var(--pink-accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 13px;
}

::selection {
  background: var(--pink-accent);
  color: white;
}

header {
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(10px);
  padding: 1.2rem 0;
  position: fixed;
  width: 100%;
  z-index: 100;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(106,13,173,0.1) 0%, rgba(15,15,26,0) 50%);
    z-index: -1;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 40px;   /* Adjust based on your navbar height */
  width: auto;    /* Keeps aspect ratio */
  display: block;
}

.nav-links {
  display: flex;
  list-style: none;
  margin-left: auto;
}

.nav-links li {
  margin-left: 1.8rem;
}

.nav-links a {
  color: var(--light);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    var(--purple-light),
    var(--pink-accent)
  );
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  color: var(--purple-light);
}

.btn {
  display: inline-block;
  background: linear-gradient(45deg, var(--purple-mid), var(--pink-accent));
  color: white;
  padding: 0.7rem 1.8rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 0.95rem;
  box-shadow: 0 4px 15px rgba(106, 13, 173, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(106, 13, 173, 0.6);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--purple-light);
  color: var(--purple-light);
  box-shadow: none;
}

.btn-outline:hover {
  background: linear-gradient(45deg, var(--purple-mid), var(--pink-accent));
  color: white;
  border-color: transparent;
}

.browse-content {
  padding: 8rem 0 3rem;
}

.search-section {
  margin-bottom: 3rem;
  position: relative;
}

.search-bar {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 50px;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-top: 5px;
}

.search-bar input {
  flex: 1;
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  color: white;
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-bar input:focus {
  outline: none;
}

.search-bar button {
  padding: 0 1.8rem;
  background: linear-gradient(45deg, var(--purple-mid), var(--pink-accent));
  color: white;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-bar button:hover {
  transform: scale(1.05);
}

.trending-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tag1 {
  background: rgba(138, 43, 226, 0.2);
  color: var(--purple-light);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(138, 43, 226, 0.3);
}

.tag1:hover {
  background: var(--purple-mid);
  color: white;
  cursor: pointer;
}

.category-section {
  margin-bottom: 4rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--purple-light), white);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-all {
  color: var(--purple-light);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.view-all:hover {
  color: var(--pink-accent);
  transform: translateX(5px);
}

/* Default (Desktop) – Grid Layout */
.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 0 1rem 1rem;
}

.clip-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
  min-height: 259px;
  max-height: 259px;
}

/* Mobile (Keep sliding scroll) */
@media (max-width: 768px) {
  .clips-grid {
    display: flex;
    gap: 1.2rem;
    padding: 0 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;   /* enables smooth drag scroll */
    -webkit-overflow-scrolling: touch;
  }
  .clips-grid::-webkit-scrollbar {
    display: none;
  }
  .clip-card {
    scroll-snap-align: start;
  }
}

.clip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(106, 13, 173, 0.3);
  border-color: rgba(138, 43, 226, 0.3);
}

.clip-thumbnail {
  position: relative;
  height: 160px;
  overflow: hidden;
}

.clip-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.clip-card:hover .clip-thumbnail img {
  transform: scale(1.1);
}

.duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
}

.clip-info {
  padding: 1rem;
  flex-grow: 1;
}

.clip-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clip-meta {
  display: flex;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  align-items: baseline;
  gap: 5px;
  justify-content: space-between;
}

.clip-views {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.subcategories {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}

.subcategories::-webkit-scrollbar {
  display: none;
}

.subcategory {
  background: rgba(138, 43, 226, 0.1);
  color: var(--purple-light);
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid rgba(138, 43, 226, 0.3);
  white-space: nowrap;
}

.subcategory.active,
.subcategory:hover {
  background: linear-gradient(45deg, var(--purple-mid), var(--pink-accent));
  color: white;
  cursor: pointer;
}

footer {
  background: rgba(15, 15, 26, 0.8);
  backdrop-filter: blur(10px);
  padding: 3rem 0 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h3 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  background: linear-gradient(
    to right,
    var(--purple-light),
    var(--pink-accent)
  );
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.8rem;
}

.footer-links a {
  color: #ddd;
  text-decoration: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a:hover {
  color: var(--purple-light);
  transform: translateX(5px);
}

.footer-links a i {
  font-size: 0.8rem;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-links a:hover {
  background: linear-gradient(45deg, var(--purple-mid), var(--pink-accent));
  transform: translateY(-5px);
}

.copyright {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
}

.desktop-only {
  display: flex;
  margin-left: 25px;
}

.mobile-menu {
  display: none;
}

.hamburger {
  display: none;
}

@media (max-width: 768px) {
  .browse-content {
    padding: 6rem 0 2rem;
  }

  .nav-links {
    display: none;
  }

  .search-bar input {
    font-size: 0.9rem;
    padding: 0.8rem 1.2rem;
    min-width: 0; /* 🔐 Important fix for small screens */
  }

  .search-bar button {
    padding: 0 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .section-title {
    font-size: 1.5rem;
  }

  .desktop-only {
    display: none;
  }

  .mobile-menu {
    position: absolute;
    top: -600px; /* hide it initially */
    left: 0;
    width: 100%;
    z-index: 99;
    transition: top 0.4s ease;
    padding: 1.5rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
  }

  .mobile-menu.active {
    top: 50%;
    width: 100%;
  }

  .mobile-links {
    list-style: none;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: black;
    padding: 20px;
    border-radius: 30px;
  }

  .mobile-links a {
    color: var(--light);
    font-size: 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
  }

  .mobile-links a:hover {
    color: var(--pink-accent);
  }

  .mobile-links .btn {
    width: 100%;
    text-align: center;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 22px;
    cursor: pointer;
    gap: 6px;
    z-index: 1001;
    transition: transform 0.3s ease-in-out;
    -webkit-tap-highlight-color: transparent;
  }

  /* Each bar */
  .hamburger span {
    display: block;
    width: 100%;
    height: 2.5px;
    background-color: var(--light); /* Replace with your color if needed */
    border-radius: 2px;
    transition: all 0.4s ease-in-out;
    transform-origin: center;
  }

  /* Transform to "X" */
  .hamburger.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .hamburger.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .container {
    padding: 0 1rem;
  }
}

/* Ads */
.ad-container {
  max-width: 100%;          /* don’t overflow */
  overflow: hidden;
  display: flex;
  justify-content: center;  /* center the ad */
}

.ad-container iframe {
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

/* Ratio Badge */
.ratio-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
}

/* Visual indicators */
.ratio-badge::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 6px;
  border-radius: 2px;
  background: currentColor;
}

.ratio-badge.vertical::before {
  width: 6px;
  height: 10px;
}

.ratio-badge.square::before {
  width: 10px;
  height: 10px;
}

.ratio-badge.horizontal {
  background: var(--pink-accent);
}

.ratio-badge.vertical {
  background: var(--purple-light);
}

.ratio-badge.square {
  background: var(--green-accent, #28a745); /* fallback green if no var */
}