/* Up Cima custom frontend — dark theme, red accent, RTL, mobile-first. */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --surface-2: #232323;
  --border: #2c2c2c;
  --text: #f2f2f2;
  --muted: #b0b0b0;
  --accent: #e50914;
  --accent-hover: #f6121d;
  --gold: #f5c518;
  --radius: 10px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  line-height: 1.6;
}
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.site-main { min-height: 60vh; padding: 20px 0 40px; }
.page-title, .section-title { margin: 0 0 16px; font-weight: 900; }
.section-title { margin-top: 32px; }
.empty-note { color: var(--muted); }

/* Header */
.site-header {
  background: #000;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 12px;
  padding-bottom: 12px;
}
.logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.logo img { height: 54px; width: auto; max-width: 190px; object-fit: contain; }
.main-nav { display: flex; gap: 18px; }
.main-nav a { font-weight: 700; }
.search-form { display: flex; gap: 6px; margin-inline-start: auto; flex: 1 1 220px; max-width: 360px; }
.search-form input {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 15px;
  min-width: 0;
}
.search-form button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-weight: 700;
}
.search-form button:hover { background: var(--accent-hover); }

/* Hero */
.hero { position: relative; margin-bottom: 28px; border-radius: var(--radius); overflow: hidden; background: #000; }
.hero-slides { position: relative; min-height: 320px; }
.hero-slide { display: none; position: relative; }
.hero-slide.active { display: block; }
.hero-bg { width: 100%; height: 420px; object-fit: cover; opacity: 0.55; }
.hero-content {
  position: absolute;
  inset-inline-start: 0;
  inset-inline-end: 0;
  bottom: 0;
  padding: 28px 24px 40px;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
}
.hero-content h2 { margin: 0 0 8px; font-size: 30px; font-weight: 900; }
.hero-content p { margin: 0 0 16px; color: #ddd; max-width: 640px; }
.hero-watch, .hero-watch:visited {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 10px 26px;
  border-radius: 6px;
}
.hero-watch:hover { background: var(--accent-hover); color: #fff; }
.hero-dots { position: absolute; bottom: 12px; inset-inline-end: 20px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: calc(100% - 40px); }
.hero-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: none; background: rgba(255,255,255,0.4); padding: 0;
}
.hero-dot.active { background: var(--accent); }

/* Card rows + grids */
.card-row { margin-bottom: 28px; }
.row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.row-head h2 { margin: 0; font-size: 22px; font-weight: 900; }
.view-all { color: var(--muted); font-weight: 700; font-size: 14px; }
.row-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.row-scroll .card { flex: 0 0 150px; scroll-snap-align: start; }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
}
.card { display: block; }
.card-thumb {
  display: block;
  aspect-ratio: 2 / 3;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s; }
.card:hover .card-thumb img { transform: scale(1.05); }
.card-title { display: block; margin-top: 8px; font-weight: 700; line-height: 1.4; }
.card-meta { display: block; color: var(--muted); font-size: 13px; }

/* Detail pages */
.detail { display: flex; gap: 24px; margin-bottom: 28px; }
.detail-poster { flex: 0 0 220px; }
.detail-poster img { width: 100%; border-radius: var(--radius); }
.detail-info { flex: 1; min-width: 0; }
.detail-info h1 { margin: 0 0 10px; font-size: 30px; font-weight: 900; }
.detail-meta { display: flex; gap: 14px; color: var(--muted); margin: 0 0 12px; flex-wrap: wrap; }
.detail-genres { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.detail-genres a {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 14px;
}
.detail-desc { color: #ddd; }
.trailer-link { color: var(--accent); font-weight: 700; }

/* Cast */
.cast-section { margin-bottom: 28px; }
.cast-section h2 { font-size: 22px; font-weight: 900; margin: 0 0 12px; }
.cast-list { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.cast-item { flex: 0 0 110px; text-align: center; }
.cast-item img, .cast-no-photo {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  background: var(--surface);
}
.cast-no-photo {
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; color: var(--muted);
}
.cast-name { display: block; font-weight: 700; font-size: 14px; line-height: 1.4; }
.cast-char { display: block; color: var(--muted); font-size: 13px; }

/* Famous works (person page) */
.famous-works { margin-bottom: 28px; }
.famous-list { display: flex; flex-direction: column; gap: 10px; }
.famous-item {
  display: flex; gap: 12px; align-items: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 8px;
}
.famous-poster { width: 46px; height: 69px; object-fit: cover; border-radius: 6px; flex: 0 0 46px; }
.famous-info { min-width: 0; }
.famous-title { display: block; font-weight: 700; line-height: 1.4; }
a.famous-title:hover { color: var(--accent); }
.famous-meta { display: block; color: var(--muted); font-size: 13px; }

/* Seasons + episode pills */
.seasons { margin-bottom: 28px; }
.seasons h2 { font-size: 22px; font-weight: 900; margin: 0 0 12px; }
.season-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.season-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 700;
}
.season-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.season-panel { display: none; }
.season-panel.active { display: block; }
.ep-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.ep-pill {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
}
.ep-pill:hover { border-color: var(--accent); color: var(--text); }
.ep-pill.current { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Packs */
.pack-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.pack-box h3 { margin: 0 0 12px; font-size: 18px; }
.pack-links { display: flex; gap: 10px; flex-wrap: wrap; }
.pack-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 700;
}
.pack-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }

/* Player */
.breadcrumb { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.now-watching {
  background: var(--surface);
  border-inline-start: 4px solid var(--accent);
  padding: 10px 16px;
  margin: 0 0 16px;
  font-weight: 700;
}
.ep-title { font-size: 26px; font-weight: 900; margin: 0 0 16px; }
.view-count { color: var(--muted); font-size: 14px; margin: -8px 0 16px; }
.player-wrap { margin-bottom: 24px; }
.server-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.server-tab {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 18px;
  font-weight: 700;
}
.server-tab .quality { color: var(--muted); font-size: 12px; font-weight: 400; }
.server-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.server-tab.active .quality { color: #ffd9db; }
.player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.player-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.download-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.dl-btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 6px;
  padding: 10px 18px;
}
.dl-btn:hover { background: var(--accent-hover); color: #fff; }
.no-links {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 24px;
}
.movie-player { margin-bottom: 28px; }
.ep-nav { display: flex; gap: 12px; justify-content: space-between; margin: 20px 0; flex-wrap: wrap; }
.ep-nav-link {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 18px;
  font-weight: 700;
}
.season-eps h2 { font-size: 20px; font-weight: 900; margin: 0 0 12px; }

/* Pagination */
.pagination {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  margin-top: 28px;
  color: var(--muted);
}
.pagination a { font-weight: 700; }

/* Footer */
.site-footer { background: #000; border-top: 1px solid var(--border); padding: 28px 0; text-align: center; }
.footer-logo { margin: 0 0 12px; }
.footer-logo img { height: 72px; width: auto; max-width: 230px; object-fit: contain; margin: 0 auto; }
.footer-nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 10px; }
.footer-copy { color: var(--muted); font-size: 13px; margin: 0; }

/* 404 */
.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 72px; margin: 0; color: var(--accent); }

/* DMCA / removal request */
.dmca-page { max-width: 760px; }
.dmca-intro { color: #ddd; }
.dmca-intro-en { color: var(--muted); font-size: 14px; }
.dmca-form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.dmca-form label { display: block; margin: 14px 0 4px; font-weight: 700; }
.dmca-form label small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.dmca-form input[type=text], .dmca-form input[type=email], .dmca-form textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text); border-radius: 6px; padding: 10px; font-family: inherit; font-size: 15px;
}
.dmca-form textarea { min-height: 90px; resize: vertical; }
.dmca-form .req { color: var(--accent); }
.dmca-decl { font-weight: 400; }
.dmca-decl input { accent-color: var(--accent); }
.dmca-decl span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.dmca-submit {
  background: var(--accent); color: #fff; border: none; border-radius: 6px;
  padding: 11px 26px; font-size: 16px; font-weight: 700; margin-top: 18px;
}
.dmca-submit:hover { background: var(--accent-hover); }
.dmca-error { background: #3a1414; border: 1px solid var(--accent); border-radius: 6px; padding: 12px 16px; margin-bottom: 16px; }
.dmca-success { background: #12331a; border: 1px solid #2e9e4f; border-radius: 6px; padding: 20px; margin-top: 16px; }
.dmca-success h2 { margin: 0 0 8px; }
.dmca-note { background: var(--surface); border-inline-start: 4px solid var(--gold); padding: 10px 16px; }
/* Honeypot: off-screen, never visible to humans. */
.hp-field { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.removal-link { color: var(--muted); font-size: 13px; }

/* Mobile */
@media (max-width: 640px) {
  .header-inner { gap: 10px; }
  .logo img { height: 44px; max-width: 155px; }
  .footer-logo img { height: 62px; max-width: 200px; }
  .search-form { order: 3; max-width: none; flex-basis: 100%; }
  .hero-slides { min-height: 360px; }
  .hero-bg { height: 360px; }
  .hero-content { padding: 20px 16px 40px; max-height: 100%; overflow: hidden; }
  .hero-content h2 {
    font-size: 20px; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .hero-content p {
    font-size: 14px; line-height: 1.6; margin-bottom: 12px;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  }
  .hero-watch { padding: 9px 22px; }
  .detail { flex-direction: column; }
  .detail-poster { flex: none; max-width: 200px; }
  .detail-info h1 { font-size: 24px; }
  .row-scroll .card { flex-basis: 130px; }
  .card-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
}
