:root {
  --bg: #0c0b10;
  --card: #17151d;
  --line: #2c2836;
  --text: #f4efe8;
  --muted: #9b93a6;
  --pink: #ff4d7a;
  --gold: #f0c36a;
  --ok: #3dd6a5;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: "PingFang SC", "Noto Sans SC", sans-serif; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: rgba(12,11,16,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; letter-spacing: 1px; color: var(--pink); font-size: 18px; }
.homebtn { margin-left: 2px; background: #2a2030; border: 1px solid var(--pink); }
.nav { display: flex; gap: 12px; margin-left: auto; flex: 0 0 auto; align-items: center; white-space: nowrap; }
.nav a { color: var(--text); font-size: 14px; }
.grow { flex: 1; }
.search { display: flex; gap: 8px; flex: 1; max-width: 520px; }
.search input, .field input, .field textarea, .field select {
  width: 100%; background: #221f2a; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.btn {
  border: 0; border-radius: 10px; padding: 10px 14px; background: var(--pink); color: white; cursor: pointer; font-weight: 700;
}
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.gold { background: linear-gradient(90deg, #e7b85a, #f3d7a1); color: #3a2a10; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.srcbox input {
  color: #111;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 8px 10px;
  width: 100%;
}
.wrap { width: min(1180px, calc(100% - 24px)); margin: 16px auto 48px; }
.tabs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 8px;
  padding: 10px;
  margin: 8px 0 12px;
  background: #14121a;
  border: 1px solid #3a3342;
  border-radius: 14px;
}
.admin-cats { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  border: 1px solid #3a3342;
  background: #1b1822;
  color: #c9c2cf;
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
}
.tab.on {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(90deg, #e85d8c, #b43d78);
}
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 14px; }
.card { background: var(--card); border-radius: 14px; overflow: hidden; border: 1px solid transparent; }
.card:hover { border-color: #4a3140; }
.thumb { aspect-ratio: 3/4; background: #111; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.badge { position: absolute; left: 8px; top: 8px; background: rgba(0,0,0,.65); border-radius: 999px; padding: 2px 8px; font-size: 12px; }
.name { padding: 8px 10px 12px; font-size: 13px; line-height: 1.4; height: 54px; overflow: hidden; }
.pager { display: flex; justify-content: center; gap: 8px; margin: 18px 0; align-items: center; color: var(--muted); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.player-box { background: black; border-radius: 16px; overflow: hidden; aspect-ratio: 16/9; }
video { width: 100%; height: 100%; background: black; }
.eps { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.meta { color: var(--muted); font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #14121a; cursor: pointer; }
.plan.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.price { font-size: 32px; color: var(--gold); font-weight: 800; }
.addr { word-break: break-all; background: #100e14; padding: 12px; border-radius: 10px; font-family: ui-monospace, monospace; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 8px; text-align: left; vertical-align: top; }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #2a2030; border: 1px solid var(--pink); padding: 10px 14px; border-radius: 12px; display: none; z-index: 50;
}
.age {
  position: fixed; inset: 0; background: rgba(0,0,0,.86); display: flex; align-items: center; justify-content: center; z-index: 80;
}
.age .panel { width: min(420px, calc(100% - 32px)); text-align: center; }
.lock {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.55); font-weight: 700;
}
@media (max-width: 720px) {
  .top { flex-wrap: wrap; }
  .search { order: 3; max-width: none; width: 100%; }
  .nav { order: 2; width: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
