/**
 * AVTub Clone - Main Stylesheet
 * Inspired by avtub.cx design
 */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: #000000;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.main-content {
  padding-top: 0px;
}
/*logo text*/
.flex {
  display: flex;
  align-items: center;
}

a {
  color: inherit;
  text-decoration: none;
}

.space-x-1 > * + * {
  margin-left: 0.25rem;
}

.text-transparent {
  color: transparent;
}

.font-bold {
  font-weight: 700;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.bg-clip-text {
  -webkit-background-clip: text;
  background-clip: text;
}

.bg-gradient-to-r {
  background-image: linear-gradient(to right, #ec4899, #9333ea);
}

.text-white {
  color: rgba(255, 255, 255, 1);
}


/* Header Styles */
.site-header {
  background: #000;
  border-bottom: 1px solid #000;
  color: #fff;
  position: fixed;
  top: 0;
  z-index: 999;
  width: 100%;
}
body, html {
    overflow-x: hidden;
    padding-top: 120px;
}
.site-branding {
  padding: 10px 15px;
}

/* --- Bar atas (logo + hamburger) --- */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo img {
  height: 45px;
}

.container, .header-content {
    overflow: visible !important;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* Logo */
.site-logo {
    flex-shrink: 0;
}

.logo-text {
    font-size: 24px;
    font-weight: bold;
}

.logo-av {
    color: #ff6b00;
}

.logo-tub {
    color: #ffffff;
}

.logo-play {
    color: #00a8ff;
    font-size: 16px;
    margin-left: 5px;
}

/* Search Bar */
.header-search {
  margin-top: 10px;
}

.header-search form {
  display: flex;
  width: 100%;
  height: 40px;
}

.header-search input {
  flex: 1;
  padding: 8px 12px;
  border: none;
  outline: none;
  border-radius: 2px 0 0 2px;
}

.header-search button {
  background: #ff9900;
  border: none;
  color: #000;
  padding: 8px 14px;
  cursor: pointer;
  border-radius: 0 2px 2px 0;
}

/* Navigation */
.main-navigation {
  position: fixed;
  top: 50px; /* mulai di bawah logo/header */
  right: -100%; /* sembunyi di kanan */
  width: 100%; /* full lebar ke kiri */
  background-color: #000;
  color: #fff;
  transition: right 0.3s ease;
  z-index: 9998;
  padding: 20px 25px;
  height: auto; /* menyesuaikan isi menu */
  box-shadow: -2px 0 8px rgba(0, 0, 0, 0.5);
  border-top: 1px solid #222; /* pembatas halus di bawah header */
}

/* Saat aktif (menu terbuka) */
.main-navigation.active {
  right: 0;
}

/* List menu */
.main-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-navigation ul li {
  margin-bottom: 15px;
}

.main-navigation ul li a {
  color: orange;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.main-navigation ul li a:hover {
  color: #fff;
}

/* --- Hamburger --- */
.menu-toggle {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 9999;
  width: 28px;
  height: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Saat aktif jadi tanda silang */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
.menu-toggle.active span {
  background: #ff9900; /* warna X */
}

@media (min-width: 900px) {
  .site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .top-bar {
    width: auto;
  }

  .header-search {
    margin-top: 0;
    flex: 1;
    margin: 0 20px;
  }

  .main-navigation {
    position: static;
    height: auto;
    background: none;
    width: auto;
    padding: 0;
  }

  .menu {
    display: flex;
    align-items: center;
    gap: 25px; /* jarak antar tulisan menu */
  }

  .menu-toggle {
    display: none;
  }
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: normal;
}

.more-link {
    color: #ff6b00;
    font-size: 14px;
}

.more-link:hover {
    color: #ff8c33;
}

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

/* Video Card */
.video-card {
    background-color: #0a0a0a;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.3);
}

.video-link {
    display: block;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #1a1a1a;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #666;
}

/* Video Badges */
.video-badge {
    position: absolute;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 3px;
}

.hd-badge {
    top: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
}

/* Video Info */
.video-info-card {
    padding: 12px;
}

.video-title-card {
    font-size: 14px;
    font-weight: normal;
    color: #FF9900;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.show-more-container {
  text-align: center;
}

.show-more-btn {
  background-color: #FF9900;
  color: #fff;
  font-size: 1em;
  font-weight: 600;
  padding: 14px 40px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(255, 71, 71, 0.4);
}

.show-more-btn:hover {
  background-color: #FF9900;
  box-shadow: 0 6px 16px rgba(255, 71, 71, 0.6);
  transform: scale(1.03);
}


/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-link {
    padding: 8px 15px;
    background-color: #1a1a1a;
    color: #ffffff;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a {
  padding: 8px 14px;
  border-radius: 6px;
  background: #222;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.pagination a:hover {
  background: #444;
}

.pagination .active {
  background: #FF9900;
}

.page-link:hover {
    background-color: #ff6b00;
    border-color: #ff6b00;
}

.page-link.active {
    background-color: #ff6b00;
    border-color: #ff6b00;
}

.page-dots {
    color: #666;
    padding: 0 5px;
}

/* Video Detail Page */
.video-detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.video-player-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background-color: #000;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-player-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: #666;
}

.video-info {
    margin-bottom: 30px;
}

.video-title {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 10px;
}

.video-meta {
    display: flex;
    gap: 20px;
    color: #999;
    font-size: 14px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Screenshots */
.video-screenshots {
    margin-bottom: 30px;
}

.video-screenshots h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}

.screenshot-img {
    width: 100%;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s;
}

.screenshot-img:hover {
    transform: scale(1.05);
}

/* Comments Section */
.comments-section {
    background-color: #0a0a0a;
    padding: 20px;
    border-radius: 4px;
}

.comments-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.comment-form {
    margin-bottom: 30px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 10px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 10px;
    font-family: inherit;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ff6b00;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #ff6b00;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #ff8c33;
}

/* Alerts */
.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: #1a4d1a;
    color: #7cff7c;
    border: 1px solid #2d662d;
}

.alert-error {
    background-color: #4d1a1a;
    color: #ff7c7c;
    border: 1px solid #662d2d;
}

/* Comments List */
.comments-list {
    margin-top: 20px;
}

.comment-item {
    background-color: #1a1a1a;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.comment-author {
    font-weight: bold;
    color: #ff6b00;
    margin-bottom: 5px;
}

.comment-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.comment-content {
    color: #cccccc;
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: #666;
    padding: 20px;
}

/* Search Page */
.search-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.search-results-count {
    color: #999;
    font-size: 14px;
}

.search-form-wrapper {
    margin-bottom: 40px;
}

.search-form-large {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-input-large {
    flex: 1;
    padding: 15px;
    background-color: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px 0 0 4px;
    color: #ffffff;
    font-size: 16px;
}

.search-input-large:focus {
    outline: none;
    border-color: #ff6b00;
}

.search-button-large {
    padding: 15px 30px;
    background-color: #ff6b00;
    border: none;
    border-radius: 0 4px 4px 0;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-button-large:hover {
    background-color: #ff8c33;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
}

.no-results h2 {
    font-size: 24px;
    margin-bottom: 15px;
}

.no-results p {
    color: #999;
    margin-bottom: 10px;
}

.suggestions {
    margin-top: 30px;
    text-align: left;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    background-color: #1a1a1a;
    padding: 20px;
    border-radius: 4px;
}

.suggestions h3 {
    margin-bottom: 15px;
}

.suggestions ul {
    list-style-position: inside;
    color: #999;
}

.suggestions li {
    margin-bottom: 8px;
}

/* Category Page */
.category-header {
    margin-bottom: 30px;
}

.category-title {
    font-size: 28px;
    margin-bottom: 10px;
}

.category-description {
    color: #999;
    font-size: 16px;
}

/* Footer */
footer.site-footer {
  background: #000;
  color: #ccc;
  text-align: center;
  padding-top: 40px;
  padding-bottom: 40px;
}

footer.site-footer .footer-content {
  margin-bottom: 20px;
}

footer.site-footer .homepage-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.4;
}

footer.site-footer .archive-description {
  color: #bbb;
  font-size: 14px;
  line-height: 1.6;
  max-width: 85%;
  margin: 0 auto;
}

footer.site-footer .footer-bottom {
  width: 100vw; /* buat full selebar layar */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background: #000;
  text-align: center;
  padding: 10px 0 20px;
}

footer.site-footer .footer-bottom p {
  color: #888;
  font-size: 13px;
  margin: 0;
  text-align: center;
}



/* ========================================
   Responsive Design Fix for AVTub Clone
   ======================================== */

/* Tablet landscape dan ke bawah (<= 1024px) */
@media (max-width: 1024px) {
    .video-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 18px;
    }

    .video-title-card {
        font-size: 13px;
    }
}

/* Tablet portrait dan HP besar (<= 768px) */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .header-search {
        flex: 1 1 100%;
        width: 100%;
    }

    .main-nav {
        width: 100%;
        justify-content: space-around;
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr); /* 💡 Force dua kolom */
        gap: 12px;
    }

    .video-card {
        border-radius: 6px;
    }

    .section-title {
        font-size: 18px;
    }

    .video-title {
        font-size: 18px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section h3 {
        font-size: 15px;
    }
}

/* HP kecil (<= 480px) */
@media (max-width: 480px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr); /* tetap 2 kolom di HP kecil */
        gap: 10px;
    }

    .video-card {
        border-radius: 5px;
    }

    .video-title-card {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }

    .search-input-large {
        font-size: 14px;
    }

    .page-link {
        padding: 6px 10px;
        font-size: 13px;
    }

    .pagination {
        gap: 6px;
    }
}

/* HP sangat kecil (<= 360px) */
@media (max-width: 360px) {
    .video-grid {
        grid-template-columns: 1fr; /* fallback 1 kolom kalau layar super sempit */
    }
}

body {
  background-color: #000;
  color: #fff;
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}
header.av-header {
  background-color: #111;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header.av-header .logo {
  font-size: 24px;
  font-weight: bold;
}
.logo span:first-child { color: #ff9b00; }
.logo span:last-child { color: #3eb8ff; margin-left: 5px; }
.menu-icon {
  font-size: 24px;
  cursor: pointer;
}
.search-box {
  margin: 15px;
  display: flex;
  justify-content: center;
}
.search-box input {
  width: 90%;
  max-width: 400px;
  padding: 10px;
  border-radius: 5px;
  border: none;
  outline: none;
  font-size: 14px;
}
.video-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
  box-sizing: border-box;
}
.video-section {
  text-align: center;
  padding: 10px 0 20px;
}
.video-section h2 {
  font-size: 18px;
  margin-bottom: 15px;
  line-height: 1.4em;
}
.video-player {
  width: 100%;
  max-width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 6px;
  background-color: #000;
}
.video-description {
    margin-top: 1em;
    text-align: justify;
}
.video-description a {
  color: #FF9900;
  text-decoration: none;
  pointer-events: auto;
}

.video-description a:hover {
  color: #FF9900;
}

.download-btn {
  background-color: #ff9b00;
  color: #fff;
  border: none;
  border-radius: 3px;
  padding: 12px 25px;
  font-size: 16px;
  font-weight: bold;
  margin-top: 20px;
  cursor: pointer;
  transition: background 0.3s;
}
.download-btn:hover { background-color: #e68900; }
.description {
  margin: 20px;
  font-size: 14px;
  color: #ccc;
  line-height: 1.6em;
  text-align: center;
}
.related {
  padding: 20px 0; /* hilangkan padding kanan-kiri */
  margin: 0; /* pastikan tidak ada jarak ekstra */
  width: 100vw; /* full lebar layar */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}
.related h3 {
  font-size: 18px;
  margin-bottom: 15px;
  padding: 0 10px;
  text-align: left; /* ✅ biar tetap di kiri meskipun parent center */
  width: 100%;
}
.related-videos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px; /* bisa kamu ubah jadi 0 kalau ingin benar-benar rapat */
  justify-content: center;
  width: 100%;
}
.related-item {
  width: 45%;
  max-width: 220px;
  background-color: #111;
  border-radius: 4px;
  overflow: hidden;
  text-align: left;
  font-size: 14px;
  position: relative;
  display: flex;
  flex-direction: column;
  margin-bottom: 10px;
}
.related-item img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  display: block !important;
  height: auto !important;
  border-radius: 4px 4px 0 0;
}

.related-item .title {
  padding: 8px;
  color: #FF9900;
  font-size: 13px;
  line-height: 1.3em;
  height: auto;
  min-height: 4em; /* ✅ pastikan ruang cukup untuk 2 baris */
  margin-bottom: 5px; /* ✅ beri jarak bawah */
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  background-color: #111;
}
.related-item .time {
  position: absolute;
  background-color: rgba(0,0,0,0.7);
  color: #fff;
  padding: 2px 5px;
  font-size: 12px;
  bottom: 5px;
  right: 5px;
  border-radius: 2px;
}
@media (min-width: 600px) {
  .related-item { width: 23%; }
}
