:root {
  --dark-bg: #0f0f1a;
  --darker-bg: #0a0a12;
  --card-bg: rgba(255, 255, 255, 0.05);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --purple-dark: #6a0dad;
  --purple-mid: #8a2be2;
  --purple-light: #a45ee5;
  --pink-accent: #ff6b9e;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-radius: 12px;
  --light: #f8f8ff;
}

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

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

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

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.6rem 1.4rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: 0.3s;
}

.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;
}

main {
  padding-top: 90px;
  padding-bottom: 50px;
}

.clip-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.clip-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 1rem;
}

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

.clip-actions {
  display: flex;
  gap: 10px;
}

.action-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.3s;
}

.clip-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 992px) {
  .clip-content {
    grid-template-columns: 7fr 3fr;
  }
}

.clip-player {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--border-radius);
  background: var(--darker-bg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.clip-player img,
.clip-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-meta {
  background: var(--card-bg);
  border-radius: var(--border-radius);
  padding: 1rem;
  border: 1px solid var(--border-color);
}

.uploader-info {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.uploader-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  margin-right: 0.8rem;
  object-fit: cover;
  border: 2px solid var(--purple-light);
  cursor: pointer;
}

.uploader-details h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
  cursor: pointer;
}

.uploader-details h3:hover {
  color: var(--pink-accent);
}

.stats-section {
  margin: 1.5rem 0;
  overflow-x: auto;
}

.stats-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--dark, #1c1c1c);
  border: 1px solid #2a2a2a;
  border-radius: 20px;
  overflow: hidden;
}

.stats-table th,
.stats-table td {
  padding: 1rem 1.2rem;
  border-bottom: 1px solid #2f2f2f;
  font-size: 0.95rem;
}

.stats-table th {
  text-align: left;
  color: #e0e0e0; /* light gray for label */
  font-weight: 600;
  background: #222; /* slightly lighter than main bg */
  font-size: small;
}

.stats-table td {
  text-align: center;
  color: var(--purple-dark); /* Zenobo purple accent */
  font-weight: bold;
}

.aspect-icon {
  display: inline-block;
  background: var(--purple-light); /* ZenClips purple */
  border: 2px solid #fff;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
}

.stats-table tr:last-child th,
.stats-table tr:last-child td {
  border-bottom: none;
}

.stats-table i {
  margin-right: 6px;
  color: var(--purple-dark); /* purple accent */
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.tag {
  background: rgba(138, 43, 226, 0.2);
  color: var(--purple-light);
  padding: 0.4rem 0.8rem;
  border-radius: 50px;
  font-size: 0.8rem;
}

.clip-description {
  margin: 1rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.download-section {
  margin: 1.5rem 0;
  text-align: center;
}

.download-btn {
  display: inline-block;
  background: var(--pink-accent);
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
  margin-top: 10px;
}

.download-btn:hover {
  background: var(--pink-accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(233, 30, 99, 0.3);
}

.related-section {
  margin-top: 2rem;
}

.section-title {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

@media (max-width: 480px) {
  .clip-title {
    font-size: 1.4rem;
  }
  .related-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }
}

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;
}

#credits-note {
  color: #ffcc00;
}

.clip-description {
  margin: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

#desc-text {
  max-height: 4.5em; /* ~3 lines */
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.3s ease;
  opacity: 0.9;
}

#desc-text.expanded {
  max-height: 1000px; /* big enough so it expands fully */
  opacity: 1;
}

#toggle-desc {
  background: none;
  border: none;
  color: var(--purple-light);
  font-weight: 600;
  cursor: pointer;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: 0.3s ease;
}

#toggle-desc:hover {
  color: var(--pink-accent);
  transform: translateY(-2px);
}

#toggle-desc i {
  transition: transform 0.3s ease;
}

/* Mobile menu */
@media (max-width: 769px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .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);
  }
}

@media (min-width: 769px) {
  .nav-links {
    display: flex;
  }
  .hamburger,
  .mobile-menu {
    display: none;
  }
}

/* Report Modal */
.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 999;
}
.modal.hidden { display: none; }

.modal-content {
  background: #1a1a1a;
  padding: 20px;
  border-radius: 10px;
  width: 90%; max-width: 400px;
  color: #fff;
}
.modal-content h2 { margin-bottom: 10px; }
.modal-content select,
.modal-content textarea {
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border-radius: 6px;
  border: none;
  outline: none;
}
.modal-actions {
  display: flex; justify-content: space-between;
}

/* Comment Section */
.comments-section {
  margin-top: 30px;
  padding: 20px;
  background: #121212;
  border-radius: 12px;
}

.comments-section h2 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #fff;
  border-bottom: 1px solid #2a2a2a;
  padding-bottom: 8px;
}

.add-comment {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
}

.comment-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2px solid var(--purple-accent);
}

.add-comment textarea {
  flex: 1;
  background: #1e1e1e;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  resize: none;
  min-height: 50px;
  font-size: 0.9rem;
}

.add-comment button {
  padding: 8px 16px;
  border: none;
  border-radius: 10px;
  background: var(--pink-accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

.add-comment button:hover {
  background: #7c3aed;
}

.comment-item {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  animation: fadeIn 0.3s ease;
}

.comment-content {
  flex: 1;
  background: #1a1a1a;
  padding: 12px 14px;
  border-radius: 10px;
}

.comment-content h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--light);
}

.comment-content p {
  margin: 6px 0;
  color: #ddd;
  font-size: 0.9rem;
}

.comment-actions {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  margin-top: 6px;
  color: #aaa;
}

.comment-actions span {
  cursor: pointer;
  transition: color 0.2s;
}

.comment-actions span:hover {
  color: var(--purple-accent);
}

.replies {
  margin-left: 55px;
  margin-top: 10px;
  border-left: 2px solid #2a2a2a;
  padding-left: 15px;
}

.comment-actions {
  display: flex;
  gap: 15px;
  margin-top: 5px;
  font-size: 0.9rem;
  color: var(--light);
  cursor: pointer;
}

.comment-actions .like-btn i {
  transition: all 0.2s ease;
}

.comment-actions .like-btn.fas {
  color: var(--purple-dark);
}

.replies {
  margin-left: 40px;
  margin-top: 10px;
  border-left: 2px solid #333;
  padding-left: 10px;
}

.hidden {
  display: none;
}

/* Follow Button Styles */
.btn-follow {
  display: none;
  padding: 8px 16px;
  margin-bottom: 1rem;
  border-radius: 20px;
  background: var(--pink-accent);
  color: white;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-follow:hover {
  background: #ff4f81;
}

.btn-follow.following {
  background: #2d2d2d;
  color: #fff;
  border: 1px solid var(--pink-accent);
}

.uploaderMeta {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

/* Ad Overlay Styles */
.ad-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 10, 10, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.ad-content {
  background: #111;
  padding: 30px;
  border-radius: 16px;
  text-align: center;
  color: white;
  max-width: 400px;
  width: 90%;
  animation: fadeIn 0.5s ease-in-out;
}

.ad-box {
  margin: 15px 0;
}
.ad-box img {
  width: 100%;
  border-radius: 12px;
}

#adCountdown {
  font-size: 14px;
  margin: 10px 0;
  color: #bbb;
}

#continueBtn {
  background: #9333ea;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  color: white;
  font-size: 16px;
  cursor: not-allowed;
  opacity: 0.6;
  transition: 0.3s;
}
#continueBtn.active {
  cursor: pointer;
  opacity: 1;
}

.hidden { display: none; }

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.grecaptcha-badge {
  visibility: hidden !important;
}

#adBox {
  width: 300px;
  height: 250px;
  margin: 0 auto;
  background: #f4f4f4;
  border: 1px solid #ccc;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
#adBox iframe, 
#adBox img {
  max-width: 100%;
  max-height: 100%;
}

.ad-container-square {
  max-width: 100%; 
  max-height: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;  /* center the ad */
}

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

.downloadBlock {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  margin-bottom: 2rem;
}

@media (max-width: 768px) {
  .downloadBlock {
    flex-direction: column;
  }
}

/* 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;
}

.more-category-line {
  text-align: center;
  margin-top: 1.5rem;
}

.notDownloading {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}