/* RoPhim 404 screen. */
.phim-not-found {
  display:grid;
  place-items:center;
  min-height:clamp(480px, 68vh, 760px);
  padding:72px 24px;
  background:#11131f;
  color:#fff;
  text-align:center;
}
.phim-not-found__inner { width:min(100%, 640px); }
.phim-not-found img { width:min(322px, 74vw); height:auto; margin:0 auto 24px; }
.phim-not-found h1 { margin:0 0 12px; color:#fff; font-size:clamp(24px, 3vw, 36px); font-weight:700; }
.phim-not-found p { margin:0 auto 28px; color:#a9abb5; font-size:15px; line-height:1.65; }
.phim-not-found a {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:48px;
  padding:0 28px;
  border-radius:999px;
  background:#ffd875;
  color:#171820;
  font-weight:700;
  text-decoration:none;
  transition:transform .2s ease, background-color .2s ease;
}
.phim-not-found a:hover { background:#ffe39b; color:#171820; transform:translateY(-2px); }

/* First page view in each browser session. */
.phim-first-visit-loader { display:none; }
.phim-first-visit-loading { overflow:hidden; }
.phim-first-visit-loading .phim-first-visit-loader {
  position:fixed;
  inset:0;
  z-index:2147483646;
  display:grid;
  place-items:center;
  padding:24px;
  background:#191b24;
  opacity:1;
  visibility:visible;
  transition:opacity .42s ease, visibility .42s ease;
}
.phim-first-visit-loaded .phim-first-visit-loader { opacity:0; visibility:hidden; }
.phim-first-visit-loader__brand {
  --phim-loader-shift:-8vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  width:min(100%, 980px);
  text-align:center;
  transform:translateY(var(--phim-loader-shift)) scale(1);
  transform-origin:center;
  animation:phim-loader-enter .48s cubic-bezier(.2,.8,.2,1) both;
  transition:transform .42s cubic-bezier(.4,0,1,1);
}
@keyframes phim-loader-enter {
  from { transform:translateY(var(--phim-loader-shift)) scale(.82); opacity:0; }
  to { transform:translateY(var(--phim-loader-shift)) scale(1); opacity:1; }
}
.phim-first-visit-loaded .phim-first-visit-loader__brand {
  transform:translateY(var(--phim-loader-shift)) scale(.82);
}
.phim-first-visit-loader__brand img { width:min(430px, 68vw); height:auto; }
.phim-first-visit-loader__brand p {
  max-width:920px;
  margin:52px 0 0;
  color:rgba(154,157,168,.28);
  font-size:34px;
  font-weight:700;
  line-height:1.45;
}
@media screen and (max-width: 768px) {
  .phim-not-found { min-height:60vh; padding:52px 20px; }
  .phim-not-found h1 { font-size:20px; }
  .phim-not-found p { font-size:14px; }
  .phim-first-visit-loader__brand { --phim-loader-shift:-6vh; }
  .phim-first-visit-loader__brand img { width:min(280px, 72vw); }
  .phim-first-visit-loader__brand p { max-width:480px; margin-top:30px; font-size:20px; }
}
@media (prefers-reduced-motion:reduce) {
  .phim-not-found a { transition:none; }
  .phim-first-visit-loader__brand { animation:none; transition:none; }
}
@media screen and (max-width: 768px) {
  /* Keep the episode controls visually grouped without crowding the tabs. */
  .phim-hybrid-site .phim-detail-episodes { padding-top:6px; }
  .phim-hybrid-site .phim-detail-episodes > .phim-detail-section-title {
    min-height:0;
    row-gap:12px;
    column-gap:14px;
    margin:0 0 18px;
  }
  .phim-hybrid-site .phim-detail-episodes > .phim-detail-section-title h2 {
    gap:8px;
    font-size:18px;
    line-height:1.25;
  }
  .phim-hybrid-site .phim-detail-episodes > .phim-detail-section-title h2 .icon-menu { font-size:20px; }
  .phim-hybrid-site .phim-detail-sources { gap:8px; padding:2px 0 0; }
  .phim-hybrid-site .phim-detail-sources button {
    min-height:38px;
    margin:0!important;
    padding:0 13px!important;
    border-radius:9px;
  }
  .phim-hybrid-site .phim-detail-compact { min-height:32px; }

  /* Compact mobile comments: clear rhythm, but no large dead area below the form. */
  .phim-hybrid-site .phim-detail-comments { margin-top:26px; padding:0 4px; }
  .phim-hybrid-site .phim-detail-comments > .phim-detail-section-title { margin-bottom:16px; }
  .phim-hybrid-site .phim-comment-list { margin:0 0 20px; }
  .phim-hybrid-site .phim-comment-list .phim-comment-item {
    gap:12px;
    margin:0;
    padding:10px 0 14px;
  }
  .phim-hybrid-site .phim-comment-list .phim-comment-item + .phim-comment-item { padding-top:14px; }
  .phim-comment-composer-user { gap:12px; margin:4px 0 14px; }
  .phim-comment-composer-user img { width:42px; height:42px; }
  .phim-hybrid-site .phim-comment-box {
    gap:9px;
    margin:0 0 8px;
    padding:10px;
    border-radius:12px;
  }
  .phim-hybrid-site .phim-comment-box .phim-comment-input textarea {
    height:112px!important;
    min-height:112px!important;
    padding:14px!important;
  }
  .phim-hybrid-site .phim-comment-box > span { line-height:1.45; }
  .phim-comment-message { min-height:0; margin:0!important; }
  .phim-comment-message:empty { display:none; }

  .phim-detail-stage > .phim-detail-sidebar-secondary { padding-top:16px; }
  .phim-detail-sidebar-secondary .phim-ranking-title {
    margin-top:0;
    padding-top:20px;
  }
}

@media screen and (max-width: 768px) {
  .phim-detail--rophim-cinematic .phim-detail-stage {
    padding-bottom: 30px !important;
  }

  .phim-detail-sidebar-secondary .phim-ranking-title {
    margin-bottom: 16px;
  }

  .phim-hybrid-site .phim-detail-score > i {
    font-size: 20px;
  }

  .phim-hybrid-site .phim-detail-episodes:has(.phim-detail-compact input:checked) .phim-episode-grid > a > strong {
    font-size: 14px !important;
  }

  .phim-hybrid-site .phim-detail-comments {
    padding: 0;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-title {
    color: #fff !important;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-detail-ranking li {
    flex: 0 0 calc((100% - 24px) / 2.5) !important;
    min-width: calc((100% - 24px) / 2.5);
    width: calc((100% - 24px) / 2.5);
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-detail-ranking a .phim-ranking-poster {
    aspect-ratio: 2 / 3;
    height: auto;
    width: 100%;
  }

  .phim-hybrid-site .phim-ranking-content small,
  .phim-hybrid-site .phim-ranking-meta {
    display: none;
  }
}

@media screen and (min-width: 769px) {
  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-title {
    align-items: center;
    display: flex;
    font-size: 22px;
    margin: 0 0 20px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-detail-ranking li {
    align-items: stretch;
    grid-template-columns: 62px minmax(0, 1fr);
    margin: 0;
    position: relative;
  }

  .phim-hybrid-site .phim-detail-ranking li[data-movie-title-tooltip]:has(.phim-ranking-content b:hover)::after {
    background: #565a64;
    border-radius: 5px;
    color: #fff;
    content: attr(data-movie-title-tooltip);
    font-size: 12px;
    font-weight: 400;
    left: 142px;
    line-height: 1.35;
    max-width: 260px;
    padding: 6px 9px;
    position: absolute;
    top: 42px;
    white-space: normal;
    width: max-content;
    z-index: 30;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-detail-ranking em {
    align-items: center;
    display: flex;
    font-size: 52px;
    line-height: 1;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-detail-ranking a {
    align-items: stretch;
    background: #1d202a;
    border-radius: 10px;
    display: grid;
    gap: 0;
    grid-template-columns: 80px minmax(0, 1fr);
    min-height: 118px;
    overflow: hidden;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-poster {
    border-radius: 0;
    height: 118px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-content {
    align-self: center;
    min-width: 0;
    padding: 12px 15px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-content b,
  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-content small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-content b {
    color: #f7f7f8;
    display: block;
    font-size: 15px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-content small {
    color: #aeb1ba;
    font-size: 13px;
    margin-top: 7px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-meta {
    align-items: center;
    color: #bfc1c8;
    display: flex;
    font-size: 12px;
    gap: 8px;
    margin-top: 10px;
  }

  .phim-hybrid-site .phim-detail-sidebar-secondary .phim-ranking-meta i::before {
    color: #555965;
    content: "•";
    margin-right: 8px;
  }
}

