/* =============================================
   SAMBAFILEZ - Style Sheet
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0c0e14;
  --bg2: #12151e;
  --bg3: #181b26;
  --bg4: #1e2232;
  --border: #252836;
  --border2: #2e3347;
  --text: #eef0f8;
  --text2: #8890aa;
  --text3: #555d78;
  --accent: #00d4aa;
  --accent2: #00f0c0;
  --accent-glow: rgba(0,212,170,0.12);
  --red: #ff4757;
  --gold: #ffc107;
  --r: 10px;
  --r2: 14px;
}

html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

/* ── HEADER ── */
.header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(12,14,20,0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: 1400px; margin: 0 auto;
  height: 62px; display: flex; align-items: center; gap: 20px;
}
.logo {
  display: flex; align-items: center; gap: 8px;
  font-family: 'Syne', sans-serif; font-size: 20px; font-weight: 800;
  color: var(--text); text-decoration: none; flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px; background: var(--accent); border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; color: #000;
}
.accent { color: var(--accent); }

.search-bar {
  flex: 1; max-width: 460px;
  display: flex; position: relative;
}
.search-bar input {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  border-radius: 40px; padding: 9px 46px 9px 16px;
  color: var(--text); font-size: 14px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.search-bar input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.search-bar input::placeholder { color: var(--text3); }
.search-bar button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: var(--accent); border: none; border-radius: 50%;
  width: 32px; height: 32px; display: grid; place-items: center;
  cursor: pointer; color: #000; transition: background .2s;
}
.search-bar button:hover { background: var(--accent2); }

nav { display: flex; gap: 4px; margin-left: auto; }
.nav-link {
  color: var(--text2); text-decoration: none; font-size: 14px; font-weight: 500;
  padding: 6px 14px; border-radius: 40px; transition: all .2s;
}
.nav-link:hover { color: var(--text); background: var(--bg3); }

/* ── HERO ── */
.hero {
  position: relative; padding: 80px 24px 60px;
  text-align: center; overflow: hidden;
}
.hero-glow {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 0%, rgba(0,212,170,0.07) 0%, transparent 70%);
  pointer-events: none;
}
.hero-content { position: relative; max-width: 620px; margin: 0 auto; }
.hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4.5vw, 50px);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -1px; margin-bottom: 14px;
}
.hero p { color: var(--text2); font-size: 16px; margin-bottom: 24px; }
.hero-pills {
  display: flex; justify-content: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 32px;
}
.hero-pills span {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 40px; padding: 5px 14px;
  font-size: 13px; color: var(--text2);
}
.hero-search {
  display: flex; gap: 10px;
  max-width: 520px; margin: 0 auto;
}
.hero-search input {
  flex: 1; background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 18px;
  color: var(--text); font-size: 15px; font-family: 'Inter', sans-serif;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.hero-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.hero-search input::placeholder { color: var(--text3); }
.hero-search button {
  background: var(--accent); color: #000; border: none;
  border-radius: 12px; padding: 14px 28px;
  font-size: 15px; font-weight: 600; font-family: 'Syne', sans-serif;
  cursor: pointer; transition: background .2s, transform .1s;
  white-space: nowrap;
}
.hero-search button:hover { background: var(--accent2); transform: translateY(-1px); }

/* ── SECTIONS ── */
.section { max-width: 1400px; margin: 0 auto; padding: 40px 24px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
}
.section-head h2 { font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800; }
.see-all { color: var(--accent); font-size: 14px; text-decoration: none; font-weight: 500; }
.see-all:hover { color: var(--accent2); }
.count { color: var(--text3); font-size: 14px; }

/* ── MOVIE GRID ── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 18px;
}

/* ── MOVIE CARD ── */
.card {
  background: var(--bg2); border-radius: var(--r2);
  overflow: hidden; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid var(--border);
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.5); }
.card-poster {
  position: relative; aspect-ratio: 2/3; overflow: hidden;
  background: var(--bg3);
}
.card-poster img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.card:hover .card-poster img { transform: scale(1.05); }
.card-no-img {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3); font-size: 40px;
}
.card-badge {
  position: absolute; top: 8px; left: 8px;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  border-radius: 6px; padding: 3px 7px;
  font-size: 11px; font-weight: 600; color: var(--text);
  text-transform: uppercase; letter-spacing: .5px;
}
.card-rating {
  position: absolute; top: 8px; right: 8px;
  background: rgba(0,0,0,0.75); backdrop-filter: blur(6px);
  border-radius: 6px; padding: 3px 7px;
  font-size: 11px; font-weight: 700; color: var(--gold);
  display: flex; align-items: center; gap: 3px;
}
.card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, transparent 60%);
  opacity: 0; transition: opacity .2s;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 16px; gap: 8px;
}
.card:hover .card-overlay { opacity: 1; }
.btn-dl, .btn-play {
  border: none; border-radius: 8px; padding: 8px 14px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background .2s, transform .1s;
}
.btn-dl { background: var(--accent); color: #000; }
.btn-dl:hover { background: var(--accent2); }
.btn-play { background: rgba(255,255,255,0.15); color: #fff; }
.btn-play:hover { background: rgba(255,255,255,0.25); }
.card-info { padding: 12px; }
.card-title {
  font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.card-meta { font-size: 12px; color: var(--text2); }
.card-genres { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.genre-tag {
  background: var(--bg4); border-radius: 4px;
  padding: 2px 7px; font-size: 11px; color: var(--text3);
}
.dl-btn-full {
  display: block; width: calc(100% - 24px); margin: 0 12px 12px;
  background: var(--accent); color: #000; border: none;
  border-radius: 8px; padding: 9px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background .15s;
  font-family: 'Inter', sans-serif;
}
.dl-btn-full:hover { background: var(--accent2); }

/* ── SKELETON ── */
.skeletons {
  display: contents;
}
.card.skeleton {
  pointer-events: none;
  height: 300px;
  background: var(--bg2);
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; }
  50% { opacity:.4; }
}

/* ── PAGINATION ── */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.page-btn {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 8px; padding: 8px 14px;
  font-size: 14px; cursor: pointer; transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.page-btn:hover, .page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); }

/* ── MODAL OVERLAY ── */
.modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(8px);
  z-index: 500; display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }

/* ── DOWNLOAD MODAL ── */
.modal {
  background: var(--bg2); border: 1px solid var(--border2);
  border-radius: 20px; width: 100%; max-width: 680px;
  max-height: 90vh; overflow-y: auto;
  position: relative; padding: 28px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
}
.modal-close {
  position: absolute; top: 18px; right: 18px;
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); border-radius: 50%;
  width: 36px; height: 36px; display: grid; place-items: center;
  cursor: pointer; transition: all .2s; z-index: 10;
}
.modal-close:hover { background: var(--border2); color: var(--text); }
.modal-title {
  font-family: 'Syne', sans-serif; font-size: 22px; font-weight: 800;
  margin-bottom: 20px;
}

/* ── MODAL MOVIE INFO CARD ── */
.movie-info-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
  display: flex; gap: 16px; margin-bottom: 24px;
}
.movie-info-poster {
  width: 90px; flex-shrink: 0;
  border-radius: 8px; overflow: hidden; aspect-ratio: 2/3;
  background: var(--bg4);
}
.movie-info-poster img { width: 100%; height: 100%; object-fit: cover; }
.movie-info-text { flex: 1; min-width: 0; }
.movie-info-text h3 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.movie-info-date { color: var(--accent); font-size: 13px; margin-bottom: 8px; }
.movie-info-desc {
  color: var(--text2); font-size: 13px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 10px;
}
.movie-info-genres { display: flex; gap: 6px; flex-wrap: wrap; }
.info-genre {
  background: var(--bg4); border: 1px solid var(--border);
  border-radius: 20px; padding: 3px 10px;
  font-size: 12px; color: var(--text2);
}

/* ── QUALITY SECTION ── */
.dl-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 800;
  margin-bottom: 14px;
}
.dl-section-icon {
  width: 32px; height: 32px; background: var(--accent-glow);
  border: 1px solid rgba(0,212,170,0.3); border-radius: 8px;
  display: grid; place-items: center; font-size: 16px;
}
.quality-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 24px;
}
.quality-card {
  background: var(--bg3); border: 1px solid var(--border2);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; transition: all .2s;
  text-decoration: none; display: block;
}
.quality-card:hover {
  border-color: var(--accent);
  background: var(--bg4);
  transform: translateY(-2px);
}
.quality-label { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.quality-format { font-size: 12px; color: var(--text3); margin-bottom: 2px; }
.quality-size { font-size: 12px; color: var(--text2); font-weight: 500; }

/* ── SUBTITLE SECTION ── */
.subtitle-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.subtitle-card {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px;
  cursor: pointer; transition: all .15s;
  text-decoration: none; display: block;
}
.subtitle-card:hover { border-color: var(--accent); background: var(--bg4); }
.subtitle-lang { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.subtitle-size { font-size: 11px; color: var(--text3); }

/* ── FALLBACK BUTTONS ── */
.fallback-note {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px; margin-bottom: 16px;
  color: var(--text2); font-size: 13px; line-height: 1.6;
}
.fallback-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.fallback-btn {
  background: var(--bg3); border: 1px solid var(--border2);
  color: var(--text); border-radius: 10px; padding: 10px 18px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  text-decoration: none; transition: all .2s;
  font-family: 'Inter', sans-serif;
}
.fallback-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ── MODAL LOADING ── */
.modal-loading {
  display: flex; flex-direction: column; align-items: center;
  padding: 40px 0; gap: 16px; color: var(--text2);
}
.spinner {
  width: 40px; height: 40px;
  border: 3px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── PLAYER MODAL ── */
.player-modal { max-width: 1000px; }
.player-wrap {
  position: relative; padding-bottom: 56.25%;
  height: 0; border-radius: 12px; overflow: hidden;
  background: #000; margin-top: 4px;
}
.player-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%; border: none;
}

/* ── FOOTER ── */
.footer { text-align: center; padding: 40px 24px; color: var(--text3); font-size: 13px; border-top: 1px solid var(--border); margin-top: 40px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .header-inner { gap: 12px; }
  nav { display: none; }
  .search-bar { max-width: none; flex: 1; }
  .hero h1 { font-size: 28px; }
  .hero-search { flex-direction: column; }
  .hero-search button { width: 100%; }
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
  .subtitle-grid { grid-template-columns: repeat(2, 1fr); }
  .movie-info-card { flex-direction: column; }
  .movie-info-poster { width: 100%; max-width: 120px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
}
@media (max-width: 480px) {
  .quality-grid { grid-template-columns: 1fr 1fr; }
  .subtitle-grid { grid-template-columns: 1fr 1fr; }
}
