/* YouTube-inspired discovery layout, using MAROMOVIE's forest palette. */
:root {
  --bg: #0d120f;
  --panel: #151c17;
  --panel2: #202923;
  --line: rgba(224, 240, 225, .11);
  --gold: #a8d68b;
  --cream: #f1f5ef;
  --muted: #a4afa5;
  --red: #a8d68b;
  --leaf: #b9e69a;
  --forest: #132017;
  --sidebar: 224px;
}

html { scroll-padding-top: 76px; }
body { background: var(--bg); color: var(--cream); }

.topbar {
  height: 64px;
  padding: 0 24px;
  gap: 22px;
  background: rgba(13, 18, 15, .97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.menu-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  font-size: 20px;
  cursor: pointer;
}
.menu-toggle:hover { background: var(--panel2); }
.brand { min-width: 190px; gap: 9px; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border-color: rgba(185, 230, 154, .45);
}
.brand-word { font-size: 16px; letter-spacing: -.5px; }
.brand-word small { color: #9caa9d; letter-spacing: 1.2px; }
.search {
  height: 42px;
  max-width: 620px;
  border: 1px solid rgba(224, 240, 225, .19);
  border-radius: 24px;
  background: #101612;
  overflow: hidden;
}
.search:focus-within { border-color: rgba(185, 230, 154, .65); }
.search input { padding-left: 18px; font-size: 14px; }
.search button {
  width: 62px;
  background: #202923;
  border-left: 1px solid var(--line);
  color: var(--leaf);
  font-size: 24px;
}
.top-actions { gap: 14px; }
.upload-button {
  height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 22px;
  background: #202923;
  color: var(--cream);
  font-size: 12px;
}
.upload-button:hover { background: #2a352d; }
.upload-button span { color: var(--leaf); }
.avatar {
  width: 36px;
  height: 36px;
  border: 0;
  background: linear-gradient(145deg, #8fbd70, #35533b);
  color: #101810;
}

.sidebar {
  top: 64px;
  width: var(--sidebar);
  padding: 14px 12px 18px;
  background: #0d120f;
  border-right: 1px solid var(--line);
}
.nav-item {
  height: 42px;
  gap: 17px;
  padding: 0 14px;
  border-radius: 9px;
  color: #d6ddd6;
  font-size: 13px;
}
.nav-item > span { color: #bec9be; font-size: 19px; }
.nav-item > span.nav-text {
  width: auto;
  flex: 0 0 auto;
  color: inherit;
  font-size: inherit;
  text-align: inherit;
}
.nav-item:hover, .nav-item.active { background: #202923; color: #fff; }
.nav-item.active { font-weight: 700; }
.nav-item.active > span { color: var(--leaf); }
.nav-divider { margin: 12px 4px; background: var(--line); }
.nav-label { margin: 0 13px 9px; color: #a4afa5; font-size: 11px; letter-spacing: .5px; }
.sidebar-card {
  margin: 22px 1px 0;
  padding: 15px 13px 13px;
  border-radius: 12px;
  background: #151d17;
  border-color: var(--line);
}
.sidebar-card b { font-size: 12px; }
.sidebar-card p { color: #a4afa5; }
.sidebar-card button { border-radius: 18px; background: var(--leaf); }
.sidebar-footer { padding: 0 10px; color: #778279; }

.main { margin-left: var(--sidebar); padding-top: 64px; }
.hero {
  height: auto;
  min-height: 260px;
  margin: 20px 28px 4px;
  padding: 32px 38px;
  border: 1px solid rgba(185, 230, 154, .13);
  border-radius: 16px;
  background: linear-gradient(105deg, #19291d 0%, #18231b 48%, #111813 100%);
}
.hero:before {
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #19291d 0%, rgba(25, 41, 29, .92) 42%, rgba(17, 24, 19, .1) 100%), url("maromovie-logo.png") no-repeat right 7% center / auto 115%;
  opacity: .16;
  filter: saturate(.6);
  mask-image: none;
}
.hero-content { max-width: 590px; }
.eyebrow, .section-kicker { color: var(--leaf); }
.eyebrow { font-size: 10px; letter-spacing: .8px; }
.eyebrow span { background: var(--leaf); box-shadow: 0 0 10px rgba(185, 230, 154, .7); }
.hero h1 {
  margin: 9px 0 5px;
  font-size: clamp(24px, 2.3vw, 34px);
  line-height: 1.35;
  letter-spacing: -.8px;
}
.hero h1 span { color: var(--leaf); }
.hero-content > p { margin: 7px 0 0; color: #c0cbc1; font-size: 12px; }
.hero-actions { margin-top: 14px; gap: 12px; }
.hero-actions .gold-button { min-height: 35px; border-radius: 20px; }
.text-button { padding: 8px 12px; border-radius: 18px; }
.text-button:hover { background: rgba(255,255,255,.08); }
.hero-art, .hero-bottom { display: none; }

.content-section { padding: 22px 28px 30px; }
.section-head { align-items: center; }
.section-kicker { font-size: 9px; letter-spacing: 1px; }
.section-head h2 { margin-top: 4px; font-size: 19px; letter-spacing: -.3px; }
.see-all { color: #bdc8be; }
.see-all span { color: var(--leaf); }
.chips {
  position: sticky;
  top: 64px;
  z-index: 8;
  margin: 0 -28px 16px;
  padding: 14px 28px;
  background: rgba(13, 18, 15, .96);
  backdrop-filter: blur(16px);
}
.chip {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  background: #202923;
  color: #e4ebe4;
  font-size: 12px;
}
.chip:hover { background: #2b382e; }
.chip.selected { background: var(--leaf); color: #122016; }
.video-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 18px; row-gap: 28px; }
.video-card { border-radius: 12px; }
.thumbnail { aspect-ratio: 16 / 9; border-radius: 12px; background-color: #1b261e; }
.thumbnail:after { background: linear-gradient(0deg, rgba(0,0,0,.56), transparent 48%); }
.play-badge span { background: var(--leaf); color: #122016; }
.duration { border-radius: 4px; padding: 3px 5px; }
.video-info { gap: 11px; padding-top: 11px; }
.channel-avatar {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  border: 0;
  background: #25352a;
  color: var(--leaf);
}
.video-copy h3 { font-size: 13px; line-height: 1.55; }
.video-copy p { color: #a4afa5; font-size: 11px; }
.video-copy p span { color: #778279; }
.creator-banner {
  margin: 12px 28px 36px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #151d17;
}
.creator-banner h2 { font-size: 15px; }
.creator-banner p { color: #a4afa5; }
.creator-icon { color: #142018; background: var(--leaf); }
.creator-banner .gold-button { border-radius: 20px; }
.upload-dialog, .account-dialog, .watch-dialog {
  border-color: rgba(185, 230, 154, .2);
  background: #151c17;
}
.gold-button { background: var(--leaf); color: #122016; border-radius: 20px; }
.title-field { border-radius: 8px; }

.watch-dialog { width: min(1320px, calc(100% - 36px)); max-height: min(92vh, 980px); overflow: auto; padding: 24px; border-radius: 14px; }
.watch-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; }
.watch-primary { min-width: 0; }
.watch-dialog .player-shell { border-radius: 12px; }
.watch-dialog .player-shell video { max-height: min(66vh, 720px); }
.watch-dialog h2 { font-size: 20px; line-height: 1.5; margin: 16px 0 6px; }
.watch-dialog #watchMeta { color: #9da99e; overflow-wrap: anywhere; }
.watch-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.watch-channel { min-width: 0; display: flex; align-items: center; gap: 11px; }
.watch-avatar { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; border-radius: 50%; background: #29392d center/cover no-repeat; color: var(--leaf); font-weight: 800; }
.watch-avatar.has-avatar { color: transparent; }
.watch-channel b, .watch-channel small { display: block; }
.watch-channel b { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.watch-channel small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.follow-button, .like-button { min-height: 38px; border: 0; border-radius: 22px; padding: 0 17px; background: #26332a; color: var(--cream); font-weight: 700; cursor: pointer; white-space: nowrap; }
.follow-button { margin-left: 8px; background: var(--leaf); color: #122016; }
.follow-button.is-following { background: #26332a; color: var(--cream); }
.like-button { display: flex; align-items: center; gap: 9px; }
.like-button.is-active { background: #35543a; color: var(--leaf); }
.follow-button:disabled, .like-button:disabled { opacity: .62; cursor: default; }
.watch-recommendations { min-width: 0; padding-top: 8px; }
.watch-recommendations h3 { font-size: 14px; margin: 0 0 13px; }
.recommendation { width: 100%; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 10px; align-items: start; padding: 0; margin: 0 0 12px; text-align: left; border: 0; background: transparent; color: var(--cream); cursor: pointer; }
.recommendation-thumb { aspect-ratio: 16/9; display: grid; place-items: center; border-radius: 8px; background: linear-gradient(145deg,#293c2e,#121b15); color: var(--leaf); }
.recommendation b { display: -webkit-box; overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 12px; line-height: 1.5; }
.recommendation small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.recommendation-empty { color: var(--muted); font-size: 12px; }

@media (min-width: 851px) {
  body.sidebar-collapsed { --sidebar: 78px; }
  .sidebar-collapsed .sidebar { padding-right: 8px; padding-left: 8px; }
  .sidebar-collapsed .nav-item {
    height: 62px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 5px 0;
    font-size: 9px;
    text-align: center;
  }
  .sidebar-collapsed .nav-item > span:first-child { width: auto; font-size: 19px; }
  .sidebar-collapsed .nav-divider { margin: 10px 5px; }
  .sidebar-collapsed .nav-label,
  .sidebar-collapsed .sidebar-card,
  .sidebar-collapsed .sidebar-footer { display: none; }
}

@media (min-width: 1600px) {
  .video-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1250px) {
  .video-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { margin-left: 22px; margin-right: 22px; }
  .content-section { padding-left: 22px; padding-right: 22px; }
  .chips { margin-left: -22px; margin-right: -22px; padding-left: 22px; padding-right: 22px; }
}
@media (max-width: 850px) {
  :root { --sidebar: 224px; }
  .topbar { height: 60px; padding: 0 14px; gap: 10px; }
  .menu-toggle { width: 36px; flex-basis: 36px; }
  .brand { min-width: 156px; }
  .sidebar { top: 60px; }
  .main { margin-left: 0; padding-top: 60px; }
  .hero { min-height: 240px; padding: 25px 28px; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chips { top: 60px; }
  .watch-layout { grid-template-columns: minmax(0, 1fr); }
  .watch-recommendations { border-top: 1px solid var(--line); padding-top: 16px; }
  .watch-recommendations > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}
@media (max-width: 560px) {
  .topbar { padding: 0 9px; gap: 6px; }
  .brand { min-width: auto; }
  .brand-word small { display: none; }
  .brand-word { font-size: 13px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 8px; }
  .search { height: 36px; }
  .search input { width: 26px; padding: 0 10px; }
  .search button { width: 36px; }
  .top-actions { gap: 0; }
  .upload-button { width: 34px; height: 34px; padding: 0; font-size: 0; }
  .upload-button span { font-size: 20px; }
  .hero { min-height: 225px; margin: 12px 12px 0; padding: 21px 18px; border-radius: 13px; }
  .hero:before { background-position: right -24px center; background-size: auto 100%; opacity: .12; }
  .hero h1 { font-size: 25px; margin-top: 9px; }
  .hero-content > p { max-width: 270px; font-size: 10px; }
  .hero-actions { margin-top: 12px; }
  .content-section { padding: 19px 12px 25px; }
  .section-head h2 { font-size: 17px; }
  .chips { top: 60px; margin: 0 -12px 13px; padding: 11px 12px; gap: 7px; }
  .chip { padding: 7px 11px; font-size: 10px; }
  .video-grid { gap: 20px 11px; }
  .watch-dialog { width: calc(100% - 14px); max-height: 96vh; padding: 42px 12px 15px; }
  .watch-dialog h2 { font-size: 16px; }
  .watch-actions { flex-wrap: wrap; }
  .watch-channel { flex: 1 1 100%; }
  .follow-button { margin-left: auto; }
  .like-button { margin-left: 53px; }
  .watch-recommendations > div { grid-template-columns: 1fr; }
  .recommendation { grid-template-columns: 118px minmax(0,1fr); }
  .thumbnail { border-radius: 9px; }
  .video-info { gap: 7px; padding-top: 8px; }
  .channel-avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 10px; }
  .video-copy h3 { font-size: 10px; }
  .video-copy p { font-size: 9px; }
  .creator-banner { margin: 10px 12px 22px; padding: 14px 12px; gap: 9px; }
  .creator-banner h2 { font-size: 12px; }
  .creator-banner p { font-size: 9px; }
}
