* { margin:0; padding:0; box-sizing:border-box; }
body {
  font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  background:#0f0f0f; color:#eee;
  min-height:100vh;
}
a { color:#5a9eff; text-decoration:none; }

#navbar {
  position:fixed; top:0; left:0; right:0; z-index:100;
  background:#1a1a2e; border-bottom:1px solid #2a2a4a;
}
.nav-inner {
  max-width:1200px; margin:0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 20px; gap:12px;
}
.logo { font-size:1.4rem; font-weight:700; color:#e94560; white-space:nowrap; }

.tabs { display:flex; gap:4px; }
.tab-btn {
  background:transparent; color:#888; border:1px solid #3a3a5a;
  border-radius:6px; padding:8px 16px; cursor:pointer; font-size:0.85rem;
  white-space:nowrap;
}
.tab-btn:hover { color:#eee; border-color:#5a5a7a; }
.tab-btn.active { background:#e94560; color:#fff; border-color:#e94560; }

.nav-right { display:flex; align-items:center; gap:6px; }
.search-box { display:flex; gap:4px; }
.search-box input {
  background:#16213e; border:1px solid #2a2a4a; border-radius:6px;
  color:#eee; padding:8px 14px; width:200px; font-size:0.9rem;
  outline:none;
}
.search-box input:focus { border-color:#e94560; }
.search-box button {
  background:#e94560; color:#fff; border:none; border-radius:6px;
  padding:8px 14px; cursor:pointer; font-weight:600; font-size:0.85rem;
}
.search-box button:hover { background:#d63851; }
#filterBtn.active { background:#2a7a3a; color:#fff; border-color:#2a7a3a; }
#filterBtn { transition:all .2s; }
.settings-btn {
  background:transparent; color:#888; border:1px solid #3a3a5a; border-radius:6px;
  padding:8px 12px; cursor:pointer; font-size:0.8rem;
}
.settings-btn:hover { color:#eee; border-color:#5a5a7a; }

#main-content { max-width:1200px; margin:0 auto; padding:80px 20px 40px; }

h2 { font-size:1.5rem; margin:30px 0 16px; color:#ddd; }
h3 { font-size:1.2rem; margin:20px 0 12px; color:#ccc; }

.movie-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(160px,1fr));
  gap:16px;
}
.movie-card {
  cursor:pointer; border-radius:8px; overflow:hidden;
  background:#1a1a2e; transition:transform .2s,box-shadow .2s;
}
.movie-card:hover { transform:translateY(-4px); box-shadow:0 8px 24px rgba(233,69,96,.2); }
.movie-card img {
  width:100%; aspect-ratio:2/3; object-fit:cover;
  display:block; background:#2a2a4a;
}
.movie-card .card-body { padding:10px; }
.movie-card .title {
  font-size:0.85rem; font-weight:600; white-space:nowrap;
  overflow:hidden; text-overflow:ellipsis;
}
.movie-card .meta {
  font-size:0.75rem; color:#888; margin-top:4px;
  display:flex; justify-content:space-between;
}
.movie-card .rating { color:#ffc107; }
.movie-card .year { color:#666; }
.movie-card .media-type {
  position:absolute; top:8px; right:8px;
  background:rgba(233,69,96,.85); color:#fff;
  font-size:0.65rem; padding:2px 6px; border-radius:4px;
  font-weight:600;
}
.movie-card { position:relative; }

.cast-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(120px,1fr));
  gap:12px;
}
.cast-card {
  text-align:center; background:#1a1a2e; border-radius:8px;
  padding:10px; overflow:hidden;
}
.cast-card img {
  width:80px; height:80px; border-radius:50%; object-fit:cover;
  display:block; margin:0 auto 8px; background:#2a2a4a;
}
.cast-card .name { font-size:0.8rem; font-weight:600; }
.cast-card .role { font-size:0.7rem; color:#888; margin-top:2px; }

.back-btn {
  background:#2a2a4a; color:#eee; border:none; border-radius:6px;
  padding:10px 20px; cursor:pointer; font-size:0.9rem; margin-bottom:20px;
}
.back-btn:hover { background:#3a3a5a; }

#detailContent { display:flex; gap:30px; flex-wrap:wrap; }
.detail-poster { flex-shrink:0; }
.detail-poster img { width:300px; border-radius:10px; box-shadow:0 4px 20px rgba(0,0,0,.5); }
.detail-info { flex:1; min-width:280px; }
.detail-info h1 { font-size:2rem; margin-bottom:4px; }
.detail-info .tagline { font-size:1rem; color:#888; margin-bottom:16px; }
.detail-info .overview { line-height:1.6; color:#bbb; margin-bottom:16px; }
.detail-info .detail-meta { display:flex; gap:20px; flex-wrap:wrap; margin-bottom:12px; }
.detail-info .detail-meta span { font-size:0.9rem; color:#999; }
.detail-info .genres { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.detail-info .genres span {
  background:#2a2a4a; padding:4px 12px; border-radius:20px; font-size:0.8rem;
}
.detail-info .episode-selector {
  display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-bottom:16px;
}
.detail-info .episode-selector select {
  background:#16213e; color:#eee; border:1px solid #2a2a4a;
  border-radius:6px; padding:8px 12px; font-size:0.9rem; outline:none;
}
.watch-btn {
  display:inline-block; background:#e94560; color:#fff;
  border:none; border-radius:8px; padding:14px 40px;
  font-size:1.1rem; font-weight:700; cursor:pointer; margin-top:10px;
}
.watch-btn:hover { background:#d63851; }
.watch-btn.secondary { background:#2a2a4a; margin-left:10px; }
.watch-btn.secondary:hover { background:#3a3a5a; }
.watch-btn.trailer-btn { background:#1a1a2e; border:1px solid #5a5a7a; }

#playerContent iframe {
  width:100%; max-width:1000px; height:calc(100vw * 9/20);
  max-height:80vh; border:none; border-radius:10px;
  display:block; margin:0 auto;
}
.player-shell {
  position:relative; max-width:1000px; margin:0 auto;
}
.player-shell iframe {
  width:100%; height:calc(100vw * 9/20); max-height:80vh;
  border:none; border-radius:10px; display:block;
}
.player-shield {
  position:absolute; inset:0; z-index:10;
  background:rgba(26,26,46,0.82); border-radius:10px;
  display:flex; flex-direction:column; gap:12px;
  align-items:center; justify-content:center; cursor:pointer;
  transition:opacity 0.2s;
}
.player-shield:hover { background:rgba(26,26,46,0.7); }
.shield-play {
  width:80px; height:80px; border-radius:50%;
  background:#e94560; color:#fff; font-size:2rem;
  display:flex; align-items:center; justify-content:center;
  padding-left:6px; box-shadow:0 4px 20px rgba(233,69,96,0.5);
}
.shield-text { color:#ccc; font-size:1rem; }
.source-selector {
  display:flex; gap:8px; flex-wrap:wrap; margin:16px 0;
  justify-content:center;
}
.source-btn {
  background:#2a2a4a; color:#ccc; border:1px solid #3a3a5a;
  border-radius:6px; padding:8px 16px; cursor:pointer; font-size:0.85rem;
}
.source-btn.active { background:#e94560; color:#fff; border-color:#e94560; }
.source-btn:hover { background:#3a3a5a; }

#searchLoadMore { text-align:center; margin:30px 0; }
#searchLoadMore button {
  background:#2a2a4a; color:#eee; border:none; border-radius:6px;
  padding:12px 30px; cursor:pointer; font-size:1rem;
}
#searchLoadMore button:hover { background:#3a3a5a; }

.setup-box {
  max-width:500px; margin:80px auto; text-align:center;
  background:#1a1a2e; border-radius:12px; padding:40px;
}
.setup-box h2 { margin-top:0; }
.setup-box p { margin-bottom:20px; line-height:1.6; color:#aaa; }
.setup-box input {
  width:100%; background:#16213e; border:1px solid #2a2a4a;
  border-radius:6px; color:#eee; padding:12px 16px; font-size:1rem;
  margin-bottom:16px; outline:none;
}
.setup-box button {
  background:#e94560; color:#fff; border:none; border-radius:6px;
  padding:12px 30px; cursor:pointer; font-size:1rem; font-weight:600;
}
.setup-box button:hover { background:#d63851; }

.loading { text-align:center; padding:40px; color:#666; }

#category-bar {
  display:flex; gap:8px; flex-wrap:wrap;
  margin:20px 0 0; padding:12px 0;
  border-top:1px solid #2a2a4a;
}
.category-btn {
  background:transparent; color:#888; border:1px solid #3a3a5a;
  border-radius:20px; padding:8px 18px; cursor:pointer;
  font-size:0.82rem; font-weight:500; transition:all .2s;
  white-space:nowrap;
}
.category-btn:hover { color:#eee; border-color:#5a5a7a; }
.category-btn.active { background:#e94560; color:#fff; border-color:#e94560; }

@media(max-width:700px) {
  #category-bar { justify-content:center; }
  .category-btn { font-size:0.75rem; padding:6px 14px; }
  .nav-inner { flex-wrap:wrap; }
  .tabs { order:3; width:100%; justify-content:center; }
  .search-box input { width:140px; }
  .movie-grid { grid-template-columns:repeat(auto-fill,minmax(130px,1fr)); gap:12px; }
  #detailContent { flex-direction:column; align-items:center; }
  .detail-poster img { width:100%; max-width:300px; }
  .detail-info h1 { font-size:1.5rem; }
}
