:root {
  --gold: #d4af37; --gold-2: #f2d675; --gold-dark: #9c7c14;
  --blue-900: #060f2b; --blue-800: #0b1e4a; --blue-700: #123a8c; --blue-600: #1a4fc0; --blue-500: #3b7cff;
  --text: #eaf0ff; --muted: #9fb0d8; --danger: #ff6b6b; --ok: #4fd18b;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: radial-gradient(1200px 600px at 20% -10%, #0f2a6b 0%, var(--blue-900) 60%) fixed; color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; min-height: 100vh; }
a { color: var(--gold-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
[hidden] { display: none !important; }

/* ---- top nav ---- */
#topnav { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px; padding: 10px 24px;
  background: linear-gradient(180deg, var(--blue-800), #08173b); border-bottom: 2px solid var(--gold); }
.brand { font-size: 26px; font-weight: 800; letter-spacing: .5px; color: #fff; }
.brand:hover { text-decoration: none; }
#topnav nav { display: flex; gap: 4px; }
#topnav { flex-wrap: wrap; }
#topnav nav a { white-space: nowrap; }
#navsearch input { min-width: 140px; }
#topnav nav a { color: var(--text); padding: 8px 14px; border-radius: 8px; font-weight: 600; }
#topnav nav a:hover, #topnav nav a.active { background: rgba(212,175,55,.15); color: var(--gold-2); text-decoration: none; box-shadow: inset 0 -2px 0 var(--gold); }
#navsearch { flex: 1; display: flex; gap: 6px; max-width: 560px; }
#navsearch input { flex: 1; }
#navuser { margin-left: auto; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.pill { background: rgba(212,175,55,.15); border: 1px solid var(--gold-dark); color: var(--gold-2); padding: 4px 12px; border-radius: 99px; font-weight: 700; }

/* ---- controls ---- */
input, select, textarea { background: #0a1a45; border: 1px solid #2a4690; color: var(--text); border-radius: 8px; padding: 9px 12px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
input[type=checkbox] { width: auto; }
textarea { min-height: 90px; resize: vertical; }
label { display: block; margin: 12px 0 4px; font-weight: 600; color: var(--gold-2); }
label.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; color: var(--text); }
.btn { display: inline-block; border: 1px solid #2a4690; background: var(--blue-700); color: #fff; padding: 9px 16px; border-radius: 8px; cursor: pointer; font: inherit; font-weight: 700; }
.btn:hover { background: var(--blue-600); text-decoration: none; }
.gold-btn { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: #1a1400; border-color: var(--gold-dark); }
.gold-btn:hover { background: linear-gradient(180deg, #fff0a8, var(--gold-2)); }
.ghost { background: transparent; }
.danger { background: #7a1f2b; border-color: #a33; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---- layout ---- */
main { padding: 24px; max-width: 1900px; margin: 0 auto; }
.page-title { margin: 0 0 16px; font-size: 24px; }
.page-title .gold { margin-right: 6px; }
.panel { background: rgba(11,30,74,.7); border: 1px solid #1f3a85; border-radius: var(--radius); padding: 20px; }
.narrow { max-width: 560px; margin: 30px auto; }
.wide { max-width: 900px; margin: 0 auto; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.grow { flex: 1; }
.err { color: var(--danger); margin-top: 8px; }
.ok { color: var(--ok); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.chip { padding: 5px 14px; border: 1px solid #2a4690; border-radius: 99px; color: var(--text); background: #0a1a45; font-weight: 600; }
.chip:hover, .chip.on { border-color: var(--gold); color: var(--gold-2); text-decoration: none; background: rgba(212,175,55,.12); }

/* ---- video grid: 5 columns, unlimited rows ---- */
.grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 18px; }
@media (max-width: 1100px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } #navsearch { display: none; } }
.card { display: block; color: var(--text); border-radius: var(--radius); overflow: hidden; background: var(--blue-800); border: 1px solid #1f3a85; transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-3px); border-color: var(--gold); text-decoration: none; }
.thumb { position: relative; aspect-ratio: 16 / 9; background: #02081c; overflow: hidden; }
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb video { opacity: 0; transition: opacity .2s; }
.thumb.playing video { opacity: 1; }
.badge { position: absolute; padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 700; background: rgba(6,15,43,.85); color: var(--gold-2); }
.badge.dur { right: 6px; bottom: 6px; }
.badge.priv { left: 6px; top: 6px; border: 1px solid var(--gold); }
.badge.live { left: 6px; top: 6px; background: #d62839; color: #fff; }
.badge.view { right: 6px; top: 6px; }
.card .meta { padding: 10px 12px 12px; }
.card .title { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .sub { font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.livebg { background: linear-gradient(135deg, var(--blue-700), #000a2a 70%); display: grid; place-items: center; font-size: 44px; color: var(--gold); }
#sentinel { height: 60px; display: grid; place-items: center; color: var(--muted); }

/* ---- video page / live room ---- */
.watch { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; }
.watch.single { grid-template-columns: minmax(0, 1fr); max-width: 1100px; margin: 0 auto; }
@media (max-width: 1000px) { .watch { grid-template-columns: 1fr; } }
.player { width: 100%; background: #000; border-radius: var(--radius); aspect-ratio: 16 / 9; border: 1px solid var(--gold-dark); }
.chat { display: flex; flex-direction: column; height: 560px; }
.chat .log { flex: 1; overflow-y: auto; font-size: 14px; padding-right: 4px; }
.chat .log div { padding: 2px 0; word-break: break-word; }
.chat .tipmsg { color: var(--gold-2); font-weight: 700; background: rgba(212,175,55,.12); border-radius: 6px; padding: 4px 8px; margin: 3px 0; }
.chat form { display: flex; gap: 6px; margin-top: 8px; }
.tipbar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #1f3a85; vertical-align: top; }
th { color: var(--gold-2); }
.idpair { display: flex; gap: 10px; flex-wrap: wrap; }
.idpair img { max-width: 320px; max-height: 260px; border: 1px solid var(--gold-dark); border-radius: 8px; }
.progress { height: 10px; background: #0a1a45; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.progress div { height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.tabs .btn.on { background: var(--gold); color: #1a1400; }
.profile-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 20px; }
.avatar { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font-size: 42px; font-weight: 800; color: #1a1400; background: linear-gradient(135deg, var(--gold-2), var(--gold)); border: 3px solid var(--blue-500); }
.stats { display: flex; gap: 24px; margin: 8px 0; }
.stats b { display: block; font-size: 20px; color: var(--gold-2); }

/* ---- age gate + toast ---- */
#agegate { position: fixed; inset: 0; z-index: 999; background: rgba(2,8,28,.96); display: grid; place-items: center; padding: 20px; }
#agegate .modal { max-width: 480px; text-align: center; background: var(--blue-800); border: 2px solid var(--gold); border-radius: 14px; padding: 32px; }
#agegate .btn { margin: 6px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(80px); background: var(--gold); color: #1a1400; padding: 10px 20px; border-radius: 8px; font-weight: 700; transition: transform .25s; z-index: 1000; }
#toast.show { transform: translateX(-50%) translateY(0); }
footer.legal { text-align: center; color: var(--muted); font-size: 12px; margin: 40px 0 10px; }

/* ---- camera capture (ID verification) ---- */
.caps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-top: 6px; }
.cap .capbox { position: relative; aspect-ratio: 4 / 3; background: #000; border: 1px solid var(--gold-dark); border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.cap .capbox video, .cap .capbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
