/* Import Inter - One of the most readable screen fonts */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

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

a {
  text-decoration: none !important;
}

:root {
  /* Dark colors matching reference image */
  --bg-dark: #0c0c10;
  --bg-card: #141418;
  --bg-hover: #1c1c22;
  --accent: #7c5cfc;
  --accent-light: #a78bfa;
  --accent-soft: rgba(124, 92, 252, 0.12);

  /* Text colors */
  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b0;
  --text-muted: #6a6a78;
  --border: #222230;
  --notice-bg: #12121a;
  --notice-border: rgba(124, 92, 252, 0.35);

  /* Typography scale */
  --font-xs: 0.75rem;
  --font-sm: 1rem;
  --font-base: 0.875rem;
  --font-md: 0.95rem;
  --font-lg: 1.125rem;
  --font-xl: 1.35rem;
  --font-2xl: 1.75rem;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: -apple-system, "Inter", BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: radial-gradient(
      900px 500px at 15% 10%,
      #000000 0%,
      transparent 60%
    ),
    radial-gradient(700px 400px at 85% 20%, #2a1d3f 0%, transparent 60%),
    linear-gradient(217deg, #000000e8, #0f1424);
  color: #fff;
  min-height: 100vh;
  line-height: 1.55;
  letter-spacing: -0.01em;
}

.glass {
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

/* Sticky Transparent Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(121deg, rgb(32 25 53), rgb(0 0 0 / 30%));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(60, 60, 90, 0.25);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
/*   padding: 7px 32px; */
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.logo-icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(
    135deg,
    var(--accent) 0%,
    var(--accent-light) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Desktop Navigation */
.nav-menu {
  flex: 1;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 15px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-sm);
  font-weight: 600;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.dropdown-icon {
  width: 12px;
  height: 12px;
  opacity: 0.6;
  transition: transform 0.2s;
}

.nav-item.has-submenu:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Submenu */
.submenu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 170px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.nav-item.has-submenu:hover .submenu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.submenu li a {
  display: block;
  padding: 10px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--font-sm);
  transition: all 0.2s;
}

.submenu li a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* Search Bar */
.search-bar {
  position: relative;
  /* width: 100%; */
  max-width: 300px;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.search-input {
  width: 100%;
  padding: 10px 30px 10px 40px;
  background: #ffffff00;
  border: 1px solid #8d8da5;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: var(--font-sm);
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-hover);
}

.search-input::placeholder {
  color: var(--text-muted);
}

/* Mobile Side Menu Overlay */
.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Mobile Side Menu */
.side-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100vh;
  background: #1414183b;
  backdrop-filter: blur(3px);
  z-index: 1002;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.side-menu.active {
  transform: translateX(0);
}

.side-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.close-menu {
  width: 34px;
  height: 34px;
  background: var(--bg-hover);
  border: none;
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.close-menu:hover {
  background: var(--bg-dark);
  color: var(--text-primary);
}

.close-menu svg {
  width: 16px;
  height: 16px;
}

.side-nav {
  padding: 12px 0;
}

.side-nav-list {
  list-style: none;
}

.side-nav-item {
  border-bottom: 1px solid var(--border);
}

.side-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  color: #ffffff;
  text-decoration: none;
  /* font-size: var(--font-base); */
  font-weight: 500;
  transition: all 0.2s;
}

.side-nav-link:hover,
.side-nav-link.active {
  color: var(--text-primary);
  background: #33334d69;
}

.side-nav-link .dropdown-icon {
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: transform 0.3s;
}

.side-nav-item.open .dropdown-icon {
  transform: rotate(180deg);
}

.side-submenu {
  display: none;
  list-style: none;
  /* background: var(--bg-dark); */
}

.side-nav-item.open .side-submenu {
  display: block;
}

.side-submenu li a {
  display: block;
  padding: 12px 18px 12px 32px;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.side-submenu li a:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

/* App Container */
.app-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 72px 32px 36px;
}

/* Notice Section */
.notice-section {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--notice-bg);
  border: 1px solid var(--notice-border);
  border-radius: 10px;
  padding: 3px 16px;
  margin-bottom: 20px;
}

.notice-icon {
  padding-top: 8px;
  flex-shrink: 0;
}

.notice-icon svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.notice-text {
  flex: 1;
  font-size: var(--font-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.notice-text strong {
  color: var(--accent-light);
  font-weight: 600;
}

.notice-close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  color: #ffcc00;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.notice-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.notice-close svg {
  width: 14px;
  height: 14px;
}


.notice-section.hidden {
  display: none;
}

/* Hero Section */
.hero-section {
  padding-top: 16px;
  position: relative;
  margin-bottom: 28px;
}

.hero-slider {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}

.hero-banner {
  position: relative;
  height: 300px;
  display: none; /* Hide by default */
  animation: fadeIn 0.5s ease-in-out;
}

.hero-banner.active {
  display: block; /* Show active */
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.hero-image {
  position: absolute;
  inset: 0;
}

.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* Dark gradient on text side - matching reference */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(12, 12, 16, 1) 0%,
    rgba(12, 12, 16, 0.98) 15%,
    rgba(12, 12, 16, 0.92) 30% 30%,
    rgb(12 12 16 / 0%) 50%,
    rgb(12 12 16 / 0%) 70%,
    rgba(12, 12, 16, 0.1) 90%,
    rgba(12, 12, 16, 0) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 28px 50px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
}

.hero-title {
  font-size: var(--font-2xl);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.hero-description {
  font-size: var(--font-sm);
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  width: fit-content;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: #6b4ce0;
  transform: translateY(-1px);
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.5);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.hero-nav:hover {
  background: rgba(0, 0, 0, 0.7);
}

.hero-nav svg {
  width: 33px;
  height: 26px;
}

.hero-prev {
  left: 14px;
}

.hero-next {
  right: 14px;
}

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s;
}

.dot.active {
  width: 34px;
  border-radius: 4px;
  background: var(--accent);
}

.logo-image {
  padding-top: 10px;
  width: 250px;
  /* object-fit: cover; */
}

/* Content Section */
.content-section {
  margin-bottom: 32px;
}

.section-title {
  display: flex;
  font-size: var(--font-xl);
  font-weight: 700;
  margin-bottom: 18px;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}
.material-icons{
  padding-top: 4px;
}

/* Movies Grid */
.movies-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}

/* Poster Card - Gradient Border Effect */
.poster-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
/*   backdrop-filter: blur(12px); */
/*   -webkit-backdrop-filter: blur(12px); */
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.35s ease;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.poster-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 18px rgb(80 92 161), 0 0 32px rgb(214 107 255 / 0%),
    0 0 50px rgb(255 110 199 / 64%);
}

/* Inner Card */
.poster-inner {
  /* background: #14182a; */
  border-radius: 10px;
  overflow: hidden;
  height: 100%;
}

.poster-image {
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  background: #14182a;
}

.poster-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.poster-card:hover .poster-image img {
  transform: scale(1.05);
}

.poster-quality {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgb(0 0 0 / 70%);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
/*   backdrop-filter: blur(4px); */
}

.poster-info {
  padding: 10px 4px;
  /* background: #14182a; */
}

/* Title - Full display, no truncation */
.poster-title {
  font-size: 1rem;
  font-weight: 500;
  /* line-height: 1.4; */
  /* margin-bottom: 6px; */
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
}

.poster-year {
  font-size: 0.8rem;
  color: #9aa3b2;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px 0 40px;
}

.page-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.page-btn:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-btn svg {
  width: 16px;
  height: 16px;
}

.page-numbers {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-num {
  min-width: 38px;
  height: 38px;
  padding: 0 8px; /* Add padding for breathing room */
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: var(--font-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; /* Ensure flex centering works */
  align-items: center;
  justify-content: center;
}

.page-num:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.page-num.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.page-dots {
  color: var(--text-muted);
  padding: 0 4px;
  font-size: var(--font-sm);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .movies-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 992px) {
  .header-container {
    padding: 10px 20px;
  }

  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .search-bar {
    max-width: none;
    flex: 1;
  }

  .app-container {
    padding: 65px 20px 30px;
  }

  .movies-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
  }

  .hero-banner {
    height: 250px;
  }

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

@media (max-width: 768px) {
  :root {
    --font-xs: 0.7rem;
    --font-sm: 0.78rem;
    --font-base: 0.825rem;
  }

  .header-container {
    padding: 10px 14px;
    gap: 10px;
  }

  .logo-text {
    font-size: 1.1rem;
  }

  .search-input {
    padding: 9px 12px 9px 34px;
  }

  .app-container {
    padding: 60px 14px 26px;
  }

  .notice-section {
    padding: 10px 12px;
    gap: 10px;
  }

  .hero-banner {
    height: 220px;
  }

  .hero-content {
    padding: 20px;
  }

  .hero-title {
    font-size: 1.35rem;
    margin-bottom: 8px;
  }

  .hero-description {
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn {
    padding: 9px 20px;
  }

  .hero-nav {
    width: 34px;
    height: 34px;
  }

  .hero-nav svg {
    width: 16px;
    height: 16px;
  }

  .hero-prev {
    left: 10px;
  }

  .hero-next {
    right: 10px;
  }

  .movies-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

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

  .page-btn,
  .page-num {
    min-width: 34px;
    width: 34px;
    height: 34px;
  }
}

/* for mobile devices */
@media (max-width: 480px) {
  :root {
    --font-xs: 0.65rem;
    --font-sm: 0.72rem;
    --font-base: 0.78rem;
  }
  .breadcrumb{
    display: none;
  }
  .logo-image {
    height: 40px;
    width: 150px;
    padding-top: 6px;
  }
  .hero-section {
    margin-bottom: 10px;
  }

  .header-container {
    gap: 8px;
  }

  .logo-icon {
    width: 20px;
    height: 20px;
  }

  .logo-text {
    font-size: 1rem;
  }

  .search-input {
    padding: 8px 10px 8px 32px;
  }

  .app-container {
    padding: 56px 10px 22px;
  }

  .notice-section {
    flex-wrap: wrap;
    padding: 10px;
    position: relative;
  }

  .notice-icon {
    display: none;
  }

  .notice-text {
    flex: 1 1 100%;
    order: 1;
    padding-right: 24px;
  }

  .notice-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
  }

  .hero-banner {
    height: 180px;
    display: none; /* Hide by default */
    animation: fadeIn 0.5s ease-in-out;
  }

  .hero-banner.active {
    display: block; /* Show active */
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  .hero-content {
    padding: 14px;
    background: #00000030;
  }

  .hero-title {
    font-size: 1.15rem;
    margin-bottom: 6px;
  }

  .hero-description {
    margin-bottom: 12px;
  }

  .btn {
    padding: 8px 16px;
  }

  .hero-nav {
    width: 30px;
    height: 30px;
  }

  .hero-prev {
    left: 8px;
  }

  .hero-next {
    right: 8px;
  }

  .movies-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .poster-card {
    border-radius: 14px;
  }

  .poster-inner {
    border-radius: 12px;
  }

  .poster-info {
    padding: 10px 2px;
  }

  .poster-title {
    font-size: 0.9rem;
  }

  .poster-year {
    font-size: 0.75rem;
  }

  .section-title {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
  }

  .page-btn,
  .page-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px; /* Add padding for content breathing room */
    border-radius: 6px;
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
    text-decoration: none;
    transition: all 0.2s ease;
  }

  .page-num:hover, .page-btn:hover:not(:disabled) {
    background: #333;
    color: #fff;
  }

  .page-num.active {
    background: #7b6ef6;
    border-color: #7b6ef6;
    color: #fff;
  }

  .page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: transparent;
    border-color: transparent;
  }

  .page-dots {
    color: #666;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 32px;
  }

  .page-numbers {
    gap: 4px;
    display: inline-flex;
  }

  .side-menu {
    width: 260px;
  }
}
