:root {
  --bg: #06060a;
  --panel: #09090d;
  --border: rgba(255,255,255,0.04);
  --border-hover: rgba(255,255,255,0.08);
  --text: #f3f4f6;
  --muted: rgba(255,255,255,0.4);
  --purple: #a855f7;
  --pink: #ec4899;
  --emerald: #10b981;
  --cyan: #22d3ee;
  --cyan-dark: #0ea5e9;
  --amber: #fbbf24;
  --coral: #fb7185;
  --gradient-cta: linear-gradient(135deg, #a855f7, #ec4899);
  --gradient-ok: linear-gradient(135deg, #10b981, #22d3ee);
  --logo-gradient: linear-gradient(135deg, #22d3ee, #0ea5e9);
  --card-bg: rgba(255,255,255,0.015);
  --card-border: rgba(255,255,255,0.04);
}

/* ANIMATIONS */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 12px var(--cyan);
  }
  50% {
    box-shadow: 0 0 20px var(--cyan), 0 0 30px rgba(34, 211, 238, 0.3);
  }
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 10px;
}

/* HEADER */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(9,9,13,0.8);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 4px 12px rgba(0,0,0,0.4);
  animation: fadeUp 0.6s ease-out;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--logo-gradient);
  box-shadow: 0 0 12px var(--cyan);
  animation: glow 2s ease-in-out infinite;
}

.brand-text .title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.brand-text .subtitle {
  font-size: 12px;
  color: var(--muted);
}

/* CHAT */
.chat {
  flex: 1;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 4px 16px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.03);
  animation: fadeUp 0.6s ease-out 0.1s both;
}

.msg {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  line-height: 1.3;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.02),
    0 2px 8px rgba(0,0,0,0.3);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.msg.bot {
  background:
    linear-gradient(135deg, rgba(168,85,247,0.08), rgba(168,85,247,0.03)),
    rgba(168,85,247,0.05);
  border-color: rgba(168,85,247,0.12);
  align-self: flex-start;
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.1),
    0 2px 8px rgba(0,0,0,0.3),
    0 4px 16px rgba(168,85,247,0.15);
}

.msg.user {
  background:
    linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02)),
    rgba(255,255,255,0.03);
  border-color: rgba(255,255,255,0.08);
  align-self: flex-end;
}

.chat-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  object-fit: contain;
}

/* CHAT BUTTONS (LINKS) */
.chat-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  text-decoration: none;
  font-size: 0.9em;
  padding: 6px 12px;
  vertical-align: middle;
}

.chat-link-btn .ext {
  font-size: 0.8em;
  opacity: 0.7;
}

.chat-link-btn.onlyfans {
  border-color: #00aff0;
  color: #00aff0;
  background: rgba(0, 175, 240, 0.1);
}

.chat-link-btn.onlyfans:hover {
  background: rgba(0, 175, 240, 0.25);
}

/* BUTTONS */
.buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* FAQ SUGGESTIONS */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.flow-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
}

/* Limit suggestions container height on mobile */
@media (max-width: 600px) {
  .suggestions {
    max-height: 150px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .flow-buttons {
    max-height: 200px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.btn {
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(168,85,247,0.2);
  background:
    linear-gradient(135deg, rgba(168,85,247,0.08), rgba(168,85,247,0.04)),
    rgba(168,85,247,0.06);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.1),
    0 2px 6px rgba(0,0,0,0.2),
    0 2px 12px rgba(168,85,247,0.1);
}

.btn:hover {
  border-color: rgba(168,85,247,0.4);
  background:
    linear-gradient(135deg, rgba(168,85,247,0.15), rgba(168,85,247,0.08)),
    rgba(168,85,247,0.12);
  transform: translateY(-1px);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.25),
    0 4px 12px rgba(0,0,0,0.3),
    0 4px 20px rgba(168,85,247,0.25);
}

.btn.primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: #fff;
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.3),
    0 4px 12px rgba(0,0,0,0.4),
    0 8px 24px rgba(168,85,247,0.25);
}

.btn.primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 0 1px rgba(168,85,247,0.4),
    0 6px 20px rgba(0,0,0,0.5),
    0 12px 32px rgba(168,85,247,0.35);
  filter: brightness(1.1);
}

.btn.send {
  border-radius: 14px;
}

/* CHECKBOX BUTTONS (MultiSelect) */
.checkbox-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-btn input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--purple);
  cursor: pointer;
}

.checkbox-btn.selected {
  background: rgba(168,85,247,0.08);
  border-color: rgba(168,85,247,0.3);
}

.done-btn {
  margin-top: 8px;
  width: 100%;
}

/* INPUT */
.input-row {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 100;
  background: var(--bg);
  padding: 8px 0;
}

input {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.3);
  color: var(--text);
  outline: none;
  font-family: 'Inter', system-ui, sans-serif;
  transition: all 0.2s ease;
}

input:focus {
  border-color: rgba(168,85,247,0.4);
  box-shadow: 0 0 0 3px rgba(168,85,247,0.1);
}

/* HEADER BUTTONS - Transparent */
.header-actions .btn {
  background: transparent;
  border-color: var(--border);
}

.header-actions .btn:hover {
  background: rgba(168,85,247,0.06);
  border-color: rgba(168,85,247,0.3);
}

.header-actions .btn.primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  border-color: transparent;
  color: #fff;
}

/* SIGNUP BUTTON */
.signup-btn {
  background: linear-gradient(135deg, var(--emerald), var(--cyan));
  border-color: transparent;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  box-shadow:
    0 0 0 1px rgba(16,185,129,0.3),
    0 2px 8px rgba(16,185,129,0.2);
}

.signup-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.15);
  box-shadow:
    0 0 0 1px rgba(16,185,129,0.4),
    0 4px 16px rgba(16,185,129,0.3);
}

/* MOBILE */
@media (max-width: 600px) {
  .msg {
    max-width: 92%;
  }

  .wrap {
    padding: 8px;
    gap: 8px;
  }

  .header {
    padding: 8px 12px;
  }

  .header-actions {
    display: flex;
    gap: 6px;
  }

  .header-actions .btn {
    padding: 6px 10px;
    font-size: 13px;
  }

  .brand-text .title {
    font-size: 14px;
  }

  .brand-text .subtitle {
    font-size: 11px;
  }

  .chat {
    flex: 1;
    min-height: 0;
    margin-bottom: 0;
  }

  .buttons {
    max-height: 140px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 4px 0;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
  }

  .suggestions {
    gap: 4px;
  }

  .flow-buttons {
    gap: 6px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 14px;
  }

  .input-row {
    position: relative;
    padding: 8px 0 0 0;
    background: transparent;
    border-top: none;
    margin-top: auto;
    flex-shrink: 0;
  }

  input {
    padding: 10px 12px;
    font-size: 16px;
    -webkit-appearance: none;
  }

  input:focus {
    font-size: 16px;
  }

  .btn.send {
    padding: 10px 16px;
    white-space: nowrap;
  }

  html, body {
    height: 100%;
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .wrap {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
  }
}

/* MAP EMBED */
.map-embed {
  margin-top: 12px;
  border-radius: 8px;
  overflow: hidden;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 250px;
  border: none;
  border-radius: 8px;
}

/* LOADING INDICATOR */
#loading-indicator {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  padding: 12px 24px;
  border-radius: 25px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  border: 1px solid var(--border);
}

.loading-hidden {
  display: none !important;
}

.loading-bar {
  width: 50px;
  height: 4px;
  background: linear-gradient(90deg, var(--purple), var(--pink), var(--cyan), var(--purple));
  background-size: 300% 100%;
  animation: shimmer 1.5s infinite linear;
  border-radius: 2px;
}

@keyframes shimmer {
  0% { background-position: 300% 0; }
  100% { background-position: -300% 0; }
}

.loading-text {
  color: white;
  font-size: 14px;
}

/* TYPING INDICATOR */
.msg.typing {
  background: rgba(168,85,247,0.05);
  border-color: rgba(168,85,247,0.08);
  padding: 12px 16px;
  display: inline-block;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--purple);
  border-radius: 50%;
  animation: typingBounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) { animation-delay: -0.32s; }
.typing-dots span:nth-child(2) { animation-delay: -0.16s; }
.typing-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes heroGlow {
  0% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0.8; transform: translateX(-50%) scale(1.05); }
}
