:root {
  --bg-primary: #06080d;
  --bg-surface: #10141e;
  --bg-glass: rgba(16, 20, 30, 0.82);
  --bg-card: #181d2a;
  --accent-red: #ff052b;
  --accent-red-glow: rgba(255, 5, 43, 0.4);
  --accent-gold: #ffb703;
  --accent-cyan: #00f2fe;
  --text-main: #ffffff;
  --text-muted: #949db1;
  --border-color: rgba(255, 255, 255, 0.08);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --shadow-glow: 0 15px 35px rgba(255, 5, 43, 0.15);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.6);
  --font: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font);
  overflow-x: hidden;
  padding-bottom: 75px;
  min-height: 100vh;
  letter-spacing: -0.2px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #2a3142;
  border-radius: 4px;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #ff052b, #8a0014);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 20px var(--accent-red-glow);
  transition: transform 0.3s ease;
}

.logo-container:hover .logo-icon {
  transform: scale(1.08) rotate(-4deg);
}

.logo-brand {
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.8px;
}

.logo-zaid {
  color: #ffffff;
}

.logo-flix {
  background: linear-gradient(90deg, #ff052b, #ff5252);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-badge {
  background: linear-gradient(135deg, rgba(255, 5, 43, 0.25), rgba(255, 183, 3, 0.25));
  color: var(--accent-gold);
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 183, 3, 0.4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Search Bar */
.search-box {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 12px 18px 12px 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  color: var(--text-main);
  font-size: 0.92rem;
  font-family: var(--font);
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--accent-red);
  box-shadow: 0 0 20px var(--accent-red-glow);
}

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

/* Category & Release Year Filter Bars */
.filter-container {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
}

.category-bar, .year-bar {
  display: flex;
  gap: 10px;
  padding: 10px 20px;
  overflow-x: auto;
  white-space: nowrap;
}

.year-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  padding-bottom: 12px;
}

.category-pill, .year-pill {
  padding: 8px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.year-pill {
  border-radius: 8px;
  font-size: 0.8rem;
  padding: 5px 12px;
}

.category-pill:hover, .year-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.2);
}

.category-pill.active, .year-pill.active {
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px var(--accent-red-glow);
}

/* Hero Carousel Section */
.hero-section {
  padding: 20px;
  max-width: 1350px;
  margin: 0 auto;
}

.hero-card {
  position: relative;
  width: 100%;
  height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border-color);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 8, 13, 0.1) 0%, rgba(6, 8, 13, 0.85) 70%, rgba(6, 8, 13, 1) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.hero-title {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.9);
  line-height: 1.15;
}

.hero-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
  font-size: 0.9rem;
}

.badge-imdb {
  background: linear-gradient(135deg, var(--accent-gold), #e0a000);
  color: #000;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.82rem;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  color: #fff;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 800;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  width: fit-content;
  box-shadow: 0 6px 20px var(--accent-red-glow);
  transition: all 0.3s ease;
}

.hero-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 5, 43, 0.6);
}

/* Movie Content Section */
.content-section {
  padding: 20px;
  max-width: 1350px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-counter-badge {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Movie Grid */
.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 18px;
}

@media (min-width: 600px) {
  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 22px;
  }
}

/* Movie Card */
.movie-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.movie-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 5, 43, 0.6);
}

.card-poster {
  position: relative;
  width: 100%;
  padding-top: 148%;
  background: var(--bg-surface);
  overflow: hidden;
}

.card-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.movie-card:hover .card-poster img {
  transform: scale(1.08);
}

.badge-quality {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-year {
  position: absolute;
  top: 10px;
  right: 10px;
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 6px;
}

.card-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card-title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: auto;
}

/* Pagination Controls */
.pagination-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: 40px 0 20px 0;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
}

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

.page-btn {
  padding: 9px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s ease;
}

.page-btn:hover:not(:disabled) {
  background: var(--accent-red);
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px var(--accent-red-glow);
}

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

.page-btn.active {
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px var(--accent-red-glow);
}

.page-btn-go {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.page-jump-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.page-jump-input {
  width: 70px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: #fff;
  font-size: 0.88rem;
  font-family: var(--font);
  text-align: center;
  outline: none;
}

.page-jump-input:focus {
  border-color: var(--accent-red);
}

/* Bottom Floating Dock Navigation Bar */
.bottom-nav {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 450px;
  height: 62px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: 30px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  z-index: 99;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.nav-item i {
  font-size: 19px;
}

.nav-item.active {
  color: var(--accent-red);
}

/* Modal Window for Player & Details */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 14px;
}

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

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 950px;
  max-height: 94vh;
  border-radius: var(--radius-lg);
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 38px;
  height: 38px;
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: transform 0.2s;
}

.modal-close-btn:hover {
  transform: scale(1.1);
  background: var(--accent-red);
}

.player-container {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  position: relative;
}

.player-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.server-selector {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  background: #0b0e16;
  border-bottom: 1px solid var(--border-color);
  overflow-x: auto;
}

.server-btn {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.server-btn.active {
  background: linear-gradient(135deg, var(--accent-red), #b20710);
  color: #fff;
  border-color: var(--accent-red);
  box-shadow: 0 4px 15px var(--accent-red-glow);
}

.modal-body {
  padding: 24px;
}

.modal-title {
  font-size: 1.6rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tag-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-synopsis {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #c4c9d4;
  margin-bottom: 22px;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  font-size: 0.88rem;
}

.meta-item span {
  color: var(--text-muted);
  display: block;
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.fav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.2s;
}

.fav-btn:hover {
  transform: scale(1.2);
}

/* Loading Spinner */
.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 12px;
}

.spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(255, 5, 43, 0.2);
  border-top: 4px solid var(--accent-red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Download APK Button */
.download-apk-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3DDC84, #1b8a4f);
  color: #000000;
  font-weight: 800;
  font-size: 0.88rem;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(61, 220, 132, 0.3);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.download-apk-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 6px 20px rgba(61, 220, 132, 0.5);
  color: #000000;
}

.download-apk-btn i {
  font-size: 1.1rem;
}

.nav-apk-download {
  text-decoration: none;
}

/* Get APK Pill in Menu Bar */
.get-apk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3DDC84, #1b8a4f) !important;
  color: #000000 !important;
  font-weight: 800 !important;
  border: none !important;
  text-decoration: none !important;
  box-shadow: 0 4px 14px rgba(61, 220, 132, 0.45);
  margin: 0 4px;
  animation: apkPulse 2.5s infinite ease-in-out;
}

.get-apk-pill:hover {
  transform: translateY(-2px) scale(1.08) !important;
  box-shadow: 0 8px 25px rgba(61, 220, 132, 0.8) !important;
  color: #000000 !important;
}

.get-apk-pill i {
  font-size: 1.1rem;
}

@keyframes apkPulse {
  0% { transform: scale(1); box-shadow: 0 4px 14px rgba(61, 220, 132, 0.45); }
  50% { transform: scale(1.06); box-shadow: 0 6px 22px rgba(61, 220, 132, 0.8); }
  100% { transform: scale(1); box-shadow: 0 4px 14px rgba(61, 220, 132, 0.45); }
}

/* Header Left Wrapper & Next to Logo Button */
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-apk-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3DDC84, #1b8a4f);
  color: #000000;
  font-weight: 800;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(61, 220, 132, 0.4);
  transition: all 0.25s ease;
  white-space: nowrap;
}

.header-apk-btn:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(61, 220, 132, 0.6);
  color: #000000;
}

/* Floating Action Button (FAB) for APK */
.floating-apk-fab {
  position: fixed;
  bottom: 85px;
  right: 20px;
  z-index: 998;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #3DDC84, #157943);
  color: #000000;
  font-weight: 900;
  font-size: 0.88rem;
  padding: 12px 20px;
  border-radius: 30px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(61, 220, 132, 0.5), 0 0 0 3px rgba(61, 220, 132, 0.2);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  animation: apkPulse 2.5s infinite ease-in-out;
}

.floating-apk-fab:hover {
  transform: translateY(-4px) scale(1.08);
  box-shadow: 0 14px 40px rgba(61, 220, 132, 0.7);
  color: #000000;
}

.floating-apk-fab i {
  font-size: 1.3rem;
}




