/*
Theme Name: Giao Dien 20
Version: 1.0.0
Text Domain: giaodien20
*/

/* ===== PLUGIN REQUIRED CSS ===== */
* {
  -webkit-tap-highlight-color: transparent;
}

.video-thumb,
.movie-thumbnail {
  aspect-ratio: var(--fv-thumb-aspect-ratio, 16/9);
}

/* Autocomplete dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: -2px;
  right: -2px;
  z-index: 9999;
  background: var(--black);
  border: 2px solid white;
  border-top: none;
  max-height: 300px;
  overflow-y: auto;
}

/* Custom scrollbar for autocomplete */
.autocomplete-dropdown::-webkit-scrollbar {
  width: 6px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
  background: var(--black);
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
  background: white;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
  background: var(--neon-pink);
}

.autocomplete-dropdown a {
  display: block;
  padding: 10px 16px;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.1s;
}

.autocomplete-dropdown a:hover {
  background: var(--neon-yellow);
  color: var(--black);
}

/* ============================================
   CHAOTIC CINEMA - Brutalist Asymmetric Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=JetBrains+Mono:wght@400;700&display=swap');

:root {
  --black: #000;
  --white: #fff;
  --neon-yellow: #DFFF00;
  --neon-pink: #FF10F0;
  --neon-cyan: #00FFFF;
  --neon-red: #FF3131;
  --gray: #1a1a1a;
  --font-display: 'Bebas Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

::selection {
  background: var(--neon-pink);
  color: var(--black);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-mono);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  cursor: default;
}

/* Noise overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.03;
  pointer-events: none;
  z-index: 9999;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

/* ============================================
   HEADER - Brutalist Style
   ============================================ */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--black);
  border-bottom: 3px solid var(--neon-yellow);
  transition: transform 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 4px;
  color: var(--neon-yellow);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-ext {
  color: var(--neon-pink);
}

.nav {
  display: flex;
  gap: 0;
}

.nav-link {
  padding: 12px 24px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border: 2px solid transparent;
  transition: all 0.1s;
  position: relative;
  color: var(--white);
}

.nav-link:hover {
  background: var(--neon-yellow);
  color: var(--black);
  border-color: var(--neon-yellow);
}

.nav-link.active {
  background: var(--neon-pink);
  color: var(--black);
}

.dropdown-toggle.active {
  background: var(--neon-pink);
  color: var(--black);
}

.nav-link::before {
  content: '//';
  margin-right: 6px;
  opacity: 0.5;
}

/* Genres Dropdown */
.nav-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--white);
  cursor: pointer;
  border: 2px solid transparent;
}

.dropdown-toggle .arrow {
  font-size: 0.6rem;
  transition: transform 0.2s;
}

.nav-dropdown.open .dropdown-toggle .arrow {
  transform: rotate(180deg);
}

.dropdown-popup {
  display: none;
  position: absolute;
  background: var(--black);
  border: 2px solid var(--neon-yellow);
  padding: 10px;
  z-index: 100;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  right: 0;
  min-width: 320px;
}

.nav-dropdown.open .dropdown-popup {
  display: grid;
}

.genre-item {
  padding: 10px 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-align: center;
  transition: all 0.1s;
}

.genre-item:hover {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

.genre-item.active {
  background: var(--neon-pink);
  color: var(--black);
  border-color: var(--neon-pink);
}

.search-box {
  display: flex;
  border: 2px solid var(--white);
  background: transparent;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  padding: 12px 16px;
  width: 200px;
}

.search-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.search-btn {
  background: var(--white);
  border: none;
  color: var(--black);
  padding: 12px 16px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 1px;
}

.search-btn:hover {
  background: var(--neon-cyan);
}

/* ============================================
   MAIN - Chaotic Grid Layout
   ============================================ */

.main {
  padding-top: 100px;
}

.container {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Section Header - Diagonal */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

.section-header::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200px;
  height: 3px;
  background: var(--neon-yellow);
}

.section-title {
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 0.85;
  text-transform: uppercase;
  position: relative;
}

.section-title span {
  display: block;
  color: var(--neon-yellow);
  font-size: 1rem;
  font-family: var(--font-mono);
  letter-spacing: 4px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  opacity: 0.6;
  margin-top: 16px;
}

/* Time Filter Buttons */
.time-filters {
  display: flex;
  gap: 0;
  margin: 24px auto;
  border: 2px solid var(--white);
  width: fit-content;
}

.time-filter-btn {
  padding: 12px 6px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.1s;
}

.time-filter-btn:last-child {
  border-right: none;
}

.time-filter-btn:hover {
  background: var(--white);
  color: var(--black);
}

.time-filter-btn.active {
  background: var(--neon-yellow);
  color: var(--black);
}

/* Load More Button */
.load-more-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.load-more-btn {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 16px 48px;
  border: 2px solid var(--white);
  color: var(--white);
  background: transparent;
  transition: all 0.1s;
}

.load-more-btn:hover {
  background: var(--white);
  color: var(--black);
}

/* ============================================
   MOVIE GRID - Asymmetric Masonry
   ============================================ */

.movie-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  background: var(--white);
  padding: 4px;
}

.movie-card {
  position: relative;
  overflow: hidden;
  background: var(--black);
  cursor: pointer;
}

.movie-thumbnail {
  display: block;
  position: relative;
  width: 100%;
}

.movie-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.movie-card:hover .movie-thumbnail img {
  transform: scale(1.05);
}

/* Hidden elements */
.movie-overlay,
.play-btn,
.movie-meta {
  display: none;
}

.movie-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--white);
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  border-radius: 2px;
}

.ribbon-badge {
  position: absolute;
  top: 0px;
  left: 0px;
  background: white;
  color: var(--black);
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}


.movie-info {
  padding: 8px;
  background: var(--black);
}

.movie-title {
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.4;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   PAGINATION - Brutalist
   ============================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 40px 0;
  border: 3px solid var(--white);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.page-link {
  min-width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.1s;
}

.page-link:last-child {
  border-right: none;
}

.page-link:hover {
  background: var(--white);
  color: var(--black);
}

.page-link.active {
  background: var(--neon-yellow);
  color: var(--black);
}

.page-link.disabled {
  opacity: 0.2;
  pointer-events: none;
}

/* ============================================
   VIDEO PAGE
   ============================================ */

.video-container {
  background: var(--gray);
  margin-bottom: 48px;
  max-width: 1000px;
  margin: auto;
}

.video-player {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--white);
}

.video-player video,
.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-player .player-poster {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.video-info {
  padding: 25px;
  display: grid;
  gap: 10px;
  align-items: start;
  position: relative;
}

.video-title {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  margin-top: 24px;
}

.video-stats span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.video-actions {
  display: flex;
  gap: 4px;
}

/* Video Meta Section */
.video-meta-section {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.meta-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--neon-yellow);
  display: block;
  margin-bottom: 8px;
}

.video-genres,
.video-description,
.video-keywords {
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.genre-tags,
.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.genre-tag {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--neon-pink);
  color: var(--neon-pink);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.1s;
}

.genre-tag:hover {
  background: var(--neon-pink);
  color: var(--black);
}

.description-text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.7;
  opacity: 0.8;
}

.keyword-tag {
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--neon-cyan);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  transition: all 0.1s;
}

.keyword-tag:hover {
  background: var(--neon-cyan);
  color: var(--black);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: transparent;
  border: 2px solid var(--white);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.1s;
}

.action-btn:hover {
  background: var(--white);
  color: var(--black);
}

.action-btn.primary {
  background: var(--neon-yellow);
  border-color: var(--neon-yellow);
  color: var(--black);
}

.action-btn.primary:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

/* Like button */
.like-btn .like-icon {
  flex-shrink: 0;
}

.action-btn.like-btn.liked,
.action-btn.like-btn.liked:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
  color: var(--black);
}

.action-btn.like-btn.liked .like-icon {
  fill: var(--black);
  stroke: var(--black);
}

.related-videos {
  margin-top: 30px;
}

/* ============================================
   404 ERROR PAGE
   ============================================ */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  position: relative;
  overflow: hidden;
}

.error-content {
  text-align: center;
  z-index: 1;
  padding: 40px;
}

.error-code {
  font-family: var(--font-display);
  font-size: 15rem;
  line-height: 1;
  color: var(--neon-yellow);
  position: relative;
}

.glitch-text {
  position: relative;
  display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  color: var(--neon-pink);
  animation: glitch-1 0.3s infinite linear alternate-reverse;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%);
}

.glitch-text::after {
  color: var(--neon-cyan);
  animation: glitch-2 0.3s infinite linear alternate-reverse;
  clip-path: polygon(0 65%, 100% 65%, 100% 100%, 0 100%);
}

@keyframes glitch-1 {
  0% {
    transform: translate(-2px, 2px);
  }

  100% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0% {
    transform: translate(2px, -2px);
  }

  100% {
    transform: translate(-2px, 2px);
  }
}

.error-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 8px;
  margin-top: 20px;
  color: var(--white);
}

.error-message {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.8;
  opacity: 0.6;
  margin-top: 20px;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.error-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

.error-btn {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 16px 32px;
  border: 2px solid var(--white);
  color: var(--white);
  transition: all 0.1s;
}

.error-btn:hover {
  background: var(--white);
  color: var(--black);
}

.error-btn.primary {
  background: var(--neon-yellow);
  border-color: var(--neon-yellow);
  color: var(--black);
}

.error-btn.primary:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

/* ============================================
   FOOTER - Minimal Brutalist
   ============================================ */

.footer {
  background: var(--white);
  color: var(--black);
  padding: 80px 0 40px;
  margin-top: 60px;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr repeat(2, 1fr);
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .logo {
  color: var(--black);
  margin-bottom: 24px;
}

.footer-brand .logo::after {
  color: var(--neon-pink);
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.8;
  opacity: 0.6;
}

.footer-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--black);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-link {
  font-size: 0.85rem;
  opacity: 0.6;
  transition: all 0.1s;
}

.footer-link:hover {
  opacity: 1;
  padding-left: 8px;
}

.footer-link::before {
  content: '→ ';
  opacity: 0;
  transition: opacity 0.1s;
}

.footer-link:hover::before {
  opacity: 1;
}

.footer-bottom {
  padding-top: 40px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.4;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
  .movie-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .section-title {
    font-size: 3.5rem;
  }
}

@media (max-width: 768px) {

  .header {
    border-bottom: none;
  }

  .header.nav-hidden .nav {
    display: none;
  }

  .header.nav-hidden .dropdown-popup {
    display: none !important;
  }

  .header.nav-hidden {
    border-bottom: 3px solid var(--neon-yellow);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 16px;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-link {
    padding: 8px 16px;
    font-size: 0.65rem;
  }

  .search-box {
    flex: 1;
  }

  .search-input {
    width: 100%;
  }

  .movie-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .section-title {
    font-size: 2.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    margin-top: 30px;
  }

  .video-container {
    margin-top: 40px;
  }

  .video-info {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .video-title {
    font-size: 1.5rem;
  }

  .video-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
    min-width: 100px;
  }

  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 425px) {
  .logo {
    font-size: 1.8rem;
  }

  .section-header {
    margin-top: 60px;
  }

  .movie-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 2px;
  }

  .movie-title {
    font-size: 12px;
  }

  .movie-info {
    padding: 10px;
  }

  .pagination {
    border-width: 2px;
  }

  .page-link {
    min-width: 44px;
    height: 44px;
    font-size: 0.7rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-title span {
    font-size: 0.7rem;
  }

  .footer {
    padding: 48px 0 24px;
  }

  .footer-content {
    gap: 16px;
  }

  .video-container {
    margin-top: 70px;
  }

  .video-title {
    font-size: 1rem;
  }
}

@media (max-width: 424px) {
  .movie-grid {
    grid-template-columns: repeat(1, 1fr);
  }

  .page-link {
    min-width: 40px;
    height: 40px;
    font-size: 0.6rem;
  }
}

/* Glitch animation on hover */
@keyframes glitch {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }

  100% {
    transform: translate(0);
  }
}

.movie-card:hover .movie-title {
  animation: glitch 0.3s ease-in-out;
}

/* Scanline effect */
.video-info::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg,
      transparent,
      transparent 2px,
      rgba(0, 0, 0, 0.1) 2px,
      rgba(0, 0, 0, 0.1) 4px);
  pointer-events: none;
}