/* Modern Hidden Sleek Scrollbars Globally */
html, body, div, section, main, nav, .chat-messages-scroll, .media-grid, .media-source-tabs {
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

::-webkit-scrollbar {
  width: 0px !important;
  height: 0px !important;
  display: none !important;
}

/* ============================================================
   SANCTUM: SOVEREIGN MINIMALIST SENSUAL SYSTEM
   Velvety obsidian, deep silk, warm amber gold, zero green on splash
   Ultra-understated, flat, stealth, zero-glare
   ============================================================ */

:root {
  --bg: #08070b;
  --bg-velvet: #0d0c12;
  --bg-card: rgba(18, 16, 24, 0.82);
  --bg-card-hover: rgba(25, 22, 34, 0.95);
  --bg-elevated: #14121c;
  
  --border: rgba(212, 163, 115, 0.12);
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-active: rgba(212, 163, 115, 0.4);
  
  --accent: #d4a373;
  --accent-soft: rgba(212, 163, 115, 0.12);
  --accent-glow: rgba(212, 163, 115, 0.2);
  --accent-hover: #e0b284;
  
  --wine: #7c2d42;
  --wine-soft: rgba(124, 45, 66, 0.18);
  
  --yes-color: #d4a373;
  --yes-soft: rgba(212, 163, 115, 0.14);
  --maybe-color: #b89772;
  --maybe-soft: rgba(184, 151, 114, 0.14);
  --no-color: #585563;
  --no-soft: rgba(88, 85, 99, 0.14);
  
  --text: #edeaf4;
  --text-muted: #9590a0;
  --text-faint: #595564;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", serif, sans-serif;
  --shadow-soft: 0 12px 32px -8px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Subtle sensual ambient background */
.ambient-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 50% 40%, rgba(20, 18, 28, 0.98) 0%, #08070b 100%);
  pointer-events: none;
  z-index: -2;
}

/* Dynamic Anti-Screenshot Security Watermark */
.security-watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 99;
  opacity: 0.025;
  background-image: repeating-linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 0,
    transparent 80px
  );
}

/* Privacy Blur Shield */
#privacy-shroud {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 7, 11, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 24px;
}

#privacy-shroud.active {
  display: flex;
}

.container {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: 16px 14px 100px 14px;
  overflow-x: hidden;
  position: relative;
  z-index: 1;
}

/* Cards (Inside active enclaves) */
.card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

/* Header */
.app-header {
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(13, 12, 18, 0.88);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.brand-badge {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.nav-tab-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  background: transparent;
  padding: 2px;
  border: none;
  width: 100%;
}

.tab-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  min-height: 40px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  touch-action: manipulation;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text);
}

.tab-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Buttons */
.btn {
  border: none;
  border-radius: var(--radius-pill);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  outline: none;
}

.btn-primary {
  background: var(--accent);
  color: #0c0b10;
  padding: 12px 24px;
  font-size: 0.92rem;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 16px;
  font-size: 0.82rem;
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: var(--wine-soft);
  border: 1px solid rgba(124, 45, 66, 0.35);
  color: #f0a0b2;
  padding: 7px 14px;
  font-size: 0.8rem;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.link-input {
  background: var(--bg-velvet);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease;
}

.link-input:focus {
  border-color: var(--accent);
}

/* ============================================================
   UNDERSTATED FLAT SPLASH PAGE (NO CARD, FLAT IN CENTER)
   ============================================================ */
.splash-flat-wrapper {
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.splash-flat-container {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.flat-symbol {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0.85;
}

.flat-input {
  width: 100%;
  background: rgba(20, 18, 28, 0.6);
  border: 1px solid var(--border-soft);
  color: var(--text);
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  text-align: center;
  outline: none;
  margin-bottom: 14px;
  transition: border-color 0.2s ease;
}

.flat-input:focus {
  border-color: var(--accent);
}

.flat-btn-primary {
  width: 100%;
  background: var(--accent);
  color: #08070b;
  border: none;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.flat-btn-primary:hover {
  opacity: 0.92;
}

.flat-technical-disclosure {
  margin-top: 36px;
  width: 100%;
  max-width: 440px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0.85;
}

.tech-disclosure-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  text-align: center;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tech-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tech-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.tech-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: 0.02em;
}

.tech-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ============================================================
   ENCRYPTED PAIRWISE CHAT & MEDIA ENCLAVE
   ============================================================ */
.chat-section-card {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 150px);
  min-height: 500px;
  padding: 0;
  overflow: hidden;
}

.chat-header {
  padding: 12px 18px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.consent-banner {
  padding: 8px 16px;
  background: rgba(212, 163, 115, 0.06);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--accent);
}

.chat-messages-scroll {
  flex: 1;
  padding: 18px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.chat-bubble-wrap {
  display: flex;
  flex-direction: column;
  max-width: 80%;
}

.chat-bubble-wrap.mine {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-bubble-wrap.theirs {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-bubble {
  padding: 11px 15px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: break-word;
}

.chat-bubble.mine {
  background: var(--accent);
  color: #0a090e;
  border-bottom-right-radius: 3px;
  font-weight: 500;
}

.chat-bubble.theirs {
  background: var(--bg-card-hover);
  color: var(--text);
  border: 1px solid var(--border-soft);
  border-bottom-left-radius: 3px;
}

.chat-media-embed {
  max-width: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 6px;
}

.chat-media-embed img,
.chat-media-embed video {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.chat-voice-player {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  min-width: 180px;
}

.chat-input-bar {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 8px;
  align-items: center;
}

.voice-recording-active {
  background: var(--wine-soft) !important;
  border-color: var(--wine) !important;
  color: #f0a0b2 !important;
}

/* GIF & Media Drawer Modal */
.media-picker-modal {
  position: fixed;
  bottom: 75px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 500px;
  height: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  z-index: 100;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.media-picker-modal.active {
  display: flex;
}

.media-picker-header {
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.media-source-tabs {
  display: flex;
  gap: 4px;
  padding: 6px 10px;
  background: var(--bg-velvet);
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
}

.media-grid {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.media-grid-item {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  background: var(--bg-velvet);
  border: 1px solid var(--border-soft);
}

.media-grid-item img,
.media-grid-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.favorite-star-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: rgba(0, 0, 0, 0.65);
  border: none;
  color: #fff;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  cursor: pointer;
}

.favorite-star-btn.starred {
  color: #e0b284;
}

/* ============================================================
   CROSS-PLATFORM PWA INSTALL SHEET (DESKTOP + MOBILE)
   ============================================================ */
.pwa-install-sheet {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 92%;
  max-width: 420px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
  z-index: 1000;
  display: none;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.pwa-install-sheet.active {
  display: block;
}

@keyframes slideUp {
  from { transform: translate(-50%, 25px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* Checklist items */
.checklist-item {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.checklist-item.selected-yes {
  border-color: var(--yes-color);
  background: rgba(212, 163, 115, 0.08);
}

.checklist-item.selected-maybe {
  border-color: var(--maybe-color);
  background: rgba(184, 151, 114, 0.08);
}

.choice-toggles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  width: 100%;
  margin-top: 12px;
}

.choice-btn {
  background: var(--bg-velvet);
  border: 1px solid var(--border-soft);
  color: var(--text-muted);
  min-height: 48px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

.choice-btn:active {
  transform: scale(0.97);
}

.choice-btn.yes.active {
  background: var(--yes-color);
  color: #08070b;
  border-color: var(--yes-color);
}

.choice-btn.maybe.active {
  background: var(--maybe-color);
  color: #08070b;
  border-color: var(--maybe-color);
}

.choice-btn.no.active {
  background: var(--no-color);
  color: #fff;
  border-color: var(--no-color);
}

@media (max-width: 600px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }
  .container {
    padding: 12px 10px 80px 10px;
    max-width: 100%;
  }
  .card {
    padding: 16px 12px;
    border-radius: var(--radius-md);
  }
  .checklist-item {
    padding: 14px 12px;
  }
  .chat-section-card {
    height: calc(100dvh - 110px);
    min-height: 420px;
  }
  .choice-btn {
    min-height: 50px;
    font-size: 0.94rem;
  }
}

.boundary-badge {
  font-size: 0.65rem;
  padding: 2px 7px;
  background: var(--wine-soft);
  color: #f0a0b2;
  border: 1px solid rgba(124, 45, 66, 0.4);
  border-radius: var(--radius-pill);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-left: 6px;
  display: inline-block;
  vertical-align: middle;
}

.flat-btn-secondary {
  background: var(--bg-velvet);
  color: var(--text-muted);
  border: 1px solid var(--border-soft);
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.flat-btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================
   0-5 DILDO SVG RATING SCALE
   ============================================================ */
.dildo-rating-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px 0;
  padding: 6px 10px;
  background: rgba(20, 18, 28, 0.4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-soft);
  width: fit-content;
}

.dildo-rating-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.dildo-rating-scale {
  display: flex;
  gap: 6px;
}

.dildo-rate-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  transition: all 0.15s ease;
  touch-action: manipulation;
}

.dildo-icon {
  width: 22px;
  height: 22px;
  stroke: var(--text-faint);
  fill: transparent;
  transition: all 0.18s ease;
}

.dildo-rate-btn:hover .dildo-icon,
.dildo-rate-btn.hover-active .dildo-icon {
  stroke: var(--accent);
  fill: rgba(212, 163, 115, 0.3);
  transform: scale(1.12);
}

.dildo-rate-btn.active .dildo-icon {
  stroke: var(--accent);
  fill: var(--accent);
  filter: drop-shadow(0 0 6px rgba(212, 163, 115, 0.5));
}

/* ============================================================
   QUICK-FIRE RANDOM QUESTION MODAL
   ============================================================ */
.quickfire-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 7, 11, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.2s ease;
}

.quickfire-modal-overlay.active {
  display: flex;
}

.quickfire-card {
  width: 100%;
  max-width: 520px;
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.quickfire-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.quickfire-progress {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.quickfire-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
}

.quickfire-question-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.35;
}

.quickfire-question-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.quickfire-nav-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
