:root {
  --primary-bg: #202020;
  --sidebar-bg: #2C2C2C;
  --surface-dark: #111111;
  --accent: #70C8C0;
  --accent-light: #A8E0D8;
  --text-primary: #F5F5F5;
  --text-secondary: #BDBDBD;
  --border-color: #3A3A3A;
  color-scheme: dark;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--primary-bg);
  color: var(--text-primary);
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--primary-bg);
}

button, select, input {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.app {
  display: grid;
  grid-template-columns: 272px 1fr;
  min-height: 100vh;
}

aside {
  margin: 16px 0 16px 16px;
  background: var(--sidebar-bg);
  border-radius: 28px;
  padding: 26px 18px;
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 23px;
  font-weight: 600;
  padding: 0 10px 26px;
  letter-spacing: -0.3px;
}

.logo b {
  font-weight: 300;
  color: var(--accent-light);
}

.logo svg {
  stroke: none;
  fill: var(--accent-light);
  width: 26px;
  height: 26px;
}

.nav button {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px 16px;
  border-radius: 16px;
  color: var(--text-secondary);
  font-size: 16px;
  text-align: left;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.nav button.on {
  color: var(--accent);
}

.nav hr {
  border: 0;
  border-top: 1px solid var(--border-color);
  margin: 10px 8px;
}

.cw {
  margin-top: auto;
}

.cw h3 {
  font-size: 15px;
  font-weight: 500;
  padding: 0 8px 12px;
}

.cw button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px;
  border-radius: 14px;
  text-align: left;
}

.cw button:hover {
  background: rgba(255, 255, 255, 0.05);
}

.th {
  width: 58px;
  height: 50px;
  border-radius: 10px;
  flex: none;
  background-size: cover;
  background-position: center;
}

.cw div {
  flex: 1;
  min-width: 0;
}

.cw b {
  display: block;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw small {
  color: var(--text-secondary);
  font-size: 13px;
}

.pl {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  flex: none;
}

.pl svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
  stroke: none;
}

.wrap {
  padding: 16px 24px 100px;
  min-width: 0;
}

.bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  background: var(--sidebar-bg);
  border-radius: 99px;
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 10px;
  border: 1px solid transparent;
}

.pf select {
  max-width: 150px;
}

.bar select {
  appearance: none;
  background: transparent;
  border: 0;
  outline: 0;
  cursor: pointer;
  color: var(--text-primary);
  padding-right: 6px;
}

.bar select option {
  background: var(--sidebar-bg);
}

.search {
  flex: 1;
}

.search input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: 0;
  font-size: 16px;
}

.search input::placeholder {
  color: var(--text-secondary);
}

.pill:focus-within {
  border-color: var(--accent);
}

.ib {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--sidebar-bg);
  display: grid;
  place-items: center;
  flex: none;
}

.ib:hover {
  color: var(--accent);
}

.av {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-light));
  color: var(--surface-dark);
  font-weight: 700;
  display: grid;
  place-items: center;
}

.herox {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  margin-top: 18px;
}

.hero {
  position: relative;
  height: min(430px, 62vh);
  min-height: 340px;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 34px;
  isolation: isolate;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(17, 17, 17, 0.85), transparent 55%),
              linear-gradient(90deg, rgba(17, 17, 17, 0.55), transparent 60%);
}

.hero .art {
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
}

.badge {
  position: absolute;
  top: 24px;
  left: 26px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: rgba(17, 17, 17, 0.5);
  backdrop-filter: blur(8px);
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 14px;
}

.badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.harr {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 3;
}

.harr:hover {
  color: var(--accent);
}

.harr.l { left: 14px; }
.harr.r { right: 14px; }

.hprog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(255, 255, 255, 0.15);
  z-index: 3;
}

.hprog i {
  display: block;
  height: 100%;
  background: var(--accent);
  animation: hp 7s linear forwards;
}

@keyframes hp {
  from { width: 0; }
  to { width: 100%; }
}

.genres {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.genres span {
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(8px);
  border-radius: 99px;
  padding: 5px 16px;
  font-size: 14px;
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  font-weight: 600;
  letter-spacing: -1px;
  line-height: 1.05;
}

.hero p {
  max-width: 50ch;
  color: #e6e6e6;
  margin: 10px 0 20px;
  font-weight: 300;
  line-height: 1.5;
}

.acts {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.wn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--surface-dark);
  font-weight: 500;
  height: 48px;
  padding: 0 24px;
  border-radius: 99px;
}

.wn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  stroke: none;
}

.wn:hover {
  background: var(--accent-light);
}

.dl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(8px);
  height: 48px;
  padding: 0 22px;
  border-radius: 99px;
}

.dl svg {
  width: 18px;
  height: 18px;
}

.dl:hover {
  background: rgba(17, 17, 17, 0.8);
}

.hlist {
  display: grid;
  gap: 10px;
  grid-auto-rows: 1fr;
  max-height: min(430px, 62vh);
}

.hi {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  padding: 10px;
  border-radius: 20px;
  background: var(--sidebar-bg);
  overflow: hidden;
  min-height: 0;
}

.hi:hover {
  background: #353535;
}

.hi.on {
  background: var(--accent);
  color: var(--surface-dark);
}

.hth {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  flex: none;
  background-size: cover;
  background-position: center;
}

.hi b {
  font-size: 15px;
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}

.hi p {
  font-size: 12px;
  opacity: 0.85;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

h2.t {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin: 34px 0 16px;
}

.spot {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border-radius: 28px;
  overflow: hidden;
  background: hsl(var(--sh) 45% 22%);
  min-height: 300px;
  position: relative;
}

.sposters {
  display: flex;
}

.sposters button {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-weight: 600;
  font-size: 13px;
  text-align: left;
  color: #fff;
  border-right: 2px solid rgba(0, 0, 0, 0.25);
  background-size: cover;
  background-position: center;
}

.sinfo {
  position: relative;
  padding: 28px;
  display: grid;
  gap: 14px;
  align-content: center;
  background: hsl(var(--sh) 50% 28%);
}

.sinfo h3 {
  font-size: 19px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding-right: 90px;
}

.srow {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.sth2 {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  flex: none;
  background-size: cover;
  background-position: center;
}

.srow p {
  color: #e6e6e6;
  font-weight: 300;
  line-height: 1.5;
  font-size: 14px;
}

.sd {
  display: flex;
  gap: 16px;
  font-size: 14px;
}

.sd b {
  width: 64px;
  flex: none;
  font-weight: 600;
}

.sctl {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.sctl button {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.6);
  display: grid;
  place-items: center;
}

.sctl button:hover {
  color: var(--accent);
}

.tabs {
  display: flex;
  gap: 10px;
  margin: 34px 0 18px;
  flex-wrap: wrap;
}

.tb {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 99px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  font-weight: 500;
}

.tb:hover {
  border-color: var(--accent);
}

.tb.on {
  background: var(--accent);
  color: var(--surface-dark);
  border-color: var(--accent);
}

.tb svg {
  width: 18px;
  height: 18px;
}

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

.track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.track::-webkit-scrollbar {
  display: none;
}

.card {
  flex: none;
  width: 200px;
  scroll-snap-align: start;
  text-align: left;
  position: relative;
}

.grid .card {
  width: auto;
}

.pw {
  position: relative;
}

.pbtn {
  display: block;
  width: 100%;
  text-align: left;
}

.poster {
  aspect-ratio: 2/3;
  border-radius: 22px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  align-items: flex-end;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.15;
  position: relative;
  color: #fff;
  transition: transform 0.2s;
  background-size: cover;
  background-position: center;
}

.card:hover .poster {
  transform: translateY(-4px);
}

.poster::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 65% 22%, rgba(255, 255, 255, 0.28), transparent 45%),
              linear-gradient(0deg, rgba(0, 0, 0, 0.5), transparent 55%);
}

.poster span {
  position: relative;
  padding-right: 30px;
  word-break: break-word;
}

.poster em {
  position: absolute;
  z-index: 1;
  font-style: normal;
  font-size: 12px;
  font-weight: 600;
  background: rgba(17, 17, 17, 0.72);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 3px 8px;
}

.qb {
  top: 10px;
  left: 10px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.qb b {
  color: var(--accent);
  font-weight: 600;
}

.ept {
  top: 10px;
  right: 10px;
}

.pov {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  opacity: 0;
  background: rgba(0, 0, 0, 0.35);
  transition: opacity 0.2s;
}

.pov svg {
  width: 50px;
  height: 50px;
  fill: #fff;
  stroke: none;
  background: rgba(17, 17, 17, 0.65);
  border-radius: 50%;
  padding: 14px;
}

.card:hover .pov, .pbtn:focus-visible .pov {
  opacity: 1;
}

.hb {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.55);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 3;
}

.hb svg {
  width: 18px;
  height: 18px;
}

.hb.on {
  color: var(--accent);
}

.hb.on svg {
  fill: var(--accent);
}

.ct {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin: 10px 4px 0;
}

.ct b {
  font-weight: 500;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inf {
  flex: none;
  color: var(--accent);
  display: grid;
  place-items: center;
}

.inf svg {
  width: 18px;
  height: 18px;
}

.cm {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 4px 4px 0;
}

.cm span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.cm svg {
  width: 14px;
  height: 14px;
}

/* Watch Page */
.watch .back {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--text-secondary);
  margin: 22px 0 14px;
}

.wlayout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: start;
}

.wtitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.wtitle h1 {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -1px;
}

.player {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 28px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

.player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
}

.big svg {
  width: 26px;
  height: 26px;
  fill: #fff;
  stroke: none;
}

.ctl {
  position: relative;
  width: 100%;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.7), transparent);
  font-size: 14px;
}

.pb {
  flex: 1;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
}

.pb i {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 3px;
}

.servers {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}

.sv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  height: 42px;
  padding: 0 24px;
  border-radius: 99px;
  font-weight: 500;
}

.sv:hover:not(:disabled) {
  border-color: var(--accent);
}

.sv.on {
  background: var(--accent);
  color: var(--surface-dark);
  border-color: var(--accent);
}

.sv.on i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-dark);
}

.sv:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.svnote {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
}

.ad {
  margin: 16px 0;
  border: 1px dashed var(--border-color);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

.dmeta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

.dmeta a {
  color: var(--accent);
}

.dmeta .age {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 8px;
}

.desc {
  color: var(--text-secondary);
  margin: 16px 0;
  max-width: 80ch;
  font-weight: 300;
  line-height: 1.6;
}

.dbox {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  background: var(--sidebar-bg);
  border-radius: 20px;
  padding: 20px;
}

.dtext {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
  min-width: 0;
}

.dr b {
  color: var(--text-primary);
  font-weight: 600;
}

.dr {
  color: var(--text-secondary);
}

.dr .star {
  color: #F5B301;
}

.dr .v {
  color: var(--text-secondary);
  margin-left: 2px;
  display: inline;
  font-size: 13px;
}

.lk {
  color: var(--accent);
  cursor: pointer;
}

.lk:hover {
  text-decoration: underline;
}

.dthumb {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
}

.tags {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.9;
}

.share {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.share h3 {
  font-size: 18px;
  font-weight: 600;
  margin-right: 6px;
}

.share button {
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 99px;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.share button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.wside h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 18px 0 12px;
}

.si {
  display: flex;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 16px;
  margin-bottom: 6px;
}

.si:hover {
  background: rgba(255, 255, 255, 0.05);
}

.sth {
  width: 88px;
  aspect-ratio: 2/2.9;
  border-radius: 14px;
  flex: none;
  padding: 8px;
  display: flex;
  align-items: flex-end;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}

.sit {
  display: grid;
  gap: 3px;
  align-content: start;
  min-width: 0;
}

.sit b {
  font-weight: 500;
  font-size: 16px;
}

.sit em {
  font-style: normal;
  color: #F5A04A;
  font-size: 13px;
  font-weight: 500;
}

.sit span, .sit small {
  color: var(--text-secondary);
  font-size: 13px;
}

.fb {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: var(--sidebar-bg);
  height: 46px;
  padding: 0 20px;
  border-radius: 99px;
}

.fb.on {
  color: var(--accent);
}

/* Modals & Panels */
.empty, .panel p {
  color: var(--text-secondary);
}

.empty {
  padding: 60px 0;
}

.panel {
  background: var(--sidebar-bg);
  border-radius: 24px;
  padding: 26px;
  max-width: 560px;
}

.panel h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid var(--border-color);
}

.sw {
  position: relative;
  width: 44px;
  height: 26px;
}

.sw input {
  opacity: 0;
  position: absolute;
  inset: 0;
  cursor: pointer;
  z-index: 1;
}

.sw i {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border-color);
  transition: 0.2s;
}

.sw i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}

.sw input:checked + i {
  background: var(--accent);
}

.sw input:checked + i::after {
  transform: translateX(18px);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.65);
  display: grid;
  place-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal[hidden] {
  display: none;
}

.mbox {
  position: relative;
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  max-width: 640px;
  width: 100%;
  background: var(--sidebar-bg);
  border-radius: 26px;
  padding: 22px;
}

.mp {
  aspect-ratio: 2/3;
  border-radius: 18px;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font-weight: 600;
  background-size: cover;
  background-position: center;
}

.mt h3 {
  font-size: 24px;
  font-weight: 600;
  padding-right: 36px;
}

.mm {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 6px 0 10px;
}

.mg {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.mg span {
  border: 1px solid var(--border-color);
  border-radius: 99px;
  padding: 3px 12px;
  font-size: 13px;
}

.mt p {
  color: var(--text-secondary);
  line-height: 1.6;
  font-weight: 300;
}

.ma {
  margin-top: 16px;
}

.mx {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
}

/* =========================================================
   MOVIE POSTER GENERATOR STUDIO
========================================================= */
.pg-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  background: var(--sidebar-bg);
  border-radius: 28px;
  padding: 28px;
  margin-top: 18px;
  border: 1px solid var(--border-color);
}

.pg-head {
  margin-bottom: 22px;
}

.pg-head h3 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.pg-head p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

.pg-modes {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}

.pg-mbtn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  font-weight: 500;
  font-size: 14px;
}

.pg-mbtn.on {
  background: var(--accent);
  color: var(--surface-dark);
  border-color: var(--accent);
  font-weight: 600;
}

.pg-form {
  display: grid;
  gap: 16px;
}

.pg-field {
  display: grid;
  gap: 6px;
}

.pg-field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.pg-in {
  width: 100%;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 14px;
  color: var(--text-primary);
}

.pg-in:focus {
  border-color: var(--accent);
  outline: none;
}

.pg-row {
  display: grid;
  grid-template-columns: 1fr 140px 140px auto;
  gap: 10px;
}

.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: var(--surface-dark);
  font-weight: 600;
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  align-self: flex-end;
}

.pg-btn:hover {
  background: var(--accent-light);
}

.pg-hint {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pg-hint.warn {
  color: #F5A04A;
}

/* TMDB Results List */
.pg-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 14px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 6px;
  margin-top: 18px;
  scrollbar-width: thin;
}

.pg-item {
  background: var(--primary-bg);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  text-align: left;
  transition: transform 0.15s, border-color 0.15s;
}

.pg-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.pg-item-img {
  aspect-ratio: 2/3;
  width: 100%;
  background: #111;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 6px;
  font-size: 11px;
}

.pg-item-info {
  padding: 8px;
  display: grid;
  gap: 2px;
}

.pg-item-info b {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pg-item-info small {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Live Card Preview Box */
.pg-preview-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.pg-preview-title {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  align-self: flex-start;
}

.pg-meta-actions {
  display: grid;
  gap: 8px;
  width: 100%;
}

.pg-act-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  border-radius: 10px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 500;
}

.pg-act-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pg-apply-box {
  width: 100%;
  background: var(--primary-bg);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border-color);
}

.pg-apply-box label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
}

.pg-apply-box select {
  width: 100%;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-primary);
}

/* Footer & Nav */
.ft {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.join {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}

.jn {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 20px;
  border-radius: 99px;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  text-decoration: none;
}

.jn:hover {
  border-color: var(--accent);
}

.jn svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.fl {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 26px;
  color: var(--text-secondary);
  font-size: 14px;
}

.fl nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.fl nav button, .fl nav a {
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
}

.disc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 14px;
  line-height: 1.6;
}

.top {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--surface-dark);
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 25;
}

.top.on {
  opacity: 1;
  pointer-events: auto;
}

.bn {
  display: none;
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  background: var(--sidebar-bg);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 8px;
  justify-content: space-around;
}

.bn button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 12px;
  border-radius: 14px;
  color: var(--text-secondary);
  font-size: 11px;
}

.bn button.on {
  color: var(--accent);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  background: var(--text-primary);
  color: var(--surface-dark);
  padding: 10px 18px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 14px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.toast.on {
  opacity: 1;
}

/* Responsiveness */
@media (max-width: 1100px) {
  .herox { grid-template-columns: 1fr; }
  .hlist { display: none; }
  .wlayout { grid-template-columns: 1fr; }
  .pg-box { grid-template-columns: 1fr; }
  .pg-preview-wrap { order: -1; }
}

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  aside { display: none; }
  .bn { display: flex; }
  .wrap { padding: 14px 14px 110px; }
  .hero { padding: 22px; border-radius: 26px; }
  .card { width: 158px; }
  .grid .card { width: auto; }
  .bar .ib.bell { display: none; }
  .pf2 { display: none; }
  .spot { grid-template-columns: 1fr; }
  .sposters { height: 220px; }
  .dbox { flex-direction: column-reverse; }
  .wtitle h1 { font-size: 24px; }
  .pg-row { grid-template-columns: 1fr; }
  .top { bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 600px) {
  .mbox { grid-template-columns: 1fr; }
  .mp { aspect-ratio: auto; height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .hprog i { animation: none; width: 100%; }
}