:root {
  --bg: #150a12;
  --bg2: #1f0f1a;
  --card: #24121e;
  --velvet: #8a1538;
  --velvet-light: #c2265a;
  --gold: #d9a441;
  --text: #f3e6ec;
  --text-dim: #b98fa3;
  --danger: #e0435c;
  --success: #4fbf7a;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: radial-gradient(circle at top, var(--bg2), var(--bg) 70%);
  color: var(--text);
  min-height: 100vh;
}

.font-display { font-family: 'Playfair Display', Georgia, serif; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

a { color: var(--velvet-light); text-decoration: none; }
a:hover { color: var(--gold); }

.navbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 32px; background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(217,164,65,0.2);
}
.navbar .brand { font-size: 1.5rem; font-weight: 700; color: var(--gold); letter-spacing: 1px; }
.navbar .brand span { color: var(--velvet-light); }
.navbar .nav-links { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.coin-pill {
  background: linear-gradient(135deg, var(--gold), #a97423);
  color: #241205; padding: 6px 14px; border-radius: 999px; font-weight: 700;
}

.hero {
  position: relative;
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  text-align: center; padding: 80px 20px 60px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, rgba(194,38,90,0.28), transparent 65%),
    radial-gradient(ellipse 700px 500px at 15% 90%, rgba(217,164,65,0.14), transparent 60%),
    radial-gradient(ellipse 700px 500px at 85% 90%, rgba(138,21,56,0.30), transparent 60%),
    linear-gradient(180deg, #12070f 0%, #1a0c15 45%, #0e0509 100%);
}

.hero-lower-content {
  position: relative; z-index: 1; width: 100%; max-width: 960px;
  padding-top: 20px;
}

.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(2px 2px at 10% 20%, rgba(217,164,65,0.55), transparent 60%),
    radial-gradient(2px 2px at 80% 30%, rgba(194,38,90,0.55), transparent 60%),
    radial-gradient(1.5px 1.5px at 60% 70%, rgba(217,164,65,0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 30% 80%, rgba(194,38,90,0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 85%, rgba(217,164,65,0.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 45% 15%, rgba(194,38,90,0.35), transparent 60%);
  animation: sparkle-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 40%, transparent 40%, rgba(9,4,8,0.65) 100%);
  pointer-events: none;
}

@keyframes sparkle-drift {
  0%   { opacity: 0.5; transform: translateY(0px) scale(1); }
  100% { opacity: 1;   transform: translateY(-14px) scale(1.03); }
}

.hero-ornament {
  font-size: 1.6rem;
  letter-spacing: 14px;
  color: var(--gold);
  opacity: 0.65;
  margin-bottom: 6px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 700;
  font-size: clamp(2.1rem, 8vw, 4rem);
  margin-bottom: 10px;
  color: var(--gold);
  text-shadow: 0 0 30px rgba(217,164,65,0.35), 0 0 60px rgba(194,38,90,0.25);
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
}
.hero h1 span { color: var(--velvet-light); text-shadow: 0 0 30px rgba(194,38,90,0.45); }
.hero .tagline {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: clamp(0.95rem, 3vw, 1.15rem);
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 18px;
  position: relative; z-index: 1;
}
.hero p.sub { color: var(--text-dim); max-width: 520px; margin-bottom: 36px; position: relative; z-index: 1; }

.role-cards { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.role-card {
  background: linear-gradient(160deg, rgba(36,18,30,0.9), rgba(20,9,16,0.9));
  backdrop-filter: blur(4px);
  border: 1px solid rgba(217,164,65,0.25); border-radius: var(--radius);
  padding: 28px; width: 240px; transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.role-card:hover {
  transform: translateY(-6px);
  border-color: var(--velvet-light);
  box-shadow: 0 12px 40px rgba(194,38,90,0.25), 0 0 0 1px rgba(217,164,65,0.15);
}
.role-card h3 { color: var(--gold); margin-top: 0; font-family: 'Playfair Display', Georgia, serif; }
.role-card .btns { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

/* Signature homepage element: stylized velvet curtains parting to reveal
   the page, echoing the brand name and the "every conversation feels like
   an invitation" tagline. Pure SVG/CSS — no photography or people. */
.hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }

.curtain {
  position: absolute; top: 0; bottom: 0; width: 220px; z-index: 2;
  pointer-events: none;
  filter: drop-shadow(6px 0 24px rgba(0,0,0,0.55));
}
.curtain svg { width: 100%; height: 100%; display: block; }
.curtain-left {
  left: 0;
  animation: curtain-open-left 1.5s cubic-bezier(.22,1,.36,1) both;
}
.curtain-right {
  right: 0;
  animation: curtain-open-right 1.5s cubic-bezier(.22,1,.36,1) both;
}
@keyframes curtain-open-left {
  0%   { transform: translateX(-14%) scaleX(1.12); opacity: 0.35; }
  100% { transform: translateX(0) scaleX(1); opacity: 1; }
}
@keyframes curtain-open-right {
  0%   { transform: translateX(14%) scaleX(1.12); opacity: 0.35; }
  100% { transform: translateX(0) scaleX(1); opacity: 1; }
}

.curtain-valance {
  position: absolute; top: 0; left: 0; right: 0; height: 64px; z-index: 2;
  background: linear-gradient(180deg, #5c1129, #8a1538 65%, transparent);
  clip-path: polygon(0 0,100% 0,100% 52%,92% 68%,84% 52%,76% 70%,68% 52%,60% 70%,52% 52%,44% 70%,36% 52%,28% 70%,20% 52%,12% 70%,4% 52%,0 60%);
  opacity: 0.9;
  animation: valance-drop 1s ease-out both;
  animation-delay: 0.15s;
}
@keyframes valance-drop {
  0%   { transform: translateY(-100%); opacity: 0; }
  100% { transform: translateY(0); opacity: 0.9; }
}

@media (prefers-reduced-motion: reduce) {
  .curtain-left, .curtain-right, .curtain-valance { animation: none; }
}

/* ---- Homepage: real photo banner with a genuinely clickable Join Now ---- */
.match-photo-banner {
  position: relative; max-width: 900px; margin: 32px auto 0; border-radius: var(--radius);
  overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border: 1px solid rgba(217,164,65,0.25); line-height: 0;
}
.match-photo-banner img { width: 100%; display: block; }
/* Positioned as a % of the image so it always lines up with the baked-in
   button pixels, no matter how wide the image is rendered. */
.match-photo-join-overlay {
  position: absolute; left: 2.8%; top: 83.5%; width: 22%; height: 6.8%;
  border-radius: 999px; cursor: pointer;
  transition: box-shadow 0.2s ease;
}
.match-photo-join-overlay:hover, .match-photo-join-overlay:focus-visible {
  box-shadow: 0 0 0 4px rgba(217,164,65,0.55);
  outline: none;
}

/* ---- Homepage: trust badges ---- */
.trust-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  padding: 24px 20px 8px;
}
.trust-badge {
  background: rgba(217,164,65,0.08); border: 1px solid rgba(217,164,65,0.3);
  color: var(--text); border-radius: 999px; padding: 8px 18px; font-size: 0.85rem; font-weight: 600;
}

/* ---- Homepage: About section ---- */
.about-card { max-width: 680px; margin: 32px auto 0; text-align: center; }
.about-card h2 { color: var(--gold); margin-top: 0; }
.about-card p { color: var(--text-dim); line-height: 1.7; }

@media (max-width: 640px) {
  .match-photo-banner { margin-top: 20px; }
}

/* ---- Privacy: blur content when the tab/window isn't active ---- */
.page { transition: filter 0.25s ease; }
.page.privacy-blurred { filter: blur(18px); pointer-events: none; user-select: none; }
#privacyBlurNotice {
  position: fixed; inset: 0; z-index: 9999; display: none;
  align-items: center; justify-content: center; text-align: center;
  background: rgba(10,4,8,0.55); color: var(--text); font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem;
}
#privacyBlurNotice.show { display: flex; }

/* ---- Privacy: viewer watermark overlay on photos ---- */
.watermark-wrap { position: relative; overflow: hidden; }
.watermark-layer {
  position: absolute; inset: 0; pointer-events: none;
  background-repeat: repeat; opacity: 0.5; mix-blend-mode: screen;
}

.btn {
  display: inline-block; padding: 10px 20px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, var(--velvet-light), var(--velvet));
  color: #fff; font-weight: 600; cursor: pointer; text-align: center;
  transition: filter 0.15s;
}
.btn:hover { filter: brightness(1.15); color: #fff; }
.btn.secondary { background: transparent; border: 1px solid var(--velvet-light); color: var(--velvet-light); }
.btn.gold { background: linear-gradient(135deg, var(--gold), #a97423); color: #241205; }
.btn.block { width: 100%; }
.btn.danger { background: linear-gradient(135deg, var(--danger), #8f1424); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.container { max-width: 960px; margin: 0 auto; padding: 32px 20px; width: 100%; flex: 1; }
.container.narrow { max-width: 440px; }

.card {
  background: var(--card); border: 1px solid rgba(217,164,65,0.2); border-radius: var(--radius);
  padding: 28px; margin-bottom: 20px;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; color: var(--text-dim); font-size: 0.9rem; }
.form-group input, .form-group textarea {
  width: 100%; padding: 11px 14px; border-radius: 8px; border: 1px solid rgba(217,164,65,0.3);
  background: #150a12; color: var(--text); font-size: 1rem;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--velvet-light); }

/* Show/hide toggle button injected next to every password field (see
   base.html's global script) so people can double-check what they typed
   instead of just re-typing blind when unsure. */
.password-field-wrap { position: relative; }
.password-field-wrap input[type="password"],
.password-field-wrap input[type="text"].pw-revealed { padding-right: 44px; }
.password-toggle-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px;
  font-size: 1.1rem; line-height: 1; color: var(--text-dim);
}
.password-toggle-btn:hover { color: var(--gold); }

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

.flash-wrap { max-width: 600px; margin: 16px auto 0; padding: 0 20px; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 10px; font-size: 0.9rem; }
.flash-error { background: rgba(224,67,92,0.15); border: 1px solid var(--danger); color: #ffb3c0; }
.flash-success { background: rgba(79,191,122,0.15); border: 1px solid var(--success); color: #baf3ce; }

.model-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 18px; }
.model-card { background: var(--card); border-radius: var(--radius); padding: 20px; text-align: center; border: 1px solid rgba(217,164,65,0.2); }
.model-card .avatar { font-size: 3rem; margin-bottom: 8px; }
.model-card .status { font-size: 0.75rem; color: var(--success); }
.model-card .status.offline { color: var(--text-dim); }
.model-card .actions { display: flex; gap: 8px; margin-top: 14px; }
.model-card .actions .btn { flex: 1; padding: 8px 6px; font-size: 0.85rem; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-box { background: var(--card); border-radius: var(--radius); padding: 20px; border: 1px solid rgba(217,164,65,0.2); }
.stat-box .label { color: var(--text-dim); font-size: 0.85rem; }
.stat-box .value { font-size: 1.7rem; font-weight: 700; color: var(--gold); margin-top: 4px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid rgba(217,164,65,0.15); }
th { color: var(--text-dim); font-weight: 600; }

.chat-wrap {
  display: flex; flex-direction: column; height: 78vh; max-width: 700px; margin: 20px auto;
  border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(217,164,65,0.2);
  --chat-bg: #24121e;
  --chat-header-bg: rgba(0,0,0,0.25);
  --chat-messages-bg: transparent;
  --chat-mine-start: #c2265a;
  --chat-mine-end: #8a1538;
  --chat-mine-text: #fff;
  --chat-theirs-bg: #33192a;
  --chat-theirs-text: #f3e6ec;
  --chat-input-bg: #150a12;
  --chat-accent: #d9a441;
  background: var(--chat-bg);
}
.chat-header { padding: 16px 20px; background: var(--chat-header-bg); display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; background: var(--chat-messages-bg); }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 14px; line-height: 1.4; }
.msg.mine { align-self: flex-end; background: linear-gradient(135deg, var(--chat-mine-start), var(--chat-mine-end)); color: var(--chat-mine-text); border-bottom-right-radius: 4px; }
.msg.theirs { align-self: flex-start; background: var(--chat-theirs-bg); color: var(--chat-theirs-text); border-bottom-left-radius: 4px; }
.msg-text { white-space: pre-wrap; word-break: break-word; }
.msg-meta { font-size: 0.7rem; margin-top: 4px; opacity: 0.75; display: flex; gap: 4px; align-items: center; }
.msg.mine .msg-meta { justify-content: flex-end; }

/* ---- Typing indicator ---- */
.typing-indicator {
  display: none; align-items: center; gap: 8px; padding: 6px 14px 2px; color: var(--text-dim); font-size: 0.85rem;
}
.typing-indicator.show { display: flex; }
.typing-dots { display: inline-flex; gap: 3px; }
.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--text-dim);
  animation: typing-bounce 1.2s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}
.ticks.sent { color: rgba(255,255,255,0.65); }
.ticks.delivered { color: rgba(255,255,255,0.75); }
.ticks.seen { color: var(--chat-accent); font-weight: 600; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid rgba(217,164,65,0.15); align-items: center; }
.chat-input input[type="text"] { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 999px; border: 1px solid rgba(217,164,65,0.3); background: var(--chat-input-bg); color: var(--text); font-size: 16px; }
.chat-input .btn { flex-shrink: 0; }
.icon-btn { background: transparent; border: 1px solid rgba(217,164,65,0.3); border-radius: 50%; width: 40px; height: 40px; font-size: 1.1rem; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { border-color: var(--chat-accent); }
.msg-image { max-width: 220px; border-radius: 12px; display: block; margin-bottom: 4px; }
.meter { font-size: 0.75rem; color: var(--text-dim); padding: 4px 20px; }

/* --- Shared chat themes: either side can pick one; it applies to both --- */
.chat-theme-midnight {
  --chat-bg: #0d1420; --chat-header-bg: rgba(10,20,40,0.5);
  --chat-mine-start: #4a7fd4; --chat-mine-end: #23407e;
  --chat-theirs-bg: #17223a; --chat-input-bg: #0a121e; --chat-accent: #6fa3ef;
}
.chat-theme-sunset {
  --chat-bg: #2a1408; --chat-header-bg: rgba(60,20,0,0.35);
  --chat-mine-start: #f2924a; --chat-mine-end: #c5591b;
  --chat-theirs-bg: #3a2010; --chat-input-bg: #200f05; --chat-accent: #f5a623;
}
.chat-theme-ocean {
  --chat-bg: #06201f; --chat-header-bg: rgba(0,40,38,0.4);
  --chat-mine-start: #1fa6a0; --chat-mine-end: #0d6b66;
  --chat-theirs-bg: #0e2d2b; --chat-input-bg: #041615; --chat-accent: #3fd4c9;
}
.chat-theme-rose {
  --chat-bg: #2a0f1c; --chat-header-bg: rgba(60,10,35,0.35);
  --chat-mine-start: #f06fa0; --chat-mine-end: #c23d76;
  --chat-theirs-bg: #3a1826; --chat-input-bg: #1d0a13; --chat-accent: #f6a0c4;
}
.chat-theme-emerald {
  --chat-bg: #07200f; --chat-header-bg: rgba(0,45,20,0.35);
  --chat-mine-start: #3fbf6f; --chat-mine-end: #1e7a41;
  --chat-theirs-bg: #10331a; --chat-input-bg: #051709; --chat-accent: #5fe08a;
}
.chat-theme-royal {
  --chat-bg: #150b28; --chat-header-bg: rgba(35,15,60,0.4);
  --chat-mine-start: #8b6fe0; --chat-mine-end: #5636a8;
  --chat-theirs-bg: #241340; --chat-input-bg: #0e0620; --chat-accent: #b39cf0;
}
.chat-theme-classic {
  --chat-bg: #1a1a1a; --chat-header-bg: rgba(0,0,0,0.4);
  --chat-mine-start: #6b6b6b; --chat-mine-end: #3a3a3a;
  --chat-theirs-bg: #2b2b2b; --chat-input-bg: #101010; --chat-accent: #cfcfcf;
}

.theme-picker { position: relative; display: inline-block; }
.theme-picker-btn { background: transparent; border: 1px solid rgba(217,164,65,0.3); border-radius: 999px; padding: 6px 12px; font-size: 0.8rem; cursor: pointer; color: var(--text); }
.theme-picker-menu { position: absolute; top: 110%; right: 0; background: var(--card); border: 1px solid rgba(217,164,65,0.3); border-radius: 10px; padding: 6px; z-index: 50; display: none; min-width: 170px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.theme-picker-menu.open { display: block; }
.theme-picker-option { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 0.85rem; }
.theme-picker-option:hover { background: rgba(217,164,65,0.12); }
.theme-swatch { width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0; }

.emoji-picker { position: absolute; bottom: 64px; left: 14px; background: var(--card); border: 1px solid rgba(217,164,65,0.3); border-radius: 12px; padding: 10px; width: min(320px, 85vw); max-height: 260px; overflow-y: auto; z-index: 50; display: none; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.emoji-picker.open { display: block; }
.emoji-cat-tabs { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.emoji-cat-tab { background: transparent; border: 1px solid rgba(217,164,65,0.2); border-radius: 6px; padding: 3px 6px; font-size: 0.9rem; cursor: pointer; }
.emoji-cat-tab.active { border-color: var(--gold); background: rgba(217,164,65,0.15); }
.emoji-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.emoji-grid button { background: transparent; border: none; font-size: 1.3rem; cursor: pointer; padding: 4px; border-radius: 6px; line-height: 1; }
.emoji-grid button:hover { background: rgba(217,164,65,0.15); }


.toggle-label { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: var(--text-dim); cursor: pointer; }
.toggle-label input[type="checkbox"] { width: 36px; height: 20px; -webkit-appearance: none; appearance: none; background: #33192a; border-radius: 999px; position: relative; cursor: pointer; outline: none; border: 1px solid rgba(217,164,65,0.3); }
.toggle-label input[type="checkbox"]::before { content: ''; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: var(--text-dim); top: 2px; left: 2px; transition: transform 0.15s, background 0.15s; }
.toggle-label input[type="checkbox"]:checked { background: var(--velvet); }
.toggle-label input[type="checkbox"]:checked::before { transform: translateX(16px); background: var(--gold); }

.capture-modal { position: fixed; inset: 0; background: rgba(5,2,4,0.85); z-index: 999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.capture-box { background: var(--card); border-radius: var(--radius); padding: 20px; max-width: 480px; width: 100%; border: 1px solid rgba(217,164,65,0.3); }
.capture-box video { width: 100%; border-radius: 10px; background: #000; max-height: 60vh; }
.capture-controls { display: flex; gap: 10px; margin-top: 16px; justify-content: center; }

.call-wrap { max-width: 480px; margin: 40px auto; text-align: center; }
.call-avatar { font-size: 5rem; margin: 20px 0; }
.call-timer { font-size: 2.4rem; font-weight: 700; color: var(--gold); margin: 10px 0; }
.call-coins { color: var(--text-dim); margin-bottom: 20px; }
.media-warning { background: rgba(224,67,92,0.15); border: 1px solid var(--danger); color: #ffb3c0; padding: 10px 14px; border-radius: 8px; font-size: 0.85rem; margin: 12px 0; text-align: left; }
.call-video-box { width: 100%; aspect-ratio: 4/3; background: #0c0509; border-radius: var(--radius); display: flex; align-items: center; justify-content: center; margin: 20px 0; overflow: hidden; position: relative; border: 1px solid rgba(217,164,65,0.2); }
.call-video-box #placeholderAvatar { top: 50%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; z-index: 0; }
.call-video-box .video-el { object-fit: cover; background: #000; }
.call-video-box .video-el.main-video { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.call-video-box .video-el.pip { position: absolute; bottom: 10px; right: 10px; width: 96px; height: 74px; border-radius: 8px; border: 2px solid var(--gold); z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,0.4); }
.call-controls { display: flex; gap: 12px; justify-content: center; margin-top: 20px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.badge.on { background: rgba(79,191,122,0.2); color: var(--success); }
.badge.off { background: rgba(184,184,184,0.15); color: var(--text-dim); }

/* ---- Small red notification counter (Inbox, User List nav buttons) ---- */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--danger); color: #fff; border-radius: 999px;
  font-size: 0.7rem; font-weight: 700; margin-left: 4px; vertical-align: middle;
}

/* ---- Global notification bell (floating, every page) ---- */
.notif-bell {
  position: fixed; top: 16px; right: 16px; z-index: 9997;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card); border: 1px solid rgba(217,164,65,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.notif-bell .nav-badge { position: absolute; top: -4px; right: -4px; margin-left: 0; }
.notif-panel {
  position: fixed; top: 66px; right: 16px; z-index: 9997;
  width: min(360px, 90vw); max-height: 70vh; overflow-y: auto;
  background: var(--card); border: 1px solid rgba(217,164,65,0.3); border-radius: var(--radius);
  box-shadow: 0 12px 34px rgba(0,0,0,0.5);
}
.notif-panel-header { padding: 12px 16px; font-weight: 700; border-bottom: 1px solid rgba(217,164,65,0.15); }
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: block; padding: 12px 16px; text-decoration: none; color: var(--text);
  border-bottom: 1px solid rgba(217,164,65,0.08); cursor: pointer;
}
.notif-item:hover { background: rgba(217,164,65,0.06); }
.notif-item.unread { font-weight: 700; }
.notif-item .notif-preview { font-weight: 400; color: var(--text-dim); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-item.unread .notif-preview { color: var(--text); }

.global-call-banner {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9999; width: min(92vw, 420px);
  background: linear-gradient(160deg, rgba(36,18,30,0.98), rgba(20,9,16,0.98));
  border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 18px 22px; text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 4px rgba(217,164,65,0.15);
  animation: global-pulse 1.4s infinite;
}
.global-call-banner-inner { font-size: 1rem; }
@keyframes global-pulse {
  0%, 100% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 4px rgba(217,164,65,0.15); }
  50% { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 10px rgba(217,164,65,0.3); }
}

/* ---- New-message toast notifications (model side) ---- */
#msgToastStack {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 9998; width: min(92vw, 380px);
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.msg-toast {
  pointer-events: auto; cursor: pointer;
  background: linear-gradient(160deg, rgba(36,18,30,0.98), rgba(20,9,16,0.98));
  border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 12px 16px; box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  animation: toast-in 0.25s ease-out;
  display: flex; align-items: center; gap: 10px;
}
.msg-toast:hover { border-color: var(--velvet-light); }
.msg-toast .toast-icon { font-size: 1.3rem; flex-shrink: 0; }
.msg-toast .toast-body { flex: 1; min-width: 0; }
.msg-toast .toast-title { font-weight: 700; color: var(--gold); font-size: 0.9rem; }
.msg-toast .toast-preview { font-size: 0.85rem; color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes toast-in {
  0% { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* ---- Survey prompt modal (shown once, after a user's first-ever free message) ---- */
.survey-modal-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10,4,8,0.75);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.survey-modal-box {
  background: linear-gradient(160deg, rgba(36,18,30,0.98), rgba(20,9,16,0.98));
  border: 2px solid var(--gold); border-radius: var(--radius);
  padding: 28px; max-width: 420px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.survey-modal-box h3 { color: var(--gold); margin-top: 0; }
.survey-modal-box .btns { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---- Bonus-messages status icon (chat header) ---- */
.bonus-status-icon {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; font-weight: 600;
}
.bonus-status-icon.active { background: rgba(79,191,122,0.18); color: var(--success); }
.bonus-status-icon.used { background: rgba(224,67,92,0.18); color: var(--danger); }

/* ---- Sticker gift picker + gift message bubble ---- */
.gift-modal-box {
  position: relative; z-index: 1; background: var(--card); border: 1px solid rgba(217,164,65,0.3);
  border-radius: var(--radius); max-width: 480px; width: 100%; max-height: 85vh;
  display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.gift-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px; border-bottom: 1px solid rgba(217,164,65,0.15); flex-shrink: 0;
}
.gift-modal-header h3 { margin: 0; }
.gift-cat-tabs {
  display: flex; gap: 6px; padding: 12px 14px 0; overflow-x: auto; flex-shrink: 0;
}
.gift-cat-tab {
  background: rgba(217,164,65,0.08); border: 1px solid rgba(217,164,65,0.25); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: 0.82rem; white-space: nowrap; cursor: pointer;
}
.gift-cat-tab.active { background: var(--gold); color: #241205; font-weight: 700; border-color: var(--gold); }
.gift-modal-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(90px,1fr)); gap: 10px;
  padding: 14px 18px 18px; overflow-y: auto; flex: 1;
}
.gift-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(78px,1fr)); gap: 8px;
  padding: 10px; max-height: 260px; overflow-y: auto;
}
.gift-option {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: rgba(217,164,65,0.08); border: 1px solid rgba(217,164,65,0.25); border-radius: 10px;
  padding: 8px 4px; cursor: pointer; text-align: center;
}
.gift-option:hover { background: rgba(217,164,65,0.18); border-color: var(--gold); }
.gift-option .gift-emoji { font-size: 1.8rem; }
.gift-option .gift-label { font-size: 0.7rem; color: var(--text); }
.gift-option .gift-cost { font-size: 0.7rem; color: var(--gold); font-weight: 700; }
.msg-gift {
  font-size: 2.2rem; text-align: center; padding: 6px 0 2px;
}
.msg-gift-label { font-size: 0.8rem; text-align: center; color: var(--text-dim); margin-bottom: 4px; }

/* ---- Private content offer card (chat message) ---- */
.msg-offer-card {
  display: block; text-decoration: none; color: var(--text);
  background: rgba(217,164,65,0.1); border: 1px solid rgba(217,164,65,0.35);
  border-radius: 12px; padding: 12px 14px; min-width: 200px; max-width: 260px;
}
.msg-offer-icon { font-size: 1.5rem; margin-bottom: 4px; }
.msg-offer-text { font-size: 0.85rem; margin-bottom: 8px; }
.msg-offer-cta { font-size: 0.8rem; font-weight: 700; color: var(--gold); }

.small { font-size: 0.85rem; color: var(--text-dim); }
.center { text-align: center; }
.mt { margin-top: 20px; }

.avatar-preview { width: 120px; height: 120px; border-radius: 50%; overflow: hidden; margin: 0 auto 18px; border: 3px solid var(--gold); background: #1c0e17; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-preview.large { width: 150px; height: 150px; }
.avatar-preview.tiny { width: 38px; height: 38px; margin: 0; border-width: 2px; }
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-preview .avatar-placeholder { font-size: 3rem; }
.avatar-preview.tiny .avatar-placeholder { font-size: 1.1rem; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; }
.photo-item { background: var(--bg2); border-radius: 10px; overflow: hidden; border: 1px solid rgba(217,164,65,0.2); }
.photo-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }
.photo-caption { padding: 8px 10px; font-size: 0.8rem; color: var(--text-dim); }

/* ---- Private content: subscribe box, video lock ---- */
.subscribe-box {
  text-align: center; padding: 20px; border: 2px dashed rgba(217,164,65,0.4);
  border-radius: var(--radius); background: rgba(217,164,65,0.06); margin-bottom: 12px;
}
.private-video-lock {
  aspect-ratio: 16/9; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.4); border-radius: 8px; gap: 6px; cursor: pointer;
}
.private-video-lock .lock-icon { font-size: 2.2rem; }
.video-thumb-wrap { position: relative; cursor: pointer; aspect-ratio: 1/1; overflow: hidden; }
.video-thumb-wrap video { width: 100%; height: 100%; object-fit: cover; }
.video-play-badge {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 48px; height: 48px; border-radius: 50%; background: rgba(0,0,0,0.55); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.3rem; pointer-events: none;
}
.model-content-photo, .model-own-photo { cursor: pointer; }

/* ---- Like / comment UI ---- */
.content-actions { display: flex; gap: 12px; padding: 8px 10px 4px; align-items: center; }
.like-btn, .comment-toggle-btn {
  background: none; border: 1px solid rgba(217,164,65,0.25); border-radius: 999px;
  padding: 5px 12px; color: var(--text); cursor: pointer; font-size: 0.85rem;
  display: flex; align-items: center; gap: 5px;
}
.like-btn.liked { border-color: var(--velvet-light); background: rgba(194,38,90,0.12); }
.comments-box { padding: 8px 10px 10px; border-top: 1px solid rgba(217,164,65,0.12); margin-top: 4px; }
.comment-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; max-height: 180px; overflow-y: auto; }
.comment-row { font-size: 0.82rem; color: var(--text-dim); }
.comment-row strong { color: var(--gold); }
.comment-input-row { display: flex; gap: 6px; }
.comment-input-row input { flex: 1; }

/* ---- Global content lightbox ---- */
.content-lightbox {
  position: fixed; inset: 0; z-index: 10001;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(5,2,4,0.88); }
.lightbox-box {
  position: relative; z-index: 1; background: var(--card); border: 1px solid rgba(217,164,65,0.3);
  border-radius: var(--radius); max-width: 560px; width: 100%; max-height: 90vh;
  overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  background: rgba(0,0,0,0.55); color: #fff; border: none; border-radius: 50%;
  width: 34px; height: 34px; font-size: 1.1rem; cursor: pointer;
}
.lightbox-media { width: 100%; max-height: 55vh; background: #000; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lightbox-media img, .lightbox-media video { width: 100%; height: auto; max-height: 55vh; object-fit: contain; display: block; }
.lightbox-body { padding: 14px 16px; }
.lightbox-caption { margin-bottom: 8px; }
.lightbox-box .comment-list { max-height: 220px; }
.photo-item form { padding: 0 8px 8px; }

/* ==========================================================================
   Mobile / portrait-priority responsive rules
   The rules above were desktop-first with no breakpoints. These make
   phones (portrait orientation especially) the primary target.
   ========================================================================== */
@media (max-width: 768px) {
  .navbar { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .navbar .brand { font-size: 1.2rem; }
  .navbar .nav-links { gap: 8px 14px; font-size: 0.85rem; width: 100%; }
  .badge, .coin-pill { font-size: 0.7rem; padding: 3px 8px; }
  .container { padding: 18px 14px; }
  .container.narrow { max-width: 100%; }

  .hero .cards, .model-grid { grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 12px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 10px; }
  .stats-grid { grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 10px; }

  .card { padding: 18px; }
  .form-row { flex-direction: column; gap: 0; }

  table { display: block; overflow-x: auto; white-space: nowrap; }

  /* Chat: fill the screen instead of floating as a small desktop-style panel */
  .chat-wrap { height: calc(100dvh - 64px); max-width: 100%; margin: 0; border-radius: 0; border-left: none; border-right: none; }
  .chat-header { padding: 12px 14px; }
  .msg { max-width: 85%; }

  /* Calls: portrait-first video, not a wide landscape box */
  .call-wrap { max-width: 100%; margin: 0; padding: 0 12px; }
  .call-video-box { aspect-ratio: 3/4; }
  .call-video-box .video-el.pip { width: 88px; height: 118px; }
  .call-avatar { font-size: 3.5rem; margin: 12px 0; }
  .call-timer { font-size: 2rem; }

  .capture-box { max-width: 100%; }
  .capture-box video { max-height: 50vh; }

  /* Chat input row: tighten spacing so emoji/attach/camera icons + text
     field + Send button all fit on a narrow phone screen without the
     Send button overflowing past the edge. */
  .chat-input { gap: 6px; padding: 10px; }
  .chat-input .icon-btn { width: 34px; height: 34px; font-size: 1rem; }
  .chat-input input[type="text"] { padding: 10px 12px; }
  .chat-input .btn { padding: 10px 14px; font-size: 0.9rem; }
}

@media (max-width: 420px) {
  .call-video-box { aspect-ratio: 9/16; }
}

@media (max-width: 640px) {
  .curtain { width: 34px; }
  .curtain-valance { height: 28px; }
  .hero { padding-left: 44px; padding-right: 44px; }
  .hero-content { max-width: 100%; }
}


/* Reserve room on the right of the navbar for the fixed notification bell so
   it never covers the last link (e.g. Logout). */
.has-bell .navbar { padding-right: 76px; }
@media (max-width: 768px) { .has-bell .navbar { padding-right: 68px; } }
