:root {
  --bg: #07090c;
  --panel: #0e1117;
  --border: rgba(255,255,255,0.1);
  --text: #f3f4f6;
  --muted: #9ca3af;
  --accent: #39e75f; /* Linktree green */
  --accent-soft: rgba(57,231,95,0.15);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  height: 100%;
  background: radial-gradient(circle at top left, rgba(57,231,95,0.08), transparent 45%),
              radial-gradient(circle at bottom right, rgba(57,231,95,0.05), transparent 50%),
              var(--bg);
  font-family: 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: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.brand-text .title {
  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;
}

.msg {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  line-height: 1.3;
}

.msg.bot {
  background: rgba(255,255,255,0.04);
  align-self: flex-start;
}

.msg.user {
  background: var(--accent-soft);
  border-color: rgba(57,231,95,0.4);
  align-self: flex-end;
}

/* 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-wrap: wrap;
  gap: 8px;
}

.btn {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  border-color: rgba(57,231,95,0.5);
  background: var(--accent-soft);
}

.btn.primary {
  background: var(--accent-soft);
  border-color: rgba(57,231,95,0.6);
}

.btn.send {
  border-radius: 14px;
}

/* INPUT */
.input-row {
  display: flex;
  gap: 8px;
}

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;
}

input:focus {
  border-color: rgba(57,231,95,0.6);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* MOBILE */
@media (max-width: 600px) {
  .msg {
    max-width: 92%;
  }
}
.btn.primary {
  border-color: rgba(57,231,95,0.7);
  background: rgba(57,231,95,0.15);
}

/* 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, #ff6b6b, #feca57, #ff9ff3, #ff6b6b);
  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 (in chat) */
.msg.typing {
  background: rgba(255,255,255,0.1);
  padding: 12px 16px;
  display: inline-block;
}

.typing-dots {
  display: flex;
  gap: 4px;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--accent);
  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; }
}