/* Clean Bootstrap-like light theme + mobile optimized */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.42857143;
  color: #333;
  background: #f5f5f5;
}

a { color: #337ab7; text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }

.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 15px; }

.topbar { background: #fff; border-bottom: 1px solid #ddd; margin-bottom: 12px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 50px; gap: 10px; }
.logo-text { display: inline-flex; align-items: center; gap: 8px; color: #333; font-size: 18px; font-weight: 600; }
.logo-mark { width: 20px; height: 20px; }
.custom-logo {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
.menu { display: flex; gap: 8px; flex-wrap: wrap; }
.menu a { color: #555; padding: 6px 11px; border: 1px solid transparent; border-radius: 4px; }
.menu a.active, .menu a:hover { color: #333; background: #f5f5f5; border-color: #ddd; text-decoration: none; }

.page-head { margin-bottom: 12px; }
.page-head h1, h1 { margin: 0 0 8px; font-size: 26px; font-weight: 500; line-height: 1.15; }
.meta { margin: 0 0 8px; color: #777; font-size: 13px; }

.form { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 14px; margin-bottom: 12px; }
.form h3 { margin: 0 0 10px; font-size: 20px; font-weight: 500; }
label { display: inline-block; margin-bottom: 5px; font-weight: 700; }

input, textarea, select, button {
  display: block;
  width: 100%;
  margin-bottom: 9px;
  padding: 6px 11px;
  font-size: 14px;
  line-height: 1.42857143;
  color: #555;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
}
input:focus, textarea:focus, select:focus {
  border-color: #66afe9;
  outline: 0;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}
textarea { resize: vertical; }

button { background: #337ab7; color: #fff; border-color: #2e6da4; cursor: pointer; }
button:hover { background: #286090; border-color: #204d74; }

.btn-link {
  display: inline-block;
  width: auto;
  margin-bottom: 0;
  padding: 6px 12px;
  color: #fff;
  background: #337ab7;
  border: 1px solid #2e6da4;
  border-radius: 4px;
  text-decoration: none;
}
.btn-link:hover { color: #fff; background: #286090; border-color: #204d74; text-decoration: none; }
.btn-link.subtle { color: #333; background: #fff; border-color: #ccc; }
.btn-link.subtle:hover { color: #333; background: #e6e6e6; border-color: #adadad; }
.btn-danger { width: auto; color: #fff; background: #d9534f; border-color: #d43f3a; }
.btn-danger:hover { background: #c9302c; border-color: #ac2925; }

.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline .btn-link, .inline button, .inline input, .inline select { width: auto; margin-bottom: 0; }

.alert { padding: 10px 14px; margin-bottom: 12px; border: 1px solid #bce8f1; border-radius: 4px; color: #31708f; background: #d9edf7; }
.error { color: #a94442; background: #f2dede; border-color: #ebccd1; }

/* compact listing cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.card { background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.poster-link { display: block; line-height: 0; }
.poster { width: 100%; height: 215px; object-fit: cover; background: #eee; }
.content { padding: 8px; }
.title { margin: 0 0 5px; font-size: 14px; line-height: 1.25; }
.title a { color: #333; }
.title a:hover { color: #23527c; }
.card-home .title { min-height: 0; display: block; }
.grid .meta { margin-bottom: 4px; font-size: 12px; }

.filters { display: grid; grid-template-columns: 1fr 220px auto auto; gap: 8px; align-items: end; }
.actors-filters { grid-template-columns: minmax(170px, 1.2fr) repeat(4, minmax(110px, 1fr)) auto auto; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: #777; font-size: 12px; }

.pagination { margin: 12px 0 16px; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.page-pill { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #555; }
.disabled { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; color: #999; background: #f9f9f9; }

.movie-detail { display: grid; grid-template-columns: 160px 1fr; gap: 12px; }
.movie-detail > .poster { width: 100%; height: auto; aspect-ratio: 2 / 3; border: 1px solid #ddd; border-radius: 4px; }
.watch-title { margin: 0 0 10px; font-size: 22px; font-weight: 500; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.meta-chip { display: inline-block; padding: 3px 10px; border: 1px solid #ddd; border-radius: 14px; background: #f7f7f7; color: #555; font-size: 12px; }
.watch-description { border: 1px solid #ddd; background: #fcfcfc; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.watch-description h3 { margin: 0 0 6px; font-size: 16px; }
.watch-description p { margin: 0; color: #555; }

.player-wrap { border: 1px solid #ddd; border-radius: 4px; overflow: hidden; margin-bottom: 10px; background: #000; }
.stream-frame, .video-player { display: block; width: 100%; height: 420px; border: 0; background: #000; }
.server-select { margin-bottom: 10px; }
.watch-actions { margin-bottom: 8px; }
.watch-actions .btn-link { margin-right: 6px; }
.share-btn { background: #fff; color: #333; border: 1px solid #ccc; }
.share-btn:hover { background: #e6e6e6; border-color: #adadad; }

.ads-box { border: 1px dashed #ccc; background: #fafafa; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.ads-box strong { font-size: 12px; color: #777; }
.ads-box p { margin: 5px 0 0; color: #555; }

.related-list { display: grid; gap: 8px; }
.related-item { display: inline-block; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; background: #f7f7f7; color: #333; }
.related-item:hover { background: #efefef; text-decoration: none; }

.actors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.actor-card { display: grid; grid-template-columns: 56px 1fr; gap: 10px; border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 9px; }
.actor-card img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: #eee; }
.actor-card strong { margin-bottom: 4px; font-size: 14px; }

.movie-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.movie-row:last-child { border-bottom: 0; }
.auth-card { max-width: 420px; }

.footer { margin-top: 18px; border-top: 1px solid #ddd; background: #fff; }
.footer-inner { padding: 12px 0; }
.footer p { margin: 0; color: #777; font-size: 12px; text-align: center; }
pre { padding: 10px; background: #f7f7f7; border: 1px solid #ccc; border-radius: 4px; overflow: auto; }

/* tablet */
@media (max-width: 991px) {
  .topbar-inner { min-height: 48px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .actors-filters { grid-template-columns: 1fr 1fr 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 8px; }
  .poster { height: 190px; }
  .stream-frame, .video-player { height: 320px; }
}

/* phones */
@media (max-width: 767px) {
  .container { padding: 0 10px; }
  .menu { justify-content: flex-start; gap: 6px; }
  .menu a { padding: 6px 9px; font-size: 13px; }
  .page-head h1, h1 { font-size: 22px; }
  .form { padding: 10px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .actors-filters { grid-template-columns: 1fr 1fr; }
  .movie-detail { grid-template-columns: 104px 1fr; gap: 10px; }
  .stream-frame, .video-player { height: 250px; }
  .watch-actions { display: flex; gap: 6px; flex-wrap: wrap; }
  .watch-actions .btn-link, .watch-actions .share-btn { width: auto; }
  .actors-grid { grid-template-columns: 1fr; }
}

/* small phones */
@media (max-width: 480px) {
  body { font-size: 13px; }
  .topbar-inner { min-height: 44px; align-items: flex-start; padding: 6px 0; flex-direction: column; }
  .logo-text { font-size: 16px; }
  .menu { width: 100%; }
  .menu a { flex: 1 1 auto; text-align: center; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  .poster { height: 128px; }
  .content { padding: 7px; }
  .title { font-size: 12px; margin-bottom: 4px; }
  .meta { font-size: 11px; margin-bottom: 5px; }
  .filters, .actors-filters { grid-template-columns: 1fr; }
  .stats { gap: 8px; font-size: 11px; }
  .pagination { gap: 6px; }
  .movie-detail { grid-template-columns: 82px 1fr; gap: 8px; }
  .watch-title { font-size: 18px; }
  .stream-frame, .video-player { height: 210px; }
  .btn-link, .btn-link.subtle, button { min-height: 34px; }
  .watch-actions .btn-link, .watch-actions .share-btn { width: 100%; text-align: center; margin-right: 0; }
}
/* Bootstrap 3.4 inspired light theme (compact grid) */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background: #f5f5f5; }
a { color: #337ab7; text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }

.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.topbar { background: #fff; border-bottom: 1px solid #ddd; margin-bottom: 15px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 50px; }
.logo-text { display: inline-flex; align-items: center; gap: 8px; color: #333; font-size: 18px; font-weight: 600; }
.logo-mark { width: 20px; height: 20px; }
.menu { display: flex; gap: 8px; flex-wrap: wrap; }
.menu a { color: #555; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px; }
.menu a.active, .menu a:hover { color: #333; background: #f5f5f5; border-color: #ddd; text-decoration: none; }

.page-head { margin-bottom: 15px; }
.page-head h1, h1 { margin: 0 0 8px; font-size: 28px; font-weight: 500; line-height: 1.1; }
.meta { margin: 0 0 8px; color: #777; font-size: 13px; }

.form { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 15px; margin-bottom: 15px; }
.form h3 { margin: 0 0 12px; font-size: 20px; font-weight: 500; }
label { display: inline-block; margin-bottom: 5px; font-weight: 700; }
input, textarea, select, button {
  display: block; width: 100%; margin-bottom: 10px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143;
  color: #555; background: #fff; border: 1px solid #ccc; border-radius: 4px;
}
input:focus, textarea:focus, select:focus { border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6); }
textarea { resize: vertical; }
button { background: #337ab7; color: #fff; border-color: #2e6da4; cursor: pointer; }
button:hover { background: #286090; border-color: #204d74; }

.btn-link { display: inline-block; width: auto; margin-bottom: 0; padding: 6px 12px; color: #fff; background: #337ab7; border: 1px solid #2e6da4; border-radius: 4px; text-decoration: none; }
.btn-link:hover { color: #fff; background: #286090; border-color: #204d74; text-decoration: none; }
.btn-link.subtle { color: #333; background: #fff; border-color: #ccc; }
.btn-link.subtle:hover { color: #333; background: #e6e6e6; border-color: #adadad; }
.btn-danger { width: auto; color: #fff; background: #d9534f; border-color: #d43f3a; }
.btn-danger:hover { background: #c9302c; border-color: #ac2925; }

.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline .btn-link, .inline button, .inline input, .inline select { width: auto; margin-bottom: 0; }

.alert { padding: 10px 15px; margin-bottom: 15px; border: 1px solid #bce8f1; border-radius: 4px; color: #31708f; background: #d9edf7; }
.error { color: #a94442; background: #f2dede; border-color: #ebccd1; }

/* compact catalog grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
.card { background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.poster-link { display: block; line-height: 0; position: relative; }
.poster-link::after { display: none; }
.poster { width: 100%; height: 215px; object-fit: cover; background: #eee; }
.content { padding: 9px; }
.title { margin: 0 0 6px; font-size: 14px; line-height: 1.25; }
.title a { color: #333; }
.title a:hover { color: #23527c; }
.card-home .title { min-height: 0; display: block; }
.grid .meta { margin-bottom: 5px; font-size: 12px; }

.filters { display: grid; grid-template-columns: 1fr 220px auto auto; gap: 8px; align-items: end; }
.actors-filters { grid-template-columns: minmax(180px, 1.2fr) repeat(4, minmax(120px, 1fr)) auto auto; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: #777; font-size: 12px; }
.pagination { margin: 15px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.page-pill { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #555; }
.disabled { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; color: #999; background: #f9f9f9; }

.movie-detail { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.movie-detail > .poster { width: 100%; height: auto; aspect-ratio: 2 / 3; border: 1px solid #ddd; border-radius: 4px; }
.watch-title { margin: 0 0 10px; font-size: 22px; font-weight: 500; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.meta-chip { display: inline-block; padding: 3px 10px; border: 1px solid #ddd; border-radius: 14px; background: #f7f7f7; color: #555; font-size: 12px; }
.watch-description { border: 1px solid #ddd; background: #fcfcfc; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.watch-description h3 { margin: 0 0 6px; font-size: 16px; }
.watch-description p { margin: 0; color: #555; }

.player-wrap { border: 1px solid #ddd; border-radius: 4px; overflow: hidden; margin-bottom: 10px; background: #000; }
.stream-frame, .video-player { display: block; width: 100%; height: 460px; border: 0; background: #000; }
.server-select { margin-bottom: 10px; }
.watch-actions { margin-bottom: 8px; }
.share-btn { background: #fff; color: #333; border: 1px solid #ccc; }
.share-btn:hover { background: #e6e6e6; border-color: #adadad; }

.ads-box { border: 1px dashed #ccc; background: #fafafa; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.ads-box strong { font-size: 12px; color: #777; }
.ads-box p { margin: 5px 0 0; color: #555; }

.related-list { display: grid; gap: 8px; }
.related-item { display: inline-block; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; background: #f7f7f7; color: #333; }
.related-item:hover { background: #efefef; text-decoration: none; }

.actors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.actor-card { display: grid; grid-template-columns: 60px 1fr; gap: 10px; border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 10px; }
.actor-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; background: #eee; }
.actor-card strong { margin-bottom: 4px; font-size: 14px; }

.movie-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.movie-row:last-child { border-bottom: 0; }
.auth-card { max-width: 420px; }
.footer { margin-top: 20px; border-top: 1px solid #ddd; background: #fff; }
.footer-inner { padding: 12px 0; }
.footer p { margin: 0; color: #777; font-size: 12px; text-align: center; }
pre { padding: 10px; background: #f7f7f7; border: 1px solid #ccc; border-radius: 4px; overflow: auto; }

@media (max-width: 991px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .actors-filters { grid-template-columns: 1fr 1fr 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 9px; }
  .poster { height: 195px; }
}
@media (max-width: 767px) {
  .menu { justify-content: flex-start; }
  .movie-detail { grid-template-columns: 110px 1fr; }
  .stream-frame, .video-player { height: 300px; }
  .actors-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .topbar-inner { min-height: 46px; }
  .logo-text { font-size: 16px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .poster { height: 135px; }
  .movie-detail { grid-template-columns: 90px 1fr; gap: 10px; }
  .content { padding: 8px; }
  .title { font-size: 13px; }
  .meta { font-size: 12px; }
  .actors-filters { grid-template-columns: 1fr; }
}
/* Bootstrap 3.4 inspired light theme */
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.42857143; color: #333; background: #f5f5f5; }
a { color: #337ab7; text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }

.container { width: 100%; max-width: 1170px; margin: 0 auto; padding: 0 15px; }
.topbar { background: #fff; border-bottom: 1px solid #ddd; margin-bottom: 15px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; min-height: 50px; }
.logo-text { display: inline-flex; align-items: center; gap: 8px; color: #333; font-size: 18px; font-weight: 600; }
.logo-mark { width: 20px; height: 20px; }
.menu { display: flex; gap: 8px; flex-wrap: wrap; }
.menu a { color: #555; padding: 6px 12px; border: 1px solid transparent; border-radius: 4px; }
.menu a.active, .menu a:hover { color: #333; background: #f5f5f5; border-color: #ddd; text-decoration: none; }

.page-head { margin-bottom: 15px; }
.page-head h1, h1 { margin: 0 0 8px; font-size: 28px; font-weight: 500; line-height: 1.1; }
.meta { margin: 0 0 8px; color: #777; font-size: 13px; }

.form { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 15px; margin-bottom: 15px; }
.form h3 { margin: 0 0 12px; font-size: 20px; font-weight: 500; }
label { display: inline-block; margin-bottom: 5px; font-weight: 700; }
input, textarea, select, button {
  display: block; width: 100%; margin-bottom: 10px; padding: 6px 12px; font-size: 14px; line-height: 1.42857143;
  color: #555; background: #fff; border: 1px solid #ccc; border-radius: 4px;
}
input:focus, textarea:focus, select:focus { border-color: #66afe9; outline: 0; box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6); }
textarea { resize: vertical; }
button { background: #337ab7; color: #fff; border-color: #2e6da4; cursor: pointer; }
button:hover { background: #286090; border-color: #204d74; }

.btn-link { display: inline-block; width: auto; margin-bottom: 0; padding: 6px 12px; color: #fff; background: #337ab7; border: 1px solid #2e6da4; border-radius: 4px; text-decoration: none; }
.btn-link:hover { color: #fff; background: #286090; border-color: #204d74; text-decoration: none; }
.btn-link.subtle { color: #333; background: #fff; border-color: #ccc; }
.btn-link.subtle:hover { color: #333; background: #e6e6e6; border-color: #adadad; }
.btn-danger { width: auto; color: #fff; background: #d9534f; border-color: #d43f3a; }
.btn-danger:hover { background: #c9302c; border-color: #ac2925; }

.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.inline .btn-link, .inline button, .inline input, .inline select { width: auto; margin-bottom: 0; }

.alert { padding: 10px 15px; margin-bottom: 15px; border: 1px solid #bce8f1; border-radius: 4px; color: #31708f; background: #d9edf7; }
.error { color: #a94442; background: #f2dede; border-color: #ebccd1; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 15px; }
.card { background: #fff; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; }
.poster-link { display: block; line-height: 0; position: relative; }
.poster-link::after { display: none; }
.poster { width: 100%; height: 290px; object-fit: cover; background: #eee; }
.content { padding: 12px; }
.title { margin: 0 0 8px; font-size: 16px; line-height: 1.3; }
.title a { color: #333; }
.title a:hover { color: #23527c; }
.card-home .title { min-height: 0; display: block; }

.filters { display: grid; grid-template-columns: 1fr 220px auto auto; gap: 8px; align-items: end; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; color: #777; font-size: 13px; }
.pagination { margin: 15px 0; display: flex; align-items: center; justify-content: center; gap: 10px; }
.page-pill { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #555; }
.disabled { padding: 6px 12px; border: 1px solid #ddd; border-radius: 4px; color: #999; background: #f9f9f9; }

.movie-detail { display: grid; grid-template-columns: 180px 1fr; gap: 15px; }
.movie-detail > .poster { width: 100%; height: auto; aspect-ratio: 2 / 3; border: 1px solid #ddd; border-radius: 4px; }
.watch-title { margin: 0 0 10px; font-size: 24px; font-weight: 500; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.meta-chip { display: inline-block; padding: 3px 10px; border: 1px solid #ddd; border-radius: 14px; background: #f7f7f7; color: #555; font-size: 12px; }
.watch-description { border: 1px solid #ddd; background: #fcfcfc; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.watch-description h3 { margin: 0 0 6px; font-size: 16px; }
.watch-description p { margin: 0; color: #555; }

.player-wrap { border: 1px solid #ddd; border-radius: 4px; overflow: hidden; margin-bottom: 10px; background: #000; }
.stream-frame, .video-player { display: block; width: 100%; height: 460px; border: 0; background: #000; }
.server-select { margin-bottom: 10px; }
.watch-actions { margin-bottom: 8px; }
.share-btn { background: #fff; color: #333; border: 1px solid #ccc; }
.share-btn:hover { background: #e6e6e6; border-color: #adadad; }

.ads-box { border: 1px dashed #ccc; background: #fafafa; border-radius: 4px; padding: 10px; margin-bottom: 10px; }
.ads-box strong { font-size: 12px; color: #777; }
.ads-box p { margin: 5px 0 0; color: #555; }

.related-list { display: grid; gap: 8px; }
.related-item { display: inline-block; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; background: #f7f7f7; color: #333; }
.related-item:hover { background: #efefef; text-decoration: none; }

.actors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.actor-card { display: grid; grid-template-columns: 60px 1fr; gap: 10px; border: 1px solid #ddd; background: #fff; border-radius: 4px; padding: 10px; }
.actor-card img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; background: #eee; }
.actor-card strong { margin-bottom: 4px; font-size: 14px; }

.movie-row { padding: 10px 0; border-bottom: 1px solid #eee; }
.movie-row:last-child { border-bottom: 0; }
.auth-card { max-width: 420px; }

.footer { margin-top: 20px; border-top: 1px solid #ddd; background: #fff; }
.footer-inner { padding: 12px 0; }
.footer p { margin: 0; color: #777; font-size: 12px; text-align: center; }

pre { padding: 10px; background: #f7f7f7; border: 1px solid #ccc; border-radius: 4px; overflow: auto; }

@media (max-width: 991px) {
  .filters { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .poster { height: 240px; }
}
@media (max-width: 767px) {
  .menu { justify-content: flex-start; }
  .movie-detail { grid-template-columns: 120px 1fr; }
  .stream-frame, .video-player { height: 300px; }
}
@media (max-width: 480px) {
  .topbar-inner { min-height: 46px; }
  .logo-text { font-size: 16px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .poster { height: 170px; }
  .movie-detail { grid-template-columns: 90px 1fr; gap: 10px; }
  .content { padding: 10px; }
  .title { font-size: 14px; }
  .meta { font-size: 12px; }
}
/* Bootstrap 3.4 inspired light theme */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.42857143;
    color: #333;
    background-color: #f5f5f5;
}

a { color: #337ab7; text-decoration: none; }
a:hover, a:focus { color: #23527c; text-decoration: underline; }

.container {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 15px;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 50px;
}

.logo-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

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

.menu { display: flex; gap: 8px; flex-wrap: wrap; }
.menu a {
    color: #555;
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 4px;
}
.menu a.active, .menu a:hover {
    color: #333;
    background: #f5f5f5;
    border-color: #ddd;
    text-decoration: none;
}

.page-head { margin: 0 0 15px; }
.page-head h1, h1 {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.1;
}

.meta { color: #777; font-size: 13px; margin: 0 0 8px; }

.form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 15px;
}

.form h3 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 500;
}

label {
    display: inline-block;
    margin-bottom: 5px;
    font-weight: 700;
}

input, textarea, select, button {
    display: block;
    width: 100%;
    margin-bottom: 10px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
}

input:focus, textarea:focus, select:focus {
    border-color: #66afe9;
    outline: 0;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6);
}

textarea { resize: vertical; }

button {
    background: #337ab7;
    color: #fff;
    border-color: #2e6da4;
    cursor: pointer;
}
button:hover { background: #286090; border-color: #204d74; }

.btn-link {
    display: inline-block;
    width: auto;
    margin-bottom: 0;
    padding: 6px 12px;
    color: #fff;
    background: #337ab7;
    border: 1px solid #2e6da4;
    border-radius: 4px;
    text-decoration: none;
}
.btn-link:hover { color: #fff; background: #286090; border-color: #204d74; text-decoration: none; }
.btn-link.subtle {
    color: #333;
    background: #fff;
    border-color: #ccc;
}
.btn-link.subtle:hover {
    color: #333;
    background: #e6e6e6;
    border-color: #adadad;
}

.btn-danger {
    width: auto;
    color: #fff;
    background: #d9534f;
    border-color: #d43f3a;
}
.btn-danger:hover { background: #c9302c; border-color: #ac2925; }

.inline {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.inline .btn-link, .inline button, .inline input, .inline select {
    width: auto;
    margin-bottom: 0;
}

.alert {
    padding: 10px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #31708f;
    background: #d9edf7;
    border-color: #bce8f1;
}
.error {
    color: #a94442;
    background: #f2dede;
    border-color: #ebccd1;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.poster-link {
    display: block;
    line-height: 0;
}

.poster {
    width: 100%;
    height: 290px;
    object-fit: cover;
    background: #eee;
}

.content { padding: 12px; }
.title {
    margin: 0 0 8px;
    font-size: 16px;
    line-height: 1.3;
}
.title a { color: #333; }
.title a:hover { color: #23527c; }

.filters {
    display: grid;
    grid-template-columns: 1fr 220px auto auto;
    gap: 8px;
    align-items: end;
}

.stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: #777;
    font-size: 13px;
}

.pagination {
    margin: 15px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.page-pill {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #555;
}
.disabled {
    display: inline-block;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #999;
    background: #f9f9f9;
}

.movie-detail {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 15px;
}
.movie-detail > .poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.watch-title { margin: 0 0 10px; font-size: 24px; font-weight: 500; }
.watch-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.meta-chip {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid #ddd;
    border-radius: 14px;
    background: #f7f7f7;
    color: #555;
    font-size: 12px;
}

.watch-description {
    border: 1px solid #ddd;
    background: #fcfcfc;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}
.watch-description h3 { margin: 0 0 6px; font-size: 16px; }
.watch-description p { margin: 0; color: #555; }

.player-wrap {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    background: #000;
}
.stream-frame, .video-player {
    display: block;
    width: 100%;
    height: 460px;
    border: 0;
}

.server-select { margin-bottom: 10px; }
.watch-actions { margin-bottom: 8px; }

.ads-box {
    border: 1px dashed #ccc;
    background: #fafafa;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 10px;
}
.ads-box strong { font-size: 12px; color: #777; }
.ads-box p { margin: 5px 0 0; color: #555; }

.related-list { display: grid; gap: 8px; }
.related-item {
    display: inline-block;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f7f7f7;
    color: #333;
}
.related-item:hover { background: #efefef; text-decoration: none; }

.actors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 10px;
}
.actor-card {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 10px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    padding: 10px;
}
.actor-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #eee;
}
.actor-card strong { margin-bottom: 4px; font-size: 14px; }

.movie-row {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}
.movie-row:last-child { border-bottom: 0; }

.auth-card { max-width: 420px; }

.footer {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    background: #fff;
}
.footer-inner { padding: 12px 0; }
.footer p { margin: 0; color: #777; font-size: 12px; text-align: center; }

pre {
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid #ccc;
    border-radius: 4px;
    overflow: auto;
}

@media (max-width: 991px) {
    .filters { grid-template-columns: 1fr 1fr; }
    .grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
    .poster { height: 240px; }
}

@media (max-width: 767px) {
    .menu { justify-content: flex-start; }
    .movie-detail { grid-template-columns: 120px 1fr; }
    .stream-frame, .video-player { height: 300px; }
}

@media (max-width: 480px) {
    .topbar-inner { min-height: 46px; }
    .logo-text { font-size: 16px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .poster { height: 170px; }
    .movie-detail { grid-template-columns: 90px 1fr; gap: 10px; }
    .content { padding: 10px; }
    .title { font-size: 14px; }
    .meta { font-size: 12px; }
}

/* -------------------------------------------------------
   Ant Design inspired visual override layer
   Reference: https://ant.design/
-------------------------------------------------------- */
:root {
    --ant-primary: #1677ff;
    --ant-primary-hover: #4096ff;
    --ant-primary-active: #0958d9;
    --ant-text: #1f1f1f;
    --ant-text-secondary: #595959;
    --ant-border: #d9d9d9;
    --ant-border-soft: #f0f0f0;
    --ant-bg: #f5f5f5;
    --ant-surface: #ffffff;
    --ant-radius: 8px;
    --ant-shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    color: var(--ant-text);
    background: var(--ant-bg);
    line-height: 1.5715;
}

a {
    color: var(--ant-primary);
}

a:hover,
a:focus {
    color: var(--ant-primary-hover);
}

.topbar,
.footer,
.form,
.card,
.watch-description,
.page-pill,
.disabled,
.actor-card,
.related-item {
    border-color: var(--ant-border) !important;
    border-radius: var(--ant-radius);
}

.topbar,
.footer,
.form,
.card,
.actor-card,
.page-pill,
.watch-description {
    background: var(--ant-surface);
}

.topbar {
    border-bottom-width: 1px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.menu a {
    border-radius: 6px;
    transition: all 0.2s ease;
}

.menu a.active,
.menu a:hover {
    color: var(--ant-primary);
    background: #e6f4ff;
    border-color: #91caff;
}

.page-head h1,
h1 {
    font-weight: 600;
    color: #262626;
}

.meta,
.stats {
    color: var(--ant-text-secondary);
}

input,
textarea,
select {
    border: 1px solid var(--ant-border);
    border-radius: 6px;
    color: var(--ant-text);
    transition: all 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--ant-primary-hover);
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.2);
}

button,
.btn-link {
    border-radius: 6px;
    border: 1px solid var(--ant-primary);
    background: var(--ant-primary);
    color: #fff;
    font-weight: 500;
    transition: all 0.2s ease;
}

button:hover,
.btn-link:hover {
    background: var(--ant-primary-hover);
    border-color: var(--ant-primary-hover);
}

button:active,
.btn-link:active {
    background: var(--ant-primary-active);
    border-color: var(--ant-primary-active);
}

.btn-link.subtle,
.share-btn {
    background: #fff;
    color: var(--ant-text);
    border-color: var(--ant-border);
}

.btn-link.subtle:hover,
.share-btn:hover {
    color: var(--ant-primary);
    border-color: var(--ant-primary);
    background: #f5faff;
}

.card,
.form,
.actor-card,
.watch-description {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card:hover,
.actor-card:hover {
    box-shadow: var(--ant-shadow);
}

.title a {
    color: #262626;
}

.title a:hover {
    color: var(--ant-primary);
}

.meta-chip {
    border-radius: 999px;
    border-color: #adc6ff;
    background: #f0f5ff;
    color: #1d39c4;
}

.related-item {
    background: #fafafa;
}

.related-item:hover {
    border-color: #91caff;
    color: var(--ant-primary);
    background: #f5faff;
}

.alert {
    border-radius: 8px;
}

.pagination {
    gap: 10px;
}

.ad-banner-box {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ad-banner-link {
    display: inline-block;
    width: 360px;
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d9d9d9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.ad-banner-image {
    display: block;
    width: 360px;
    max-width: 100%;
    height: 120px;
    object-fit: cover;
}

/* -------------------------------------------------------
   Admin panel scoped styles
-------------------------------------------------------- */

/* cap form width so they don't stretch to 1170px */
.form.compact {
    max-width: 800px;
}

.auth-card {
    max-width: 400px !important;
}

/* section headings inside forms */
section.form h3 {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--ant-border);
    margin: 0 0 16px;
}

/* labels — lighter weight, clear spacing */
.form label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ant-text-secondary);
    margin: 12px 0 4px;
}
.form label:first-of-type { margin-top: 0; }

/* upload block — dashed drop-zone feel */
.inline[data-local-upload] {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 6px 0 10px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px dashed #d9d9d9;
    border-radius: 8px;
}
.inline[data-local-upload] input[type="file"] {
    flex: 1 1 160px;
    min-width: 0;
    font-size: 13px;
    padding: 4px 0;
    border: none;
    background: transparent;
    box-shadow: none;
    width: auto;
    margin-bottom: 0;
}
.inline[data-local-upload] button {
    flex: 0 0 auto;
    width: auto;
    margin-bottom: 0;
    white-space: nowrap;
}
[data-upload-status]:not(:empty) {
    font-size: 12px;
    color: #52c41a;
    width: 100%;
}

/* multiple selects */
select[multiple] {
    height: auto;
    min-height: 90px;
    padding: 6px;
}

/* row items in admin lists */
.movie-row {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
}
.movie-row:last-child { border-bottom: 0; }
.movie-row > strong { font-size: 14px; font-weight: 600; color: #262626; }
.movie-row .inline { margin-top: 8px; }
.movie-row form + form { margin-top: 4px; }

/* tighter spacing inside admin forms */
.form.compact input,
.form.compact textarea,
.form.compact select {
    margin-bottom: 0;
}

/* Mobile optimization layer */
@media (max-width: 767px) {
    .container {
        padding: 0 12px;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 0;
    }

    .menu {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .menu a {
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .page-head h1,
    h1 {
        font-size: 22px;
        line-height: 1.3;
    }

    .filters,
    .actors-filters {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .movie-detail {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .movie-detail > .poster {
        width: min(220px, 100%);
        margin: 0 auto;
    }

    .stream-frame,
    .video-player {
        width: 100%;
        height: min(56vw, 260px);
    }

    .watch-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .watch-actions .btn-link,
    .watch-actions .share-btn,
    #startStreamBtn {
        width: 100%;
        min-height: 40px;
    }

    .ad-banner-link {
        width: min(360px, 100%);
    }

    .ad-banner-image {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 1;
    }
}

@media (max-width: 480px) {
    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .content {
        padding: 8px;
    }

    .title {
        font-size: 13px;
        line-height: 1.3;
    }

    .meta {
        font-size: 12px;
    }

    .meta-chip {
        font-size: 11px;
        padding: 2px 8px;
    }

    .stats {
        font-size: 11px;
        gap: 8px;
    }
}

/* ══════════════════════════════════════════════
   Admin — new layout: dashboard, page headers,
   AJAX content area, stats grid, actor grid
   ══════════════════════════════════════════════ */

/* Smooth AJAX content swap */
#admin-content {
    will-change: opacity;
    min-height: 280px;
}

/* Page-level header row (title + CTA button) */
.admin-page-head {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 20px 0 16px;
}
.admin-page-head h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--ant-text);
    flex: 1;
}

/* Small numeric badge next to a heading */
.count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ant-primary-light, #e6f4ff);
    color: var(--ant-primary);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    padding: 1px 8px;
    vertical-align: middle;
    margin-left: 6px;
}

/* Alert / flash message */
.alert {
    padding: 10px 14px;
    border-radius: var(--ant-radius);
    background: #fffbe6;
    border: 1px solid #ffe58f;
    color: #614700;
    margin-bottom: 12px;
    font-size: 14px;
}
.alert.error {
    background: #fff2f0;
    border-color: #ffccc7;
    color: #a8071a;
}

/* Dashboard stats grid */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}
.dash-stat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--ant-border);
    border-radius: var(--ant-radius);
    padding: 20px 12px;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-stat-card:hover {
    border-color: var(--ant-primary);
    box-shadow: 0 2px 8px rgba(22,119,255,.12);
}
.dash-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--ant-primary);
    line-height: 1;
}
.dash-label {
    font-size: 13px;
    color: var(--ant-text-secondary, #666);
}

/* Dashboard quick-action buttons */
.dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

/* Movie/category list row with actions */
.movie-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px 0;
    border-bottom: 1px solid var(--ant-border);
}
.movie-row:last-child { border-bottom: none; }
.movie-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.movie-row-info strong { font-weight: 500; }
.movie-row-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.row-thumb {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

/* Actor admin card grid */
.actors-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    padding: 4px 0;
}
.actor-admin-card {
    border: 1px solid var(--ant-border);
    border-radius: var(--ant-radius);
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.actor-admin-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #f0f0f0;
}
.actor-admin-info {
    padding: 8px 10px 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.actor-admin-info strong { font-size: 14px; font-weight: 500; }
.actor-admin-actions {
    padding: 6px 10px;
    display: flex;
    gap: 6px;
    margin-top: auto;
}

/* Tag admin list */
.tag-admin-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tag-admin-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--ant-border);
}
.tag-admin-row:last-child { border-bottom: none; }

/* Inline search form */
form.inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Danger delete button */
.btn-danger {
    background: none;
    border: 1px solid #ff4d4f;
    color: #ff4d4f;
    border-radius: var(--ant-radius);
    padding: 3px 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.btn-danger:hover {
    background: #ff4d4f;
    color: #fff;
}

/* Responsive dashboard */
@media (max-width: 767px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    .admin-page-head h1 {
        font-size: 18px;
    }
    .actors-admin-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .dash-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .dash-number { font-size: 26px; }
}

/* ══════════════════════════════════════════════
   Image sizing & display — authoritative overrides
   (these rules win over all earlier declarations)
   ══════════════════════════════════════════════ */

/* ── Movie listing grid ──────────────────────── */
.grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 12px;
}

/* Posters: 2:3 ratio (standard movie poster).
   aspect-ratio replaces every fixed height so
   object-fit: contain never leaves blank bars. */
.poster {
    height: auto;
    aspect-ratio: 2 / 3;
    object-fit: contain;
    background: #18181b;  /* dark cinematic fill */
}

/* ── Movie detail page ───────────────────────── */
.movie-detail {
    grid-template-columns: 230px 1fr;
    gap: 20px;
}
.movie-detail > .poster {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    border-radius: 6px;
}

/* ── Actor thumbnails (listing & detail) ─────── */
/* Larger square so faces are actually recognisable */
.actor-card {
    grid-template-columns: 84px 1fr;
    align-items: start;
}
.actor-card img {
    width: 84px;
    height: 84px;
    object-fit: contain;
    border-radius: 6px;
    background: #f0f0f0;
}

/* ── Admin actor grid cards ──────────────────── */
/* Taller photo area for a proper headshot preview */
.actor-admin-card img {
    height: 180px;
    object-fit: contain;
    background: #ebebeb;
}

/* ── Admin movie row thumbnail ───────────────── */
.row-thumb {
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #ebebeb;
    border-radius: 4px;
}

/* ── Responsive adjustments ──────────────────── */
@media (max-width: 991px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
    .movie-detail { grid-template-columns: 190px 1fr; }
}
@media (max-width: 767px) {
    .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
    .movie-detail { grid-template-columns: 130px 1fr; gap: 12px; }
    .actor-card { grid-template-columns: 68px 1fr; }
    .actor-card img { width: 68px; height: 68px; }
    .actors-admin-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .movie-detail { grid-template-columns: 110px 1fr; gap: 10px; }
    .actor-card { grid-template-columns: 56px 1fr; }
    .actor-card img { width: 56px; height: 56px; }
}

/* ══════════════════════════════════════════════
   Actors page — compact filter toolbar
   ══════════════════════════════════════════════ */
.actor-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.actor-filter-row {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    flex: 1;
}
/* search stretches to fill spare space */
.actor-filter-search {
    flex: 1;
    min-width: 100px;
    height: 30px;
    padding: 0 8px;
    font-size: 13px;
    border: 1px solid var(--ant-border, #d9d9d9);
    border-radius: var(--ant-radius, 4px);
}
/* compact dropdowns */
.actor-filter-sm {
    height: 30px;
    padding: 0 4px;
    font-size: 12px;
    width: auto;
    border: 1px solid var(--ant-border, #d9d9d9);
    border-radius: var(--ant-radius, 4px);
    background: #fff;
    cursor: pointer;
}
/* tiny age number inputs */
.actor-filter-age {
    width: 52px;
    height: 30px;
    padding: 0 5px;
    font-size: 12px;
    text-align: center;
    border: 1px solid var(--ant-border, #d9d9d9);
    border-radius: var(--ant-radius, 4px);
}
/* Go button */
.actor-filter-btn {
    height: 30px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--ant-primary, #1677ff);
    color: #fff;
    border: none;
    border-radius: var(--ant-radius, 4px);
    cursor: pointer;
    white-space: nowrap;
}
.actor-filter-btn:hover { opacity: 0.88; }
/* × reset link */
.actor-filter-reset {
    height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    font-size: 13px;
    color: #999;
    text-decoration: none;
    border: 1px solid var(--ant-border, #d9d9d9);
    border-radius: var(--ant-radius, 4px);
    background: #fff;
}
.actor-filter-reset:hover { color: #f00; border-color: #f00; }
/* result count badge */
.actor-toolbar-meta {
    font-size: 12px;
    color: var(--ant-text-secondary, #888);
    white-space: nowrap;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    .actor-filter-search { min-width: 80px; }
    .actor-filter-sm { font-size: 11px; }
}

/* ══════════════════════════════════════════════
   Actors listing page — vertical poster-style tiles
   ══════════════════════════════════════════════ */

/* Grid: same density as movie grid */
.actors-listing {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

/* Each tile is a full-bleed card link */
.actor-tile {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--ant-border, #ddd);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.actor-tile:hover {
    border-color: var(--ant-primary, #1677ff);
    box-shadow: 0 2px 10px rgba(22,119,255,.12);
    text-decoration: none;
}

/* Photo area — square aspect, image fills it */
.actor-tile-photo {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #ebebeb;
}
.actor-tile-photo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #ebebeb;
}

/* Top-left: film count badge */
.actor-tile-movies {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(22, 119, 255, 0.88);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    line-height: 1.5;
    white-space: nowrap;
}

/* Bottom-right: age badge */
.actor-tile-age {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    line-height: 1.6;
}

/* Name below photo */
.actor-tile-name {
    margin: 0;
    padding: 7px 8px 8px;
    font-size: 12px;
    font-weight: 500;
    color: var(--ant-text, #1a1a1a);
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .actors-listing { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
}
@media (max-width: 480px) {
    .actors-listing { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .actor-tile-name { font-size: 11px; padding: 5px 6px 6px; }
}

/* ══════════════════════════════════════════════
   Error pages (404 / 403)
   ══════════════════════════════════════════════ */
.error-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 120px);
    padding: 40px 20px;
}
.error-page-inner {
    text-align: center;
    max-width: 480px;
}
.error-code {
    font-size: 96px;
    font-weight: 700;
    line-height: 1;
    color: var(--ant-primary, #1677ff);
    opacity: 0.15;
    letter-spacing: -4px;
    margin-bottom: 8px;
    user-select: none;
}
.error-title {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 10px;
    color: var(--ant-text, #1a1a1a);
}
.error-msg {
    color: var(--ant-text-secondary, #666);
    font-size: 15px;
    margin: 0 0 28px;
    line-height: 1.6;
}
.error-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ══════════════════════════════════════════════
   MOBILE-FIRST RESPONSIVE OVERRIDES
   Canonical layer — overrides all earlier rules.
   Breakpoints: 576px · 768px · 992px
   ══════════════════════════════════════════════ */

/* ── Mobile bottom tab bar ───────────────────── */
.mob-nav { display: none; }   /* shown via media query */

/* ── Container — safe edge padding ──────────── */
.container { padding-left: max(12px, env(safe-area-inset-left)); padding-right: max(12px, env(safe-area-inset-right)); }

/* ── Topbar ──────────────────────────────────── */
.topbar { position: sticky; top: 0; z-index: 100; }
.topbar-inner { min-height: 52px; flex-wrap: nowrap; align-items: center; }

/* ── Movie card content — tighter ───────────── */
.card .content { padding: 8px 10px; }
.card .title { font-size: 13px; line-height: 1.3; margin-bottom: 4px; }
.card .meta  { font-size: 11px; margin-bottom: 3px; }
/* hide Watch button inside listing cards — poster link already does it */
.card .content > p:last-child > a.btn-link { display: none; }

/* ── Home filter ─────────────────────────────── */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.filters input[name="q"] { flex: 1 1 160px; min-width: 0; }
.filters select          { flex: 1 1 120px; min-width: 0; }
.filters button,
.filters a.btn-link      { flex-shrink: 0; }

/* ── Movie detail ────────────────────────────── */
.watch-title { font-size: 20px; line-height: 1.3; }

/* ── Stream player: aspect-ratio instead of fixed px ── */
.stream-frame,
.video-player {
    height: auto;
    aspect-ratio: 16 / 9;
}

/* ── Pagination ──────────────────────────────── */
.pagination { gap: 6px; }
.page-pill, .disabled { padding: 5px 10px; font-size: 13px; }

/* ══ ≤992px (tablets / small laptops) ═══════ */
@media (max-width: 992px) {
    .watch-title { font-size: 20px; }
    .stream-frame, .video-player { aspect-ratio: 16/9; height: auto; }
}

/* ══ ≤768px (large phones / small tablets) ══ */
@media (max-width: 768px) {
    /* hide desktop nav — bottom tab bar replaces it */
    .menu { display: none; }

    /* ── bottom tab bar ── */
    .mob-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #fff;
        border-top: 1px solid #e0e0e0;
        box-shadow: 0 -2px 10px rgba(0,0,0,.08);
        z-index: 200;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .mob-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 4px 7px;
        color: #999;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: .02em;
        text-decoration: none;
        text-transform: uppercase;
        line-height: 1;
        -webkit-tap-highlight-color: transparent;
        transition: color .15s;
    }
    .mob-nav-item svg {
        width: 22px; height: 22px;
        stroke-width: 1.7;
        flex-shrink: 0;
    }
    .mob-nav-item.active {
        color: var(--ant-primary, #1677ff);
    }
    .mob-nav-item.active svg { stroke-width: 2.2; }
    /* active indicator bar at top of tab */
    .mob-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0; left: 10%; right: 10%;
        height: 2px;
        background: var(--ant-primary, #1677ff);
        border-radius: 0 0 2px 2px;
    }
    .mob-nav-item { position: relative; }

    /* push footer content above the bar — public pages only, admin has no tab bar */
    body:not(.admin-body) { padding-bottom: calc(57px + env(safe-area-inset-bottom)); }

    /* ── Admin nav: scrollable horizontal strip ── */
    .admin-nav {
        display: flex !important;       /* override .menu { display: none } */
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;          /* Firefox */
        flex-wrap: nowrap;
        width: 100%;
        gap: 0;
        padding: 0 0 4px;
        border-top: 1px solid var(--ant-border, #eee);
    }
    .admin-nav::-webkit-scrollbar { display: none; }
    .admin-nav a {
        flex-shrink: 0;
        white-space: nowrap;
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid transparent;
    }
    .admin-nav a.active {
        border-bottom-color: var(--ant-primary, #1677ff);
        background: none;
        color: var(--ant-primary, #1677ff);
    }
    #admin-topbar .topbar-inner {
        flex-wrap: wrap;
        min-height: auto;
        padding-top: 8px;
        padding-bottom: 0;
        gap: 0;
    }
    #admin-topbar .logo-text { padding-bottom: 6px; }

    /* movie detail: stack poster on top */
    .movie-detail { grid-template-columns: 1fr; }
    .movie-detail > .poster { width: min(200px, 60%); margin: 0 auto; }

    /* home filter: full-width search */
    .filters input[name="q"] { flex: 1 1 100%; }

    /* actors-grid in movie detail */
    .actors-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

    h1 { font-size: 22px; }
    .watch-title { font-size: 18px; }
}

/* ══ ≤576px (phones) ════════════════════════ */
@media (max-width: 576px) {
    /* tighter container */
    .container { padding-left: 10px; padding-right: 10px; }

    /* grid: 3 columns for cards */
    .grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .card .content { padding: 6px 7px; }
    .card .title   { font-size: 11px; }
    .card .meta    { display: none; }  /* hide meta on tiny cards */

    /* poster even smaller */
    .movie-detail > .poster { width: min(160px, 55%); }

    /* player shorter */
    .stream-frame, .video-player { aspect-ratio: 16/9; }

    /* pagination compact */
    .pagination { gap: 4px; flex-wrap: wrap; }

    /* actors grid */
    .actors-grid { grid-template-columns: repeat(2, 1fr); }
    .actor-card  { grid-template-columns: 52px 1fr; }
    .actor-card img { width: 52px; height: 52px; }

    /* footer */
    .footer-inner { padding: 10px 0; }

    h1 { font-size: 19px; }
    .watch-title { font-size: 16px; }
    .page-head h1, h1 { font-size: 18px; }
}

/* ══ ≤380px (very small phones — SE, Galaxy A) ══ */
@media (max-width: 380px) {
    .grid { grid-template-columns: repeat(2, 1fr); gap: 5px; }
    .actors-listing { grid-template-columns: repeat(2, 1fr); gap: 5px; }
    .mob-nav-item { font-size: 9px; }
    .mob-nav-item svg { width: 20px; height: 20px; }
}
