* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  --bg: #0f1220;
  --card: #1a1f35;
  --panel: #161b2e;
  --surface: #1a2038;
  --input: #0f1220;
  --topbar: #151a30;
  --tabbar: #141829;
  --tabbar-border: #242a45;
  --thumb: #222844;
  --border: #2c3352;
  --hover: #2a3153;
  --scrim-rgb: 15 18 32;
  --accent: #7c5cff;
  --accent2: #5a3dff;
  --accent-rgb: 124 92 255;
  --text: #e8eaf2;
  --muted: #9aa0b8;
  --radius: 12px;
}

/* Ikuti Sistem (default tanpa data-theme): otomatis ikut prefers-color-scheme OS */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f4fa;
    --card: #ffffff;
    --panel: #eceff7;
    --surface: #ffffff;
    --input: #f2f4fa;
    --topbar: #f9fafc;
    --tabbar: #ffffff;
    --tabbar-border: #e3e7f2;
    --thumb: #dfe3f1;
    --border: #d4d9e8;
    --hover: #e8ebf5;
    --scrim-rgb: 26 29 42;
    --accent: #5b43e8;
    --accent2: #3f2ac4;
    --accent-rgb: 91 67 232;
    --text: #1b2133;
    --muted: #5d6985;
  }
}

html[data-theme="light"] {
  --bg: #f2f4fa;
  --card: #ffffff;
  --panel: #eceff7;
  --surface: #ffffff;
  --input: #f2f4fa;
  --topbar: #f9fafc;
  --tabbar: #ffffff;
  --tabbar-border: #e3e7f2;
  --thumb: #dfe3f1;
  --border: #d4d9e8;
  --hover: #e8ebf5;
  --scrim-rgb: 26 29 42;
  --accent: #5b43e8;
  --accent2: #3f2ac4;
  --accent-rgb: 91 67 232;
  --text: #1b2133;
  --muted: #5d6985;
}

html[data-theme="dark"] {
  --bg: #0f1220;
  --card: #1a1f35;
  --panel: #161b2e;
  --surface: #1a2038;
  --input: #0f1220;
  --topbar: #151a30;
  --tabbar: #141829;
  --tabbar-border: #242a45;
  --thumb: #222844;
  --border: #2c3352;
  --hover: #2a3153;
  --scrim-rgb: 15 18 32;
  --accent: #7c5cff;
  --accent2: #5a3dff;
  --accent-rgb: 124 92 255;
  --text: #e8eaf2;
  --muted: #9aa0b8;
}

/* Light Neon */
html[data-theme="neon"] {
  --bg: #f5f4ff;
  --card: #ffffff;
  --panel: #efe8ff;
  --surface: #ffffff;
  --input: #f0edff;
  --topbar: #ffffff;
  --tabbar: #ffffff;
  --tabbar-border: #dfd6ff;
  --thumb: #e3daff;
  --border: #cfc2ff;
  --hover: #ece5ff;
  --scrim-rgb: 30 25 60;
  --accent: #ff1e9d;
  --accent2: #7c3aed;
  --accent-rgb: 255 30 157;
  --text: #171233;
  --muted: #6a6398;
}

/* Pink */
html[data-theme="pink"] {
  --bg: #1f0f18;
  --card: #2c1622;
  --panel: #251222;
  --surface: #331a2c;
  --input: #180b12;
  --topbar: #2b1424;
  --tabbar: #1c0d15;
  --tabbar-border: #492337;
  --thumb: #3a1f2f;
  --border: #462132;
  --hover: #3b2032;
  --scrim-rgb: 31 15 24;
  --accent: #ff5c8a;
  --accent2: #e53273;
  --accent-rgb: 255 92 138;
  --text: #ffeef3;
  --muted: #d0a0b4;
}
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 84px; /* ruang buat tabbar fixed */
}
a { color: inherit; text-decoration: none; }
svg { width: 1.15em; height: 1.15em; display: block; }
.ic { display: inline-flex; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  background: var(--topbar);
}
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; }
.brand-icon {
  display: inline-flex;
  width: 30px; height: 30px;
  align-items: center; justify-content: center;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
}
.brand-accent { color: var(--accent); }
.back-link { color: var(--muted); font-size: 14px; }
.topbar-left { display: flex; align-items: center; gap: 6px; }
.back-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 999px;
  color: var(--muted);
  transition: background .12s, color .12s;
}
.back-arrow:hover { background: var(--card); color: var(--accent); }
.back-arrow svg { width: 20px; height: 20px; }
.topnav { display: flex; align-items: center; gap: 14px; }
.topnav a { color: var(--muted); font-size: 14px; }
.topnav a:hover { color: var(--accent); }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 16px 18px; }
.view-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.link-btn { background: none; border: 0; color: var(--accent); font-size: 13px; cursor: pointer; font-weight: 600; }
.section-title { font-size: 17px; margin: 16px 4px 12px; }

/* ---------- grid cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .12s ease;
}
.card:hover { transform: translateY(-3px); }
.thumb {
  position: relative;
  aspect-ratio: 3/4;
  background: var(--thumb);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ph {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--muted); font-size: 12px;
}
.badge {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,.65);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  color: #fff;
}
.st-badge { position: absolute; top: 6px; left: 6px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.st-badge.ongoing { background: #22c55e; color: #062314; }
.st-badge.end { background: rgba(255,255,255,.85); color: #18203e; }
.meta { padding: 10px; }
.title {
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.sub { color: var(--muted); font-size: 11px; margin-top: 4px; }
.rating-stars { color: #ffc24b; }

/* ---------- pager ---------- */
.pager { display: flex; justify-content: center; gap: 10px; margin: 22px 0 10px; }
.pager button {
  padding: 10px 22px;
  border: 0; cursor: pointer;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

/* ---------- state ---------- */
.loading, .error, .muted-tip {
  grid-column: 1 / -1;
  padding: 40px;
  text-align: center;
  color: var(--muted);
}
.error { color: #ff7b7b; }

/* ---------- search bar ---------- */
.search { display: flex; gap: 6px; flex: 1; max-width: 420px; }
.search.big { max-width: 100%; margin: 4px 4px 8px; }
.search input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--input);
  color: var(--text);
  outline: none;
}
.search button {
  padding: 10px 20px;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
}

/* ---------- years: custom dropdown ---------- */
.dd-wrap { display: flex; gap: 10px; margin: 8px 0 6px; flex-wrap: wrap; }
.dd { position: relative; }
.dd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  min-width: 150px;
  justify-content: space-between;
  transition: border-color .12s, background .12s;
}
.dd-btn:hover { border-color: var(--accent); }
.dd-btn svg { width: 16px; height: 16px; color: var(--muted); transition: transform .15s; }
.dd.open .dd-btn svg { transform: rotate(180deg); }
.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  min-width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.45);
  display: none;
}
.dd.open .dd-menu { display: block; }
.dd-opt {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: none;
  border: 0;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
}
.dd-opt:hover { background: var(--hover); color: #fff; }
.dd-opt.active { background: var(--accent); color: #fff; font-weight: 700; }
.sel-label { color: var(--accent); font-weight: 700; font-size: 13px; }

/* ---------- portfolio (tab Tentang) ---------- */
.pf-hero {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}
.pf-banner {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, #2b224a, #6b3fa0 45%, #ff5c9a);
}
.pf-banner-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-banner-tip {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: rgba(255,255,255,.72);
  font-size: 13px; font-weight: 600; letter-spacing: .3px;
}
.pf-head {
  position: relative;
  margin-top: -46px;
  padding: 0 16px 14px;
  text-align: center;
}
.pf-avatar {
  position: relative;
  width: 84px; height: 84px;
  margin: 0 auto;
  border-radius: 50%;
  border: 4px solid var(--bg);
  background: linear-gradient(135deg, #6b3fa0, #ff5c9a);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pf-avatar-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pf-avatar-letter { font-size: 32px; font-weight: 800; color: #fff; }
.pf-name { margin: 12px 0 2px; font-size: 20px; letter-spacing: .3px; }
.pf-role { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.pf-social { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.pf-social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgb(var(--accent-rgb) / .14);
  color: var(--text);
  transition: background .15s, color .15s;
}
.pf-social a svg { width: 18px; height: 18px; }
.pf-social a:hover { background: var(--accent); color: #fff; }
.pf-quote {
  margin: 8px 16px 16px;
  padding: 12px 14px;
  border-left: 3px solid var(--accent);
  background: rgb(var(--accent-rgb) / .12);
  border-radius: 8px;
  font-size: 13px; font-style: italic; line-height: 1.6;
  color: var(--text);
  text-align: center;
}

/* ---------- about ---------- */
.about-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  line-height: 1.6;
}
.f-list { list-style: none; padding: 0; margin: 14px 0 0; }
.f-list li { display: flex; gap: 10px; margin-bottom: 10px; font-size: 14px; }
.f-list li::before {
  content: "";
  flex: 0 0 18px; height: 18px;
  border-radius: 50%;
  background: var(--accent);
}
.ic-ok {
  flex: 0 0 18px; height: 18px; margin-top: 1px;
  border-radius: 50%;
  background: #22c55e;
  position: relative;
}
.ic-ok::after {
  content: "";
  position: absolute;
  left: 5px; top: 3px;
  width: 5px; height: 9px;
  border: solid #062314;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ---------- bottom tab navigation ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--tabbar);
  border-top: 1px solid var(--tabbar-border);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
}
.tab-ic { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; }
.tab-ic svg { width: 20px; height: 20px; }
.tab.active { color: var(--accent); }
.tab.active .tab-ic {
  background: rgb(var(--accent-rgb) / .14);
  border-radius: 999px;
}

/* ---------- episode list ---------- */
.ep-list { display: flex; flex-direction: column; gap: 8px; }
.ep {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--card);
  border-radius: 10px;
  padding: 12px 14px;
  transition: background .12s;
}
.ep:hover { background: var(--hover); }
.ep-no { font-size: 14px; font-weight: 600; flex: 1; }
.ep-views { color: var(--muted); font-size: 12px; }
.ep-badge {
  background: var(--border);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.ep.active {
  border: 1px solid var(--accent);
  background: var(--hover);
}
.ep .play-ind { color: var(--accent); display: none; }
.ep.active .play-ind { display: inline-flex; }

/* ---------- detail ---------- */
.anime-head { display: flex; gap: 16px; background: var(--card); border-radius: var(--radius); padding: 16px; }
.a-poster { width: 150px; border-radius: 10px; object-fit: cover; }
.a-info { flex: 1; }
.a-info h1 { margin: 0 0 8px; font-size: 20px; }
.a-tags { color: var(--muted); margin: 0 0 6px; font-size: 13px; }
.a-sub { color: var(--muted); font-size: 13px; margin: 0; }
.statusbar { display: inline-flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.st { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.st-ongoing { background: #22c55e; color: #062314; }
.st-end { background: #64748b; color: #0f172a; }

/* ---------- sinopsis / info ---------- */
.info-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.info-row { display: flex; gap: 10px; font-size: 14px; }
.info-row .info-label { color: var(--accent); font-weight: 700; min-width: 84px; flex: 0 0 auto; }
.info-row .info-val { color: var(--text); line-height: 1.5; }
.info-row.synopsis .info-val { color: var(--muted); }

/* ---------- prev / next navigasi episode ---------- */
.ep-nav {
  display: flex;
  gap: 10px;
  margin: 14px 4px 6px;
}
.ep-nav button {
  flex: 1;
  padding: 11px 12px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.ep-nav button:disabled { opacity: .35; cursor: default; border-color: var(--border); color: var(--muted); }
.ep-nav button svg { width: 18px; height: 18px; }
.ep-nav .prev svg { transform: rotate(180deg); }

/* ---------- player ---------- */
#player-wrap h2 { font-size: 18px; margin: 10px 4px; }
#video {
  width: 100%;
  max-height: 70vh;
  background: #000;
  border-radius: var(--radius);
}
.qualities { display: flex; gap: 8px; margin: 12px 4px; flex-wrap: wrap; }
.q {
  padding: 8px 18px;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.q:hover, .q.active { background: var(--accent); color: #fff; }
.links { margin: 8px 4px; font-size: 14px; color: var(--muted); }
.links a { color: var(--accent); display: inline-flex; gap: 4px; align-items: center; }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
}

.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 20px 0 10px; }
.foot:empty { display: none; }

/* ---------- auth landing (login/signup) ---------- */
.auth-body { padding-bottom: 40px; }
.auth-main { max-width: 480px; margin: 0 auto; padding: 24px 18px 60px; }
.auth-hero { text-align: center; padding: 10px 8px 22px; }
.auth-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--accent);
  background: rgb(var(--accent-rgb) / .12);
}
.auth-hero h1 { margin: 0 0 8px; font-size: 26px; }
.auth-sub { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }

.auth-card {
  background: var(--card);
  border-radius: 16px;
  padding: 20px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 4px;
  background: var(--panel);
  border-radius: 12px;
  margin-bottom: 18px;
}
.auth-tab {
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.active { background: var(--accent); color: #fff; }

.auth-method-label { margin: 0 0 10px; font-size: 12px; color: var(--muted); }
.auth-methods { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.auth-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.auth-method:hover { border-color: var(--accent); }
.auth-method.active { border-color: var(--accent); background: rgb(var(--accent-rgb) / .10); }
.auth-method-ic {
  flex: 0 0 40px;
  height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: rgb(var(--accent-rgb) / .14);
  color: var(--accent);
}
.auth-method-ic svg { width: 20px; height: 20px; }
.auth-method-tx b { display: block; font-size: 14px; }
.auth-method-tx small { color: var(--muted); font-size: 11.5px; }

.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field span { font-size: 12px; color: var(--muted); font-weight: 600; }
.auth-field input {
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--input);
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.auth-field input:focus { border-color: var(--accent); }
.auth-otp-row { display: flex; align-items: flex-end; gap: 8px; }
.auth-otp-row .auth-field { flex: 1; }
.auth-send {
  padding: 11px 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.auth-send:disabled { opacity: .5; cursor: default; }
.auth-submit {
  margin-top: 4px;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}
.auth-submit:disabled { opacity: .6; cursor: default; }
.auth-hint { margin: 0; font-size: 12px; color: var(--muted); }
.auth-hint b { color: var(--accent); }
.auth-msg { margin: 0; font-size: 13px; line-height: 1.5; }
.auth-msg.ok { color: #22c55e; }
.auth-msg.err { color: #ff7b7b; }
.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: rgb(var(--scrim-rgb) / .72);
  color: var(--text);
  font-weight: 700;
  backdrop-filter: blur(2px);
}

@media (max-width: 520px) {
  .grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
  .anime-head { flex-direction: column; }
  .a-poster { width: 100%; }
}

/* ---------- tombol profil kanan-atas (topbar) ---------- */
.topbar-right { display: flex; align-items: center; gap: 10px; }
.profile-wrap { position: relative; }
.profile-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  overflow: hidden;
  transition: border-color .15s, color .15s, transform .1s;
  flex: none;
}
.profile-btn svg { width: 20px; height: 20px; }
.profile-btn:hover { border-color: var(--accent2); color: #fff; }
.profile-btn:active { transform: scale(.96); }
.pbm-img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

/* ---------- dropdown profil ---------- */
.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  z-index: 80;
}
.pm-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.pm-ava {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
}
.pm-name { font-size: 15px; font-weight: 800; }
.pm-sub { margin-top: 2px; font-size: 12px; color: var(--muted); }
.pm-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .12s, color .12s;
}
.pm-item svg { width: 16px; height: 16px; flex: none; }
.pm-item:hover { background: var(--card); color: var(--accent); }
.pm-logout { color: #ff8a8a; }
.pm-logout:hover { background: rgba(255,80,80,.12); color: #ff5c5c; }

/* ---------- halaman profil: avatar upload ---------- */
.prof-ava-wrap { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.prof-ava-frame {
  position: relative;
  width: 96px; height: 96px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--accent);
  background: var(--card);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.prof-ava-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prof-ava-letter { font-size: 34px; font-weight: 800; color: #fff; }
.prof-ava-side { display: flex; flex-direction: column; gap: 8px; }
.prof-ava-side .auth-submit { margin: 0; }
.prof-hidden-input { display: none; }

/* ---------- halaman profil: layout section ---------- */
.prof-card { padding: 4px 22px 24px; }
.prof-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(148,163,184,.14);
}
.prof-section:last-child { border-bottom: 0; padding-bottom: 4px; }
.prof-sec-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.prof-sec-title::before {
  content: '';
  width: 4px; height: 14px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}
.prof-card .prof-ava-wrap { margin-bottom: 0; }
.prof-summary { display: flex; flex-direction: column; }
.prof-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: rgb(var(--scrim-rgb) / .6);
  border-radius: 10px;
}
.prof-row + .prof-row { margin-top: 8px; }
.prof-row span { font-size: 13px; color: var(--muted); flex: none; }
.prof-row b { font-size: 13.5px; text-align: right; overflow-wrap: anywhere; }
.prof-card .auth-field input { background: var(--input); }
.prof-logout {
  background: rgba(255,90,90,.12);
  color: #ff8a8a;
}
.prof-logout:hover { background: rgba(255,90,90,.22); color: #ffb0b0; }

/* ---------- riwayat tonton (grouped per anime) ---------- */
.hist-list { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.hist-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.hist-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.hist-card-head:hover { background: var(--hover); }
.hist-card-title {
  font-size: 15px;
  font-weight: 700;
  flex: 1;
  line-height: 1.35;
}
.hist-card-count {
  flex: none;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}
.hist-ep-list { display: flex; flex-direction: column; }
.hist-ep-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13.5px;
  transition: background .12s;
  border-top: 1px solid var(--border);
}
.hist-ep-item:first-child { border-top: 0; }
.hist-ep-item:hover { background: var(--hover); }
.hist-ep-item .play-ind { color: var(--accent); flex: none; }
.hist-ep-name {
  flex: 1;
  font-weight: 600;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hist-ep-at { flex: none; font-size: 11.5px; color: var(--muted); white-space: nowrap; }

/* ---------- theme switcher ---------- */
.theme-wrap { position: relative; display: inline-flex; }
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  padding: 0;
  border: 2px solid var(--accent);
  border-radius: 999px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  transition: border-color .12s, color .12s, transform .1s;
  flex: none;
}
.theme-btn:hover { border-color: var(--accent2); color: var(--accent); }
.theme-btn:active { transform: scale(.92); }
.theme-btn svg { width: 20px; height: 20px; }
.theme-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  min-width: 170px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgb(0 0 0 / .45);
}
.theme-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.theme-opt:hover { background: var(--hover); color: var(--accent); }
.theme-opt.active { background: var(--accent); color: #fff; }
.theme-opt svg { width: 16px; height: 16px; margin-right: 2px; }