/* RUANGFLIX mobile detail v6
   Makes movie detail pages read like a clean streaming app on phones.
   Desktop is intentionally untouched. */

@media (max-width:700px){
  body.detail-page{
    background:#05080d!important;
    min-height:100vh!important;
  }

  /* Turn the old full-screen overlay hero into: media first, information below. */
  body.detail-page .detail-hero{
    position:relative!important;
    display:block!important;
    min-height:0!important;
    height:auto!important;
    padding-top:var(--rf-mobile-header,62px)!important;
    background-size:100% auto!important;
    background-position:center var(--rf-mobile-header,62px)!important;
    background-repeat:no-repeat!important;
    background-color:#05080d!important;
    overflow:hidden!important;
  }
  body.detail-page .detail-hero::after{display:none!important}

  body.detail-page .detail-hero .hero-preview-video{
    position:absolute!important;
    z-index:0!important;
    top:var(--rf-mobile-header,62px)!important;
    left:0!important;
    right:0!important;
    bottom:auto!important;
    width:100%!important;
    height:clamp(205px,56.25vw,250px)!important;
    object-fit:cover!important;
    object-position:center 28%!important;
    background:#070b11!important;
  }
  body.detail-page .detail-hero .hero-shade{
    position:absolute!important;
    z-index:1!important;
    top:var(--rf-mobile-header,62px)!important;
    left:0!important;
    right:0!important;
    bottom:auto!important;
    height:clamp(205px,56.25vw,250px)!important;
    background:
      linear-gradient(180deg,rgba(4,7,11,.06) 30%,rgba(4,7,11,.34) 61%,rgba(5,8,13,.95) 93%,#05080d 100%),
      linear-gradient(90deg,rgba(4,7,11,.16),rgba(4,7,11,.02) 65%)!important;
    pointer-events:none!important;
  }

  body.detail-page .detail-content{
    position:relative!important;
    z-index:3!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    margin:clamp(205px,56.25vw,250px) 0 0!important;
    padding:14px 16px 30px!important;
    background:#05080d!important;
  }

  body.detail-page .detail-content .eyebrow{
    margin:0 0 8px!important;
    color:#70b9ff!important;
    font-size:9.5px!important;
    font-weight:900!important;
    line-height:1.3!important;
    letter-spacing:.14em!important;
    text-transform:uppercase!important;
  }
  body.detail-page.adult-site .detail-content .eyebrow{
    color:#6eb8ff!important;
  }

  body.detail-page .detail-hero h1{
    width:100%!important;
    max-width:100%!important;
    margin:0 0 10px!important;
    font-size:clamp(28px,8.2vw,35px)!important;
    line-height:1.04!important;
    letter-spacing:-.04em!important;
    text-shadow:none!important;
    text-wrap:balance!important;
    overflow-wrap:anywhere!important;
  }

  body.detail-page .detail-content .meta{
    display:flex!important;
    align-items:center!important;
    gap:6px!important;
    margin:0 0 13px!important;
    color:#c7d0db!important;
    font-size:10.5px!important;
    line-height:1!important;
    flex-wrap:wrap!important;
  }
  body.detail-page .detail-content .meta>span{
    min-height:24px!important;
    display:inline-flex!important;
    align-items:center!important;
    padding:0 8px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    border-radius:999px!important;
    background:#0d141d!important;
  }
  body.detail-page .detail-content .meta .rating{
    border-color:rgba(76,164,255,.40)!important;
    background:rgba(31,137,255,.12)!important;
    color:#eaf5ff!important;
  }

  body.detail-page .detail-hero p{
    display:-webkit-box!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:4!important;
    overflow:hidden!important;
    max-width:100%!important;
    margin:0 0 13px!important;
    color:#d7dde5!important;
    font-size:13px!important;
    line-height:1.55!important;
    text-shadow:none!important;
  }

  body.detail-page .detail-content .tags{
    display:flex!important;
    gap:6px!important;
    flex-wrap:wrap!important;
    margin:0 0 16px!important;
  }
  body.detail-page .detail-content .tags span{
    min-height:27px!important;
    box-sizing:border-box!important;
    display:inline-flex!important;
    align-items:center!important;
    padding:0 9px!important;
    border-radius:999px!important;
    border:1px solid rgba(255,255,255,.10)!important;
    background:#0e151f!important;
    color:#cbd5e1!important;
    font-size:10px!important;
    font-weight:750!important;
    line-height:1!important;
  }

  /* Putar gets the full row. Secondary actions form a tidy 2-column row. */
  body.detail-page .detail-content .hero-actions{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    width:100%!important;
    margin:0 0 12px!important;
  }
  body.detail-page .detail-content .hero-actions .btn{
    width:100%!important;
    min-width:0!important;
    min-height:44px!important;
    box-sizing:border-box!important;
    margin:0!important;
    padding:0 12px!important;
    border-radius:9px!important;
    font-size:12.5px!important;
    font-weight:850!important;
    line-height:1!important;
    white-space:nowrap!important;
    box-shadow:none!important;
  }
  body.detail-page .detail-content .hero-actions .btn.primary{
    grid-column:1/-1!important;
    min-height:47px!important;
    background:linear-gradient(135deg,#168cff,#0968e0)!important;
    box-shadow:0 9px 22px rgba(22,140,255,.20)!important;
  }
  body.detail-page .detail-content .hero-actions .btn.secondary{
    background:#161f2b!important;
    border:1px solid rgba(255,255,255,.075)!important;
    color:#f2f6fb!important;
    backdrop-filter:none!important;
  }
  body.detail-page .detail-content .hero-actions .btn.liked{
    background:rgba(26,137,255,.17)!important;
    border-color:rgba(82,171,255,.34)!important;
  }

  body.detail-page .detail-content .hero-stats{
    display:flex!important;
    align-items:center!important;
    flex-wrap:wrap!important;
    gap:7px 12px!important;
    margin:0!important;
    padding:10px 0 0!important;
    border-top:1px solid rgba(255,255,255,.065)!important;
    color:#8f9baa!important;
    font-size:10.5px!important;
    line-height:1.3!important;
  }
  body.detail-page .detail-content .hero-stats b{
    color:#eef4fb!important;
    font-weight:800!important;
  }

  /* Adult detail uses the same clean layout. Keep a subtle visual cue only. */
  body.detail-page.adult-site .detail-content{
    background:#05080d!important;
  }
  body.detail-page.adult-site .detail-content .meta .rating{
    border-color:rgba(62,160,255,.42)!important;
    background:rgba(31,137,255,.14)!important;
  }

  /* Small phones: keep buttons and typography readable without overflowing. */
  @media (max-width:380px){
    body.detail-page .detail-content{padding-left:13px!important;padding-right:13px!important}
    body.detail-page .detail-hero h1{font-size:27px!important}
    body.detail-page .detail-content .hero-actions{gap:7px!important}
    body.detail-page .detail-content .hero-actions .btn{font-size:11.5px!important;padding:0 8px!important}
  }
}
