@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  --navy-dark: #070d18;
  --navy-base: #0c182b;
  --navy-card: #13243d;
  --navy-card-hover: #1b3254;
  --border-color: rgba(255, 255, 255, 0.08);

  --accent-red: #e63946;
  --accent-red-hover: #d62828;
  --accent-glow: rgba(230, 57, 70, 0.35);

  --accent-gold: #f59e0b;
  --accent-gold-glow: rgba(245, 158, 11, 0.4);

  --text-main: #ffffff;
  --text-muted: #8e9bb0;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --transition: all 0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background-color: var(--navy-dark);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Background Ambient Gradient Glow */
body::after {
  content: '';
  position: fixed;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(230, 57, 70, 0.15) 0%, transparent 70%);
  filter: blur(80px);
  z-index: -2;
  pointer-events: none;
}

/* Canvas Partikel Melayang */
#bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

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

/* ===================================================
   NAVBAR WITH SEARCH BAR & CAPSULE PROFILE
   =================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(7, 13, 24, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 24px;
}

.navbar-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.5px;
  color: #fff;
  white-space: nowrap;
}

.brand-logo .logo-badge {
  background: var(--accent-red);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 1.1rem;
}

.nav-search {
  flex: 1;
  max-width: 500px;
  position: relative;
}

.nav-search input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  background: rgba(12, 24, 43, 0.8);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: #fff;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.nav-search input:focus {
  border-color: var(--accent-red);
  box-shadow: 0 0 12px var(--accent-glow);
}

.nav-search i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-nav-login {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--navy-card);
  border: 1px solid var(--border-color);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-nav-login:hover {
  background: var(--navy-card-hover);
}

.btn-nav-register {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
  background: var(--accent-red);
  color: #fff;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-nav-register:hover {
  background: var(--accent-red-hover);
  box-shadow: 0 4px 15px var(--accent-glow);
}

/* Cyber Capsule Navbar Profile */
.nav-user-logged {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(12, 24, 43, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50px;
  padding: 4px 6px 4px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: var(--transition);
}

.nav-user-logged:hover {
  border-color: rgba(230, 57, 70, 0.5);
  box-shadow: 0 0 15px var(--accent-glow);
}

.btn-nav-user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff4d5e, #e63946 60%, #800f1c 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #fff;
  box-shadow: 0 0 8px var(--accent-glow);
}

.nav-user-name {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-nav-logout-capsule {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: var(--transition);
}

.btn-nav-logout-capsule:hover {
  background: var(--accent-red);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 0 10px var(--accent-glow);
  transform: rotate(90deg);
}

/* ===================================================
   GRID POPULER SEKARANG
   =================================================== */
.popular-grid-layout {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.popular-compact-card {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  transition: all 0.2s ease;
}

.popular-compact-card:hover {
  background: #24334a;
  border-color: #f59e0b;
  transform: translateY(-2px);
}

.popular-compact-card img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}

/* ===================================================
   FOOTER
   =================================================== */
.footer {
  margin-top: auto;
  background: #040810;
  border-top: 1px solid var(--border-color);
  padding: 40px 24px 20px;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 10px;
  line-height: 1.6;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-red);
}

.footer-bottom {
  max-width: 1240px;
  margin: 30px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===================================================
   CUSTOM TOAST NOTIFICATION
   =================================================== */
.mgs-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.mgs-toast {
  min-width: 280px;
  max-width: 380px;
  background: rgba(12, 24, 43, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mgs-toast.show {
  transform: translateX(0);
  opacity: 1;
}

.mgs-toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.mgs-toast.error {
  border-left: 4px solid var(--accent-red);
}
.mgs-toast.error .mgs-toast-icon {
  background: rgba(230, 57, 70, 0.2);
  color: var(--accent-red);
}

.mgs-toast.success {
  border-left: 4px solid #10b981;
}
.mgs-toast.success .mgs-toast-icon {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.mgs-toast-body h5 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.mgs-toast-body p {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

@media (max-width: 480px) {
  .mgs-toast-container {
    top: 16px;
    left: 16px;
    right: 16px;
  }
  .mgs-toast {
    max-width: 100%;
  }
}

/* ===================================================
   FLOATING SOCIAL HUB
   =================================================== */
.floating-hub-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-hub-main {
  position: absolute;
  z-index: 10;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-red, #e63946), #991b1b);
  color: #fff;
  font-size: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(230, 57, 70, 0.45);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-hub-main:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(230, 57, 70, 0.65);
}

.floating-hub-container.active .btn-hub-main {
  transform: rotate(135deg);
  background: linear-gradient(135deg, #475569, #1e293b);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6);
}

.hub-radial-item {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.2rem;
  text-decoration: none;
  transform: translate(0, 0) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.floating-hub-container.active .hub-radial-item.whatsapp {
  transform: translate(-76px, 0px) scale(1);
  opacity: 1;
  pointer-events: auto;
  background: #25D366;
  box-shadow: 0 0 16px rgba(37, 211, 102, 0.5);
  transition-delay: 0.04s;
}

.floating-hub-container.active .hub-radial-item.tiktok {
  transform: translate(-55px, -55px) scale(1);
  opacity: 1;
  pointer-events: auto;
  background: #000000;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.25);
  transition-delay: 0.08s;
}

.floating-hub-container.active .hub-radial-item.instagram {
  transform: translate(0px, -76px) scale(1);
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  box-shadow: 0 0 16px rgba(225, 48, 108, 0.5);
  transition-delay: 0.12s;
}

.hub-radial-item:hover {
  transform: scale(1.15) !important;
}

.hub-radial-item .hub-tooltip {
  position: absolute;
  bottom: -22px;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.2s ease;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hub-radial-item:hover .hub-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================
   FIX MUTLAK: MATIKAN MENU MOBILE DI TABLET & DESKTOP (> 768px)
   =================================================== */
@media (min-width: 769px) {
  .mobile-nav-toggle-group,
  .mobile-search-dropdown,
  .mobile-menu-drawer,
  #mobileMenuDropdown {
    display: none !important;
  }
}

/* ===================================================
   ATURAN RESPONSIVE KHUSUS MOBILE / HP (< 768px)
   =================================================== */
@media (max-width: 768px) {
  /* Hilangkan tombol menu desktop di HP */
  .desktop-only {
    display: none !important;
  }

  /* NAVBAR KEBAB (TITIK TIGA) */
  .mobile-nav-toggle-group {
    display: flex !important;
    align-items: center;
    gap: 8px;
  }

  .btn-mobile-icon {
    width: 36px;
    height: 36px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
  }

  .btn-mobile-icon:hover {
    border-color: #f59e0b;
    color: #f59e0b;
  }

  /* DRAWER (LACI MENU) DEFAULT SEMBUNYI */
  .mobile-menu-drawer {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 4px) !important;
    right: 14px !important;
    width: 240px !important;
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 14px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8) !important;
    padding: 14px !important;
    z-index: 99999 !important;
  }

  /* Laci hanya muncul jika punya class .show (ditekan) */
  .mobile-menu-drawer.show {
    display: block !important;
    animation: slideDownMenu 0.2s ease-out;
  }

  .mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    color: #cbd5e1;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
  }

  .mobile-menu-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }

  /* MOBILE LAYOUT UMUM */
  .navbar {
    padding: 10px 14px;
  }
  .navbar-container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
  }
  .brand-logo {
    font-size: 1.05rem;
    gap: 6px;
  }
  .brand-logo .logo-badge {
    padding: 2px 6px;
    font-size: 0.85rem;
  }
  .nav-search {
    display: block;
    max-width: 100%;
    margin: 0 4px;
  }
  .nav-search input {
    padding: 6px 8px 6px 28px;
    font-size: 0.75rem;
    border-radius: 8px;
  }
  .nav-search i {
    left: 8px;
    font-size: 0.72rem;
  }

  .mobile-search-dropdown {
    width: 100%;
    padding: 8px 0;
  }
  .mobile-search-dropdown input {
    width: 100%;
    padding: 8px 14px;
    background: rgba(12, 24, 43, 0.95);
    border: 1.5px solid rgba(245, 158, 11, 0.4);
    border-radius: 8px;
    color: #fff;
    font-size: 0.85rem;
    outline: none;
    box-sizing: border-box;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }
  .footer-brand p {
    margin: 10px auto 0;
  }
  .footer-links {
    align-items: center;
  }

  .floating-hub-container {
    bottom: 18px;
    right: 18px;
    position: fixed !important;
    display: flex !important;
    z-index: 999999 !important;
  }
  .btn-hub-main {
    width: 46px;
    height: 46px;
    font-size: 1rem;
  }
  .floating-hub-container.active .hub-radial-item.whatsapp {
    transform: translate(-68px, 0px) scale(1);
  }
  .floating-hub-container.active .hub-radial-item.tiktok {
    transform: translate(-48px, -48px) scale(1);
  }
  .floating-hub-container.active .hub-radial-item.instagram {
    transform: translate(0px, -68px) scale(1);
  }
  .hub-radial-item {
    width: 40px;
    height: 40px;
    font-size: 1.05rem;
  }

  .flash-promo-card {
    width: 210px !important;
    min-width: 210px !important;
    padding: 10px !important;
  }
  .popular-grid-layout {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .popular-compact-card {
    padding: 8px 10px !important;
    gap: 10px !important;
  }
  .popular-compact-card img {
    width: 38px !important;
    height: 38px !important;
  }
  .popular-compact-card h4 {
    font-size: 0.78rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .popular-compact-card p {
    font-size: 0.65rem !important;
  }
  .catalog-tab-pill {
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
  }
  .catalog-poster-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
  .catalog-poster-card img {
    height: 160px !important;
  }
  .home-section {
    padding: 0 12px !important;
    margin-bottom: 30px !important;
  }
}

@keyframes slideDownMenu {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================================
   GLOBAL CYBER MODAL CONFIRMATION
   =================================================== */
.mgs-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 9, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 16px;
}

.mgs-modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.mgs-cyber-modal {
  width: 100%;
  max-width: 380px;
  background: rgba(12, 24, 43, 0.95);
  border: 1px solid rgba(230, 57, 70, 0.35);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(230, 57, 70, 0.2);
  border-radius: 24px;
  padding: 28px 24px;
  text-align: center;
  transform: scale(0.9) translateY(20px);
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mgs-modal-overlay.show .mgs-cyber-modal {
  transform: scale(1) translateY(0);
}

.modal-icon-glow {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(230, 57, 70, 0.15);
  border: 1px solid rgba(230, 57, 70, 0.4);
  color: var(--accent-red, #e63946);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 20px rgba(230, 57, 70, 0.35);
}

.mgs-cyber-modal h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.mgs-cyber-modal p {
  font-size: 0.85rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.5;
  margin-bottom: 24px;
}

.modal-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.btn-modal-cancel {
  padding: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-modal-confirm {
  padding: 12px;
  background: var(--accent-red, #e63946);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-weight: 800;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(230, 57, 70, 0.4);
  transition: all 0.2s ease;
}

.btn-modal-confirm:hover {
  background: var(--accent-red-hover, #d62828);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230, 57, 70, 0.6);
}

/* ===================================================
   CYBER ANIMATED VIDEO LOGO (NAVBAR & FOOTER) - FIX
   =================================================== */
.brand-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}

.logo-video-wrap {
  height: 42px;
  width: 150px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  flex-shrink: 0;
}

.logo-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

@media (max-width: 768px) {
  .logo-video-wrap {
    height: 32px;
    width: 115px;
  }
}