/* Public creator page (afterhourz.tv/c/<username>), in the AfterHourz dark-purple theme. Phone first. */
:root {
  color-scheme: dark;
  --bg: #09090d; --surface: #121217; --elevated: #19181f; --border: #27262f; --border-strong: #3a3444;
  --text: #f3f0f7; --muted: #97939f; --purple: #b28aff; --accent: #9764ef; --ok: #6fd69a;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text); font: 15px/1.5 Manrope, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; overflow-wrap: break-word; }
img, video { max-width: 100%; }
a { color: var(--purple); }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }

/* top bar */
.ch-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #0c0b11ee; backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.ch-brand { display: inline-flex; }
.ch-brand img { display: block; height: 26px; width: auto; }
.ch-top nav { display: flex; align-items: center; gap: 14px; }
.ch-link { background: none; border: 0; padding: 8px 2px; color: var(--purple); text-decoration: none; font-size: 14px; }
.ch-link:hover { text-decoration: underline; }

/* buttons */
.ch-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; font-weight: 650; font-size: 14px; color: #fff; text-decoration: none; background: linear-gradient(105deg, #a370f6, #8b55e1); box-shadow: 0 8px 26px #8b55e133; }
.ch-btn:hover { filter: brightness(1.08); }
.ch-btn-sm { min-height: 38px; padding: 0 16px; box-shadow: none; }
.ch-ghost { background: #1c1523; border: 1px solid #3a2c4a; box-shadow: none; color: var(--text); }
.ch-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 650; color: #d9c8ff; background: #211833; border: 1px solid #4e385c; }
.ch-pill.ok { color: #a6e3bb; background: #1a2b22; border-color: #3f6b4e; }

/* layout */
.ch-main { max-width: 1100px; margin: 0 auto; padding: 0 0 56px; }
.ch-center { display: grid; gap: 14px; justify-items: center; text-align: center; padding: 96px 20px; }
.ch-center h1 { font-size: 24px; }
.ch-muted { color: var(--muted); }
.small { font-size: 13px; }
.ch-eyebrow { display: block; font-size: 11px; font-weight: 650; letter-spacing: 1.5px; text-transform: uppercase; color: #9993a5; }
.ch-h2 { font-size: 18px; margin: 28px 16px 14px; letter-spacing: -.3px; }
.ch-empty { margin: 8px 16px; color: var(--muted); }
.ch-foot { padding: 28px 16px 40px; text-align: center; font-size: 12px; color: var(--muted); }

/* channel header */
.ch-banner { position: relative; aspect-ratio: 3 / 1; min-height: 120px; background: linear-gradient(120deg, #2a1b3f, #15101d); overflow: hidden; }
.ch-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ch-banner i { position: absolute; inset: 0; background: linear-gradient(0deg, #09090d9e, transparent 90%), linear-gradient(90deg, #1e1028a1, transparent); }
.ch-summary { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: -34px; padding: 0 16px; }
.ch-avatar { flex: none; width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; font: 700 32px Manrope, system-ui, sans-serif; color: #fff; background: linear-gradient(135deg, #7d4bd6, #c06ab8); border: 4px solid var(--bg); }
.ch-avatar.sm { width: 36px; height: 36px; font-size: 15px; border-width: 2px; }
.ch-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ch-id { padding-top: 36px; min-width: 0; flex: 1; display: grid; gap: 4px; justify-items: start; }
.ch-id h1 { display: flex; align-items: center; gap: 6px; font-size: 24px; letter-spacing: -.6px; overflow-wrap: anywhere; }
.ch-check { color: var(--purple); flex: none; }
.ch-actions { padding-top: 36px; }
.ch-bio { max-width: 680px; margin: 18px 16px 6px; color: #b9a9c8; line-height: 1.75; }
.ch-callout { display: flex; gap: 14px; align-items: flex-start; margin: 20px 16px 0; padding: 16px 18px; border-radius: 14px; background: #1a1327; border: 1px solid #4e385c; color: #d9c8ff; }
.ch-callout svg { flex: none; margin-top: 2px; color: var(--purple); }
.ch-callout p { margin-top: 4px; font-size: 14px; color: #bfaed3; }

/* video grid */
.ch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; padding: 0 16px; }
.ch-card { display: block; text-decoration: none; color: inherit; }
.ch-card h3 { margin: 10px 0 3px; font-size: 14px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ch-card small { color: var(--muted); font-size: 12px; }
.ch-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg, #251a38, #15101d); border: 1px solid #2b2133; }
.ch-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s; }
.ch-card:hover .ch-thumb img { transform: scale(1.03); }
.ch-card.locked .ch-thumb { background: repeating-linear-gradient(135deg, #1b1327, #1b1327 12px, #17101f 12px, #17101f 24px); }
.ch-lockbadge { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; font-size: 10px; font-weight: 700; letter-spacing: .06em; color: #e5d3ff; background: #1b1129e6; border: 1px solid #ad7dd466; }
.ch-card.locked .ch-lockbadge { left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 11px; padding: 7px 12px; }
.ch-dur { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #fff; background: #000000b3; }

/* watch view (the player styles come from js/player.css; these are what the app normally supplies) */
.ch-watch { padding: 16px; }
.ch-back { background: none; border: 0; padding: 10px 0; margin-bottom: 6px; min-height: 44px; color: var(--muted); font-size: 14px; }
.ch-back:hover { color: var(--text); }
.player-wrap { position: relative; border-radius: 13px; overflow: hidden; aspect-ratio: 16 / 9; background: #000; border: 1px solid #36203f; box-shadow: 0 0 60px #6e278d25; }
.player-wrap video { width: 100%; height: 100%; object-fit: contain; display: block; }
.locked-player, .player-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 12px; padding: 24px; text-align: center; background: #12091be6; backdrop-filter: blur(15px); }
.locked-player > svg { color: var(--purple); }
.locked-player h2 { font-size: 21px; }
.locked-player p { font-size: 13px; color: #beafcc; }
.player-loading { color: #beafcc; font-size: 14px; }
.ch-notice { margin: 14px 0 0; padding: 12px 16px; border-radius: 12px; background: #231a36; border: 1px solid #4e385c; color: #d9c8ff; font-size: 14px; }
.watch-title { margin: 20px 0 6px; font-size: 22px; letter-spacing: -.5px; }
.ch-owner { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 6px; color: var(--text); text-decoration: none; }
.ch-owner .ch-check { width: 17px; height: 17px; }
.ch-desc { margin-top: 12px; max-width: 760px; color: #bcacc8; line-height: 1.8; white-space: pre-wrap; }
.ch-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ch-tags span { padding: 3px 10px; border-radius: 999px; font-size: 12px; background: #19151f; border: 1px solid #2b2133; color: #b9a9c8; }
.ch-watch .ch-grid { padding: 0; }
.ch-watch .ch-h2 { margin: 32px 0 14px; }

/* join dialog */
.ch-modal { width: min(560px, calc(100% - 16px)); max-height: calc(100dvh - 16px); padding: 0; border: 1px solid #4e385c; border-radius: 18px; color: var(--text); background: radial-gradient(ellipse at top, #301d434d, transparent 55%), #131017; box-shadow: 0 30px 120px #000a; }
.ch-modal::backdrop { background: #050408d9; backdrop-filter: blur(8px); }
.ch-modal-body { position: relative; display: grid; gap: 12px; padding: 28px 22px 22px; }
.ch-modal h2 { font-size: 22px; padding-right: 36px; }
.ch-x { position: absolute; right: 10px; top: 10px; width: 44px; height: 44px; border: 0; background: none; font-size: 26px; color: var(--muted); border-radius: 10px; }
.ch-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ch-tier { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 14px; background: #0f0d14; border: 1px solid #2f2538; }
.ch-tier h3 { font-size: 15px; }
.ch-price { font-size: 26px; font-weight: 700; letter-spacing: -.8px; }
.ch-price small { font-size: 12px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.ch-tier ul { margin: 0; padding-left: 18px; color: #bcacc8; font-size: 13px; display: grid; gap: 4px; }
.ch-tier .ch-btn { margin-top: 6px; }

@media (max-width: 640px) {
  .ch-summary { margin-top: -28px; }
  .ch-avatar { width: 76px; height: 76px; font-size: 28px; }
  .ch-id, .ch-actions { padding-top: 30px; }
  .ch-actions { width: 100%; padding-top: 4px; }
  .ch-actions .ch-btn, .ch-actions .ch-pill { width: 100%; justify-content: center; }
  .ch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .ch-tiers { grid-template-columns: 1fr; }
  .watch-title { font-size: 20px; }
  .ch-banner { aspect-ratio: 5 / 2; }
  .ch-card.locked .ch-lockbadge { font-size: 10px; padding: 6px 9px; }
}
@media (max-width: 380px) { .ch-grid { grid-template-columns: 1fr; } }
@media (pointer: coarse) { input, select, textarea { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- The 18+ gate and Terms window (compliance/compliance.js) use these class names, which the main app
   normally defines. They are repeated here so the gate looks the same on this page. ---- */
.muted { color: var(--muted); }
.eyebrow { font-size: 11px; font-weight: 650; letter-spacing: 1.5px; color: #9993a5; }
.modal { border: 1px solid #4e385c; border-radius: 20px; padding: 0; color: var(--text); width: min(510px, calc(100% - 30px)); max-height: calc(100dvh - 40px);
  background: radial-gradient(ellipse at top, #301d434d, transparent 55%), #131017; box-shadow: 0 30px 120px #0009; }
.modal::backdrop { background: #050408d9; backdrop-filter: blur(10px); }
.modal-body { padding: 38px; position: relative; }
.modal h1, .modal h2 { font-size: 28px; letter-spacing: -0.8px; margin: 7px 0 12px; line-height: 1.3; }
.modal p { font-size: 14px; line-height: 1.7; margin: 13px 0 21px; }
.modal .eyebrow { color: #ab83cb; font-size: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 11px 19px; border-radius: 9px; font-size: 14px; font-weight: 650; border: 1px solid transparent; white-space: nowrap; }
.primary { background: linear-gradient(105deg, #a370f6, #8b55e1); color: #fff; box-shadow: 0 3px 18px #8e50d922; }
.full { width: 100%; }
.age-label { display: inline-flex; background: #9b47651c; color: #df9fb9; font-size: 10px; letter-spacing: 1.5px; padding: 4px 8px; border: 1px solid #75465e; border-radius: 4px; }
.exit-link { display: block; text-align: center; color: #a197ad; font-size: 13px; margin: 18px auto; background: none; border: 0; }
.modal .fine, .fine { font-size: 11px !important; text-align: center; color: #81768f; margin: 18px 0 0 !important; display: block; }
@media (max-width: 560px) { .modal { width: calc(100vw - 16px); } .modal-body { padding: 28px 20px 22px; } .modal h1, .modal h2 { font-size: 24px; } }

/* Tips */
.ch-ownerrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ch-tipbtn { gap: 8px; min-height: 40px; margin-top: 10px; }
.ch-tipform { display: grid; gap: 14px; }
.ch-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ch-amount { min-height: 46px; border-radius: 10px; border: 1px solid #3a2f47; background: #0f0d14; color: var(--text); font: inherit; font-weight: 650; cursor: pointer; }
.ch-amount.on { border-color: #a370f6; background: #2a1c3d; color: #fff; }
.ch-field { display: grid; gap: 6px; font-size: 13px; font-weight: 500; color: #c2b7ce; }
.ch-field small { font-weight: 400; color: #8d8797; }
.ch-field textarea, .ch-money { width: 100%; border-radius: 10px; border: 1px solid #3a2f47; background: #0d0a12; color: var(--text); font: inherit; }
.ch-field textarea { padding: 10px 13px; resize: vertical; font-size: 16px; }
.ch-money { display: flex; align-items: center; min-height: 46px; padding: 0 13px; gap: 6px; }
.ch-money b { color: #8d8797; font-weight: 600; }
.ch-money input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 16px; outline: 0; }
.ch-money:focus-within, .ch-field textarea:focus { border-color: #a370f6; outline: 0; }
.ch-notice.err { background: #2b1620; border-color: #6b2f40; color: #ffc4d0; }
.ch-btn.full { width: 100%; }
.ch-btn:disabled { opacity: .55; cursor: not-allowed; }
