/* ============================================================
 * Colors — the accent colors can also be changed in admin.php
 * ============================================================ */
:root {
  --bg-top:    #0c1436;   /* dark blue at the top */
  --bg-bottom: #060a1c;   /* deep navy lower down */
  --surface:   #1c1b2b;   /* panels */
  --surface-2: #26253a;
  --line:      #3a3960;
  --text:      #f3f1fa;
  --muted:     #a7a4c2;
  --accent:    #ffb547;   /* gold */
  --accent-2:  #ff7849;   /* coral */
  --btn-text:  #2b1405;
  --glow-a:    rgba(255, 170, 80, .30);
  --glow-b:    rgba(255, 120, 73, .22);
  --edge:      rgba(255, 190, 110, .32);
  --online:    #2bd94a;
  --cyan:      #ffc46b;
  --radius:    22px;
  --width:     640px;      /* width of the banner, window and gallery */
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: linear-gradient(175deg, var(--bg-top) 0%, #091030 50%, var(--bg-bottom) 100%) fixed;
  background-color: var(--bg-bottom);
  position: relative;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { display: block; }
[hidden] { display: none !important; }

/* ---------- Starfield background ---------- */
body::before, body::after {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
}
/* many small stars */
body::before {
  background-image:
    radial-gradient(1.1px 1.1px at 12% 18%, rgba(255,255,255,.95), transparent 70%),
    radial-gradient(1px 1px at 47% 9%,      rgba(255,255,255,.8),  transparent 70%),
    radial-gradient(1.1px 1.1px at 81% 27%, rgba(200,220,255,.9),  transparent 70%),
    radial-gradient(1px 1px at 29% 63%,     rgba(255,255,255,.75), transparent 70%),
    radial-gradient(1.1px 1.1px at 66% 74%, rgba(255,255,255,.9),  transparent 70%),
    radial-gradient(1px 1px at 91% 88%,     rgba(210,230,255,.8),  transparent 70%),
    radial-gradient(1px 1px at 5% 92%,      rgba(255,255,255,.85), transparent 70%),
    radial-gradient(1px 1px at 58% 41%,     rgba(255,255,255,.7),  transparent 70%),
    radial-gradient(1px 1px at 37% 31%,     rgba(255,255,255,.8),  transparent 70%),
    radial-gradient(1px 1px at 73% 52%,     rgba(220,235,255,.75), transparent 70%),
    radial-gradient(1px 1px at 18% 47%,     rgba(255,255,255,.7),  transparent 70%),
    radial-gradient(1px 1px at 52% 83%,     rgba(255,255,255,.8),  transparent 70%),
    radial-gradient(1px 1px at 95% 6%,      rgba(255,255,255,.7),  transparent 70%),
    radial-gradient(1px 1px at 84% 61%,     rgba(255,240,220,.75), transparent 70%),
    radial-gradient(1px 1px at 3% 38%,      rgba(255,255,255,.7),  transparent 70%),
    radial-gradient(1px 1px at 41% 56%,     rgba(255,255,255,.65), transparent 70%);
  background-size: 120px 130px;
}
/* fewer, brighter stars that slowly twinkle */
body::after {
  background-image:
    radial-gradient(2px 2px at 22% 34%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 74% 12%, #cfe0ff, transparent 60%),
    radial-gradient(2.2px 2.2px at 63% 58%, #fff, transparent 60%),
    radial-gradient(1.4px 1.4px at 9% 76%,  #ffe9c9, transparent 60%),
    radial-gradient(1.6px 1.6px at 88% 69%, #d6f2ff, transparent 60%),
    radial-gradient(1.4px 1.4px at 41% 89%, #fff, transparent 60%);
  background-size: 260px 300px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { body::after { animation: none; } }
body > * { position: relative; z-index: 1; }

/* ---------- Glow on panel edges ---------- */
.glow {
  border: 1px solid var(--edge);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, .03) inset,
    0 0 18px -2px var(--glow-a),
    0 0 44px -10px var(--glow-b);
}

/* ---------- Logo ---------- */
.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  letter-spacing: -.02em;
}
.logo .dot {
  display: inline-block; width: 8px; height: 8px; margin-left: 3px;
  border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* ---------- Header ---------- */
.top {
  display: flex; justify-content: center; align-items: center;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

/* ---------- Main column ---------- */
.stack {
  width: 100%; max-width: calc(var(--width) + 32px);
  margin: 0 auto; padding: 22px 16px 34px;
  display: flex; flex-direction: column; gap: 18px;
}
.panel { background: var(--surface); border-radius: var(--radius); }
.empty { padding: 48px 24px; text-align: center; }
.empty p { color: var(--muted); margin-top: 6px; }

/* ---------- Profile banner ---------- */
.banner { padding: 20px 18px 16px; background: linear-gradient(160deg, #24233a, var(--surface) 60%); }
.banner-top { display: flex; align-items: center; gap: 16px; }
.avatar { position: relative; flex: 0 0 auto; }
.avatar-ring {
  width: 84px; height: 84px; border-radius: 50%;
  padding: 4px; background: var(--accent);
  box-shadow: 0 0 22px -2px var(--accent);
}
.avatar-ring img, .avatar-initial {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--surface);
}
.avatar-initial {
  display: grid; place-items: center; background: #2c2a44;
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; color: var(--muted);
}
.online {
  position: absolute; right: 2px; bottom: 4px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--online); border: 3px solid var(--surface);
  box-shadow: 0 0 10px var(--online);
}
.banner-info { min-width: 0; }
.eyebrow {
  font-size: .7rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-2);
}
.banner-name {
  font-family: 'Space Grotesk', sans-serif; font-weight: 700;
  font-size: clamp(1.6rem, 7vw, 2.4rem); line-height: 1.1; letter-spacing: -.02em;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 2px 0 4px;
  overflow-wrap: anywhere;
}
.country { font-family: 'Inter', sans-serif; font-size: .8rem; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.banner-text { color: var(--muted); font-size: .92rem; }
.banner-bottom {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 12px;
}
.signup-note { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); }
.lock { color: var(--cyan); flex: 0 0 auto; margin-top: 1px; }
.lock svg { display: block; }

/* ---------- Buttons ---------- */
.btn-cta, .btn-next {
  display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 52px; padding: 14px 22px; border-radius: 16px;
  font-weight: 700; font-size: .95rem; letter-spacing: .04em; text-transform: uppercase;
  cursor: pointer; transition: transform .15s, filter .15s; text-align: center;
  font-family: inherit;
}
.btn-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--btn-text); border: 0;
  box-shadow: 0 8px 26px -8px var(--accent-2), 0 0 0 1px rgba(255,255,255,.18) inset;
}
.btn-next {
  background: rgba(255, 181, 71, .08); color: var(--accent);
  border: 1.5px solid var(--accent) !important;
}
.btn-cta:hover, .btn-next:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn-cta:active, .btn-next:active { transform: translateY(1px); }

/* ---------- Live window ---------- */
.window {
  position: relative; display: block; overflow: hidden;
  aspect-ratio: 4 / 3; background: #15142a;
}
.window.has-player { aspect-ratio: 16 / 9; }
.window.has-player { background: #000; }
/* Player is drawn slightly larger than the window and the extra is cut off,
   so the player's own page margins, white edges and scrollbars never show. */
.window iframe {
  position: absolute; z-index: 1; border: 0; display: block;
  top: -12px; left: -12px;
  width: calc(100% + 24px); height: calc(100% + 24px);
  overflow: hidden; background: #000;
  pointer-events: none;   /* the player never catches taps; they go to the link */
}
.window .window-name { z-index: 2; pointer-events: none; }
/* Whole window is a link to the current model's room */
.window-link {
  position: absolute; inset: 0; z-index: 5; display: block;
  cursor: pointer; border-radius: inherit;
  background: rgba(0, 0, 0, .001);   /* iPhone needs a background to register taps */
  -webkit-tap-highlight-color: transparent;
  pointer-events: auto;
}
.window { cursor: pointer; }
.window-name { z-index: 4; pointer-events: none; }
.window img { width: 100%; height: 100%; object-fit: cover; }
.window-initial {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 5rem; color: #4a4870;
  background: radial-gradient(circle at 50% 40%, #2c2a50, #15142a 70%);
}
.window-name {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(10, 10, 25, .62); backdrop-filter: blur(6px);
  padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: .95rem;
}
.live-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--online);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(43, 217, 74, .6); }
  70%  { box-shadow: 0 0 0 8px rgba(43, 217, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(43, 217, 74, 0); }
}

.actions { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: -4px; }

/* ---------- Gallery ---------- */
.gallery { padding: 20px 16px 16px; }
.gallery-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.gallery-head h2 { font-size: 1.2rem; }
.gallery-head p { color: var(--muted); font-size: .85rem; }
.gallery-grid {
  display: grid; grid-auto-flow: column; grid-auto-columns: 72%;
  gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; padding-bottom: 2px;
}
.gallery-grid::-webkit-scrollbar { display: none; }
.gallery-item {
  position: relative; display: block; overflow: hidden; scroll-snap-align: start;
  aspect-ratio: 1 / 1.1; border-radius: 16px; background: #22213a;
  border: 1px solid var(--edge);
}
.gallery-item img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(14px) saturate(1.05); transform: scale(1.15);
}
.gallery-empty {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 30%, #4a3a6e, #1f1e36 70%);
  filter: blur(6px);
}
.gallery-item::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 25, .7), transparent 45%);
}
.gallery-label { position: absolute; left: 12px; bottom: 12px; z-index: 1; font-weight: 700; font-size: .82rem; }
.gallery-lock {
  position: absolute; right: 10px; bottom: 8px; z-index: 1;
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(20, 18, 50, .75); border: 1px solid var(--accent); color: var(--accent);
}
.cat-viewport { overflow: hidden; margin-top: 4px; }
.cat-grid {
  display: flex; gap: 10px;
  transition: transform .7s cubic-bezier(.4, 0, .2, 1);
  will-change: transform;
}
.cat-grid > .cat-card { flex: 0 0 calc((100% - 20px) / 3); min-width: 0; }
@media (prefers-reduced-motion: reduce) { .cat-grid { transition: none; } }
.cat-card {
  display: flex; flex-direction: column; overflow: hidden;
  border-radius: 14px; background: #15142a; border: 1px solid var(--edge);
  transition: transform .15s, box-shadow .15s;
}
.cat-card:hover { transform: translateY(-2px); box-shadow: 0 0 18px -4px var(--glow-a); }
.cat-thumb { display: block; aspect-ratio: 4 / 3; background: #22213a; position: relative; }
.cat-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cat-initial {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: 'Space Grotesk', sans-serif; font-size: 2rem; color: #4a4870;
  background: radial-gradient(circle at 50% 40%, #2c2a50, #15142a 75%);
}
.cat-name {
  display: flex; align-items: center; gap: 7px; padding: 8px 8px 0;
  font-weight: 600; font-size: .78rem; min-width: 0;
}
.cat-name .live-dot { flex: 0 0 auto; }
.cat-name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cat-label {
  padding: 2px 8px 9px 24px; font-size: .66rem; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
}

.gallery-notes {
  list-style: none; display: flex; justify-content: center; flex-wrap: wrap;
  gap: 6px 16px; margin-top: 14px; font-size: .78rem; color: var(--muted);
}
.gallery-notes li::before { content: '✓'; color: var(--cyan); margin-right: 6px; }

/* ---------- Footer (compact) ---------- */
.foot {
  margin-top: auto; padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  text-align: center; color: var(--muted); font-size: .74rem;
}
.foot-links { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; }
.foot-links a { text-decoration: underline; text-underline-offset: 2px; }
.foot .dmca {
  display: inline-block; font-size: .78rem;
  text-decoration: none; padding: 3px 10px; border-radius: 999px;
  border: 1px solid var(--edge); color: var(--accent); font-weight: 600;
  box-shadow: 0 0 10px -3px var(--glow-a);
}

/* ---------- Age gate ---------- */
.gate { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.gate-card {
  max-width: 460px; width: 100%; text-align: center;
  background: var(--surface); border-radius: var(--radius); padding: 36px 24px;
}
.gate-card h1 { font-family: 'Space Grotesk', sans-serif; font-size: 2rem; margin: 18px 0 10px; }
.gate-card p  { color: var(--muted); margin-bottom: 24px; }
.gate-card form { display: inline; }
.gate-card .small { font-size: .8rem; margin: 24px 0 0; }
.gate-card .small a { text-decoration: underline; }
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px; margin: 4px;
  font-weight: 600; border: 0; cursor: pointer; font-size: 1rem; font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: var(--btn-text); }
.btn-ghost   { background: var(--surface-2); color: var(--text); }

/* ---------- Legal pages ---------- */
.legal { width: 100%; max-width: 760px; margin: 0 auto; padding: 40px 16px 60px; }
.legal h1 { font-family: 'Space Grotesk', sans-serif; margin-bottom: 18px; }
.legal h2 { margin: 26px 0 8px; font-size: 1.15rem; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; }
code { background: var(--surface-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 16px; }

/* ---------- Bigger screens ---------- */
@media (min-width: 560px) {
  .banner { padding: 24px 26px 18px; }
  .avatar-ring { width: 104px; height: 104px; }
  .banner-top { gap: 22px; }
  .banner-bottom { flex-direction: row; align-items: center; justify-content: space-between; }
  .banner-bottom .btn-cta { flex: 0 0 auto; }
  .actions { grid-template-columns: 1fr 1fr; }
  .gallery { padding: 24px 22px 18px; }
  .gallery-grid { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; }
  .cat-grid { gap: 14px; }
  .cat-name { font-size: .88rem; padding: 9px 10px 0; }
  .cat-label { font-size: .72rem; padding: 2px 10px 10px 26px; }
  .cat-grid > .cat-card { flex-basis: calc((100% - 28px) / 3); }
}
