/* DramaMax — dual layout: app (mobile) + desktop (corporate) */

/* ——— Layout mode transitions ——— */
.site-shell,
.site-sidebar,
.site-main-col,
.tab-bar,
.top-bar {
  transition: opacity 0.35s ease, transform 0.35s ease;
}

html.layout-switching .site-main-col {
  opacity: 0.88;
  transform: translateY(6px);
}

html.layout-switching .site-sidebar {
  opacity: 0.92;
  transform: translateX(-8px);
}

html.layout-switching .tab-bar {
  opacity: 0.85;
  transform: translateY(12px);
}

@media (prefers-reduced-motion: reduce) {
  .site-shell,
  .site-sidebar,
  .site-main-col,
  .tab-bar,
  .top-bar,
  .hero-slide__card,
  .corp-hero__inner {
    transition: none !important;
    animation: none !important;
  }
}

html[data-layout="app"] .site-sidebar,
html[data-layout="app"] .site-footer {
  display: none !important;
}

html[data-layout="app"] .tab-bar {
  display: flex !important;
}

html[data-layout="app"] .site-shell {
  flex-direction: column;
  min-height: 100dvh;
}

html[data-layout="app"] .site-main-col {
  flex: 1;
  min-height: 0;
}

html[data-layout="app"] .page-main {
  padding-bottom: calc(var(--tab-bar-h) + var(--safe-bottom) + 8px);
}

html[data-layout="app"] .brand-mark__name {
  font-size: 17px;
}

@media (max-width: 1023px) {
  html[data-layout="app"] body:not(.watch-body):not(.page-untuk-anda):not(.page-search) {
    background: var(--bg);
  }

  html[data-layout="app"] .top-bar__inner {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

html[data-layout="desktop"] .tab-bar {
  display: none !important;
}

html[data-layout="desktop"] .sticky-resume-bar {
  left: var(--sidebar-w);
  right: 0;
  max-width: none;
}

/* ——— Desktop shell ——— */
.site-shell {
  display: flex;
  min-height: 100vh;
}

.site-main-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.site-sidebar {
  display: none;
  flex-direction: column;
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
  z-index: 300;
}

html[data-layout="desktop"] .site-sidebar {
  display: flex;
}

.site-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 20px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.site-sidebar__glyph {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: block;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(255, 30, 111, 0.35);
}

.site-sidebar__name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-sidebar__tagline {
  font-size: 11px;
  color: var(--muted-fg);
  margin-top: 2px;
}

.site-sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  padding: 8px 0;
}

.site-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--muted-fg);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}

.site-sidebar__link:hover {
  color: var(--foreground);
  background: rgba(255, 255, 255, 0.04);
}

.site-sidebar__link.is-active {
  color: var(--primary);
  background: var(--primary-muted);
  font-weight: 600;
}

.site-sidebar__link svg,
.site-sidebar__link .tab-bar__lottie {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.site-sidebar__cta {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-sidebar__login {
  display: block;
  text-align: center;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(255, 30, 111, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.site-sidebar__login:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255, 30, 111, 0.45);
}

.site-sidebar__vip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 184, 0, 0.15), rgba(255, 30, 111, 0.08));
  border: 1px solid rgba(255, 184, 0, 0.25);
  font-size: 13px;
  color: var(--foreground);
}

.site-sidebar__vip strong {
  display: block;
  font-size: 13px;
  color: var(--gold);
}

.site-sidebar__vip span {
  font-size: 11px;
  color: var(--muted-fg);
}

/* ——— Desktop top bar & content ——— */
html[data-layout="desktop"] .top-bar__inner {
  max-width: 1280px;
}

html[data-layout="desktop"] .page-main {
  max-width: 1280px;
  padding-bottom: 32px;
}

html[data-layout="desktop"] .drama-grid {
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 20px;
}

/* Desktop hero — featured banner full width */
html[data-layout="desktop"] .hero-carousel {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 12px;
}

html[data-layout="desktop"] .hero-carousel__viewport {
  scroll-padding-inline: 0;
}

html[data-layout="desktop"] .hero-carousel__track {
  padding: 0;
  gap: 16px;
}

html[data-layout="desktop"] .hero-slide {
  flex: 0 0 100%;
  width: 100%;
  scroll-snap-align: center;
}

html[data-layout="desktop"] .hero-slide__card {
  height: min(520px, 58vh);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 30, 111, 0.12);
}

html[data-layout="desktop"] .hero-slide__title {
  font-size: clamp(22px, 3vw, 32px);
}

html[data-layout="desktop"] .hero-slide__cta {
  padding: 14px 28px;
  font-size: 15px;
}

html[data-layout="desktop"] .hero-dots {
  margin-top: 14px;
}

html[data-layout="desktop"] .beranda-tab-hero-wrap {
  padding-top: 4px;
}

html[data-layout="desktop"] .beranda-tabs {
  margin-bottom: 8px;
  padding-bottom: 0;
  border-bottom: none;
  gap: 6px;
}

html[data-layout="desktop"] .beranda-tab {
  padding: 10px 18px 12px;
  border-radius: var(--radius-full);
  background: var(--card);
  border: 1px solid var(--border);
}

html[data-layout="desktop"] .beranda-tab.is-active {
  background: var(--primary-muted);
  border-color: rgba(255, 30, 111, 0.35);
}

html[data-layout="desktop"] .beranda-tab.is-active::after {
  display: none;
}

html[data-layout="desktop"] .feed-rail,
html[data-layout="desktop"] .popular-rec {
  margin-top: 8px;
}

html[data-layout="desktop"] .drama-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

html[data-layout="desktop"] .drama-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

html[data-layout="desktop"] .search-pill {
  max-width: 420px;
  flex: 1;
}

html[data-layout="desktop"] .brand-mark__name {
  display: flex;
}

html[data-layout="desktop"] .top-bar__login {
  display: none;
}

/* ——— Corporate / About page ——— */
.corp-hero {
  position: relative;
  margin: 0 calc(-1 * var(--space-lg)) 28px;
  padding: 48px 24px 56px;
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  background: linear-gradient(165deg, rgba(255, 30, 111, 0.12) 0%, var(--card) 45%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}

.corp-hero__glow {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(ellipse, rgba(255, 30, 111, 0.2), transparent 65%);
  pointer-events: none;
}

.corp-hero__inner {
  position: relative;
  max-width: 640px;
  animation: corpFadeUp 0.55s ease both;
}

.corp-hero__eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}

.corp-hero__title {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.corp-hero__lead {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--muted-fg);
  max-width: 52ch;
}

.corp-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.corp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.corp-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 28px rgba(255, 30, 111, 0.4);
}

.corp-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(255, 30, 111, 0.5);
}

.corp-btn--ghost {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--foreground);
}

.corp-btn--ghost:hover {
  border-color: rgba(255, 30, 111, 0.35);
  background: var(--primary-muted);
}

.corp-btn--lg {
  padding: 14px 32px;
  font-size: 15px;
}

.corp-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 36px;
  animation: corpFadeUp 0.55s ease 0.08s both;
}

.corp-stat {
  padding: 20px 18px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  text-align: center;
}

.corp-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.corp-stat span {
  font-size: 12px;
  color: var(--muted-fg);
}

.corp-section {
  margin-bottom: 36px;
  animation: corpFadeUp 0.55s ease 0.12s both;
}

.corp-section__title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
}

.corp-section__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted-fg);
  max-width: 68ch;
}

.corp-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 40px;
  animation: corpFadeUp 0.55s ease 0.16s both;
}

.corp-feature {
  padding: 22px 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.corp-feature:hover {
  border-color: rgba(255, 30, 111, 0.25);
  transform: translateY(-2px);
}

.corp-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-muted);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.corp-feature__icon svg {
  display: block;
}

.corp-feature__icon--gold {
  background: var(--gold-muted);
}

.corp-feature h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.corp-feature p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted-fg);
}

.corp-cta {
  text-align: center;
  padding: 40px 24px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255, 30, 111, 0.1), rgba(255, 184, 0, 0.06));
  border: 1px solid rgba(255, 30, 111, 0.2);
  animation: corpFadeUp 0.55s ease 0.2s both;
}

.corp-cta h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.corp-cta p {
  margin: 0 0 20px;
  color: var(--muted-fg);
  font-size: 14px;
}

@keyframes corpFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

html[data-layout="desktop"] .corp-stats {
  grid-template-columns: repeat(4, 1fr);
}

html[data-layout="desktop"] .corp-features {
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

html[data-layout="desktop"] .corp-hero {
  margin-left: 0;
  margin-right: 0;
  border-radius: 20px;
  margin-bottom: 32px;
  padding: 64px 40px 72px;
}

html[data-layout="desktop"] .corp-hero__title {
  font-size: clamp(32px, 4vw, 48px);
}

@media (min-width: 768px) {
  .corp-stats {
    grid-template-columns: repeat(4, 1fr);
  }

  .corp-features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ——— Site footer (desktop) ——— */
.site-footer {
  display: none;
  margin-top: auto;
  padding: 40px 24px 32px;
  border-top: 1px solid var(--border);
  background: var(--bg-elevated);
}

html[data-layout="desktop"] .site-footer {
  display: block;
}

.site-footer__inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}

.site-footer__brand p {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--muted-fg);
  line-height: 1.6;
  max-width: 280px;
}

.site-footer__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
}

.site-footer__logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  overflow: hidden;
  flex-shrink: 0;
}

.site-footer__col h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-fg);
}

.site-footer__col a {
  display: block;
  padding: 6px 0;
  font-size: 14px;
  color: var(--foreground);
  opacity: 0.85;
  transition: color 0.15s;
}

.site-footer__col a:hover {
  color: var(--primary);
  opacity: 1;
}

.site-footer__bottom {
  max-width: 1280px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted-fg);
}

.site-footer__badges {
  display: flex;
  gap: 10px;
  align-items: center;
}

.site-footer__badge {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--muted-fg);
}

/* ——— App mode: phone frame on wide screens (optional polish) ——— */
@media (min-width: 520px) and (max-width: 1023px) {
  html[data-layout="app"] body:not(.watch-body):not(.page-untuk-anda):not(.page-search) {
    background: #0a0a0e;
  }

  html[data-layout="app"] body:not(.watch-body) .site-shell {
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 0 1px var(--border), 0 24px 80px rgba(0, 0, 0, 0.65);
  }
}

@media (max-width: 1023px) {
  .site-sidebar,
  .site-footer {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  html[data-layout="desktop"] .top-bar {
    position: sticky;
  }

  html[data-layout="desktop"] .page-main {
    min-height: calc(100vh - var(--top-bar-h) - 180px);
  }
}

@media (max-width: 900px) {
  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
  }
}

/* Watch — full immersive phone frame (parity app) */
body.watch-body {
  background: #000;
}
body.watch-body .site-shell {
  display: block;
  min-height: 100dvh;
  background: #000;
}
body.watch-body .site-sidebar,
body.watch-body .site-footer {
  display: none !important;
}
body.watch-body .site-main-col {
  min-height: 100dvh;
}
body.watch-body .page-main,
body.watch-body .app-content {
  padding: 0;
  margin: 0;
  max-width: none;
}
@media (min-width: 480px) {
  body.watch-body .watch-pro {
    left: 50%;
    right: auto;
    width: min(430px, 100vw);
    transform: translateX(-50%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 24px 80px rgba(0, 0, 0, 0.85);
  }
}
