@charset "UTF-8";
/* ──────────────────────────────────────────────
   uMatr — Main Stylesheet
   ------------------------------------------------
   Gentle, emotional, minimal — designed for warmth,
   kindness, and connection.
────────────────────────────────────────────── */

:root {
  --bg: #0a192f;
  --text: #e6f1ff;
  --accent: #64ffda;
  --muted: #9aa5c3;
  --card: rgba(255, 255, 255, 0.06);
  --card-highlight: rgba(100, 255, 218, 0.08);
  --shadow: rgba(0, 0, 0, 0.35);
  --font-sans: 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --transition: all 0.3s ease;
}

/* ────────────── Reset & Base ────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overscroll-behavior: none;
  background-color: #000814;
}

html {
  background: radial-gradient(circle at 50% 40%, #0a192f, #000814 90%);
  background-attachment: fixed;
}

/* ────────────── Body Layout ────────────── */
body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 40%, #0a192f, #000814 90%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* ← no longer centered, prevents cutoff */
  align-items: center;
  text-align: center;
  line-height: 1.6;
  padding: calc(env(safe-area-inset-top, 24px) + 40px) 20px 60px;
  overflow-x: hidden;
  position: relative;
  z-index: 0;
}

/* 🌸 Pulse Halo Glow */
html::before {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    circle,
    rgba(255, 200, 150, 0.25),
    rgba(255, 150, 200, 0.1),
    transparent 70%
  );
  border-radius: 50%;
  animation: pulseGlow 10s ease-in-out infinite;
  pointer-events: none;
  filter: blur(80px);
  z-index: -9999;
}

@keyframes pulseGlow {
  0%, 100% {
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.3);
  }
}

/* ✨ Message Example Placeholder Animation */
#messageText.fade-out {
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

#messageText.fade-in {
  opacity: 1;
  transition: opacity 0.4s ease;
}

/* ────────────── Card Containers ────────────── */
main.card,
main.token-view,
main.token-journey {
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 50px 36px;
  max-width: 650px;
  width: 100%;
  box-shadow: 0 12px 30px var(--shadow);
  transition: var(--transition);
  animation: fadeIn 0.6s ease-out;
  position: relative;
  z-index: 1;
}

main.card:hover {
  background: var(--card-highlight);
  transform: translateY(-3px);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ────────────── Typography ────────────── */
h1 {
  color: var(--accent);
  font-size: 2.3rem;
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  font-weight: 700;
}

h2, h3 {
  color: var(--text);
  margin-bottom: 10px;
}

p, p.subtitle {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

p.subtitle {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* ────────────── Buttons ────────────── */
.button, button {
  display: inline-block;
  background: var(--accent);
  color: var(--bg);
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 1.05rem;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition);
}

.button:hover, button:hover {
  background: #4fd1b9;
  transform: translateY(-2px);
}

/* ────────────── Token Journeys ────────────── */
.journeys {
  margin-top: 2rem;
  text-align: left;
}

.journeys h2 {
  color: var(--accent);
  font-size: 1.2rem;
  margin-bottom: 1rem;
  text-align: center;
}

ul.token-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.token-list li,
.token-row {
  background: #1d2538;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  transition: background 0.2s ease;
}

ul.token-list li:hover,
.token-row:hover {
  background: #252f47;
}

a.token-link {
  color: #9ab4ff;
  font-weight: 500;
  text-decoration: none;
}

a.token-link:hover {
  text-decoration: underline;
}

.type-label {
  display: inline-block;
  background: rgba(159, 255, 216, 0.15);
  color: #9fffd8;
  font-size: 0.8rem;
  border-radius: 6px;
  padding: 2px 6px;
  margin-left: 0.5rem;
}

.empty-state {
  text-align: center;
  color: #999;
  font-style: italic;
  margin-top: 1rem;
}

/* ────────────── Login & Profile ────────────── */
.login-section, .profile-section {
  margin-top: 2.5rem;
  background: #1a2235;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.login-section h3, .profile-section h3 {
  color: var(--accent);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.login-section p, .profile-section p {
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.login-section form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.login-section input[type="email"],
textarea,
input[type="text"],
input[type="email"],
.name-input,
.geo-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 14px;
  color: var(--text);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  transition: var(--transition);
  outline: none;
  resize: none;
}

/* 🚫 Prevent textarea from fading when steps fade */
#messageText {
  opacity: 1 !important;
  transition: none !important;
}

#messageText::placeholder {
  color: rgba(230, 241, 255, 0.45);
  font-style: italic;
}

textarea::placeholder,
input::placeholder {
  color: rgba(230, 241, 255, 0.6);
}

textarea:focus,
input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 12px rgba(100, 255, 218, 0.25);
}

/* Buttons reused for profile + login */
.login-section button,
.profile-section .logout-btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.login-section button:hover,
.profile-section .logout-btn:hover {
  background: #86eec6;
}

.google-login {
  display: inline-block;
  background: #fff;
  color: #333;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.google-login:hover {
  background: #f0f0f0;
}

.avatar {
  border-radius: 50%;
  width: 64px;
  height: 64px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

/* ────────────── Token Row Layout (fixed horizontal alignment) ────────────── */
.token-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #1d2538;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  transition: background 0.2s ease;
}

.token-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.token-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #a8b1d4;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-wrap: nowrap;
}

.token-right span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

@media (max-width: 360px) {
  .token-right {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
}

/* ────────────── Footer ────────────── */
footer {
  margin-top: 40px;
  font-size: 0.9rem;
  color: var(--muted);
  opacity: 0.9;
}

/* ────────────── Responsive ────────────── */
@media (max-width: 600px) {
  main.card { padding: 35px 22px; }
  h1 { font-size: 1.8rem; }
  textarea, input { font-size: 1rem; }
  .button { font-size: 1rem; }
}

/* 🔄 Redetect Location Link */
#retryGeo {
  display: inline-block;
  background: none;
  border: none;
  color: var(--accent, #8ef9d4);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0;
  margin-top: 6px;
  float: right;
  cursor: pointer;
  transition: color 0.25s ease, transform 0.15s ease;
}
#retryGeo:hover {
  color: #a8fff0;
  transform: translateY(-1px);
  text-decoration: underline;
}
#retryGeo:active {
  opacity: 0.7;
  transform: translateY(0);
}
#retryGeo:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#locationFields::after {
  content: "";
  display: block;
  clear: both;
}

/* 🌸 Inline Emoji Picker */
.emoji-table {
  display: block !important;
  margin-top: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px;
  border-radius: 8px;
  max-height: 160px;
  overflow-y: auto;
}
.emoji-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  padding-bottom: 5px;
}
.emoji-grid span { transition: transform 0.15s ease; }
.emoji-grid span:hover { transform: scale(1.2); }
.emoji-loading {
  text-align: center;
  color: #aaa;
  padding: 10px;
}

/* 💫 Modal Layout */
.message-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(6px);
  overflow-y: auto;
  padding: 2rem;
}
.modal-content {
  position: relative;
  background: #0a192f;
  color: #e6f1ff;
  border-radius: 16px;
  padding: 2.5rem;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 0 25px rgba(100,255,218,0.25);
}
.close-btn {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 1.5rem;
  cursor: pointer;
  color: #64ffda;
  transition: transform 0.2s;
}
.close-btn:hover { transform: scale(1.2); }

/* ──────────────────────────────────────────────
   🌍 Token Journey Page Styles
   (moved from token_journey.twig)
────────────────────────────────────────────── */

/* Layout & Body Fixes */
html, body.token-journey {
  height: auto !important;
}
body.token-journey {
  display: block !important;
  background: radial-gradient(circle at 50% 40%, #0a192f, #000814 90%);
  color: #e6f1ff;
  font-family: "Inter", system-ui, sans-serif;
  margin: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body.token-journey > main {
  display: block !important;
  flex: none !important;
  justify-content: flex-start !important;
  align-items: stretch !important;
  min-height: auto !important;
}
#journeyWrapper, .journey-intro, .journey-outro {
  position: relative !important;
  top: auto !important;
  margin-top: 0 !important;
  opacity: 1 !important;
  transform: none !important;
}

/* 🌸 Intro Section */
.journey-intro {
  text-align: center;
  padding: 5rem 1.5rem 3rem;
  background: linear-gradient(to bottom, rgba(10,25,47,0.95), rgba(10,25,47,0.85));
}
.intro-inner {
  max-width: 640px;
  margin: 0 auto;
}
.journey-intro h1 {
  font-size: 2.2rem;
  color: #64ffda;
  margin-bottom: 0.8rem;
}
.journey-intro p {
  font-size: 1rem;
  color: #cdeff5;
  line-height: 1.5;
  margin-bottom: 1.4rem;
}
.journey-stats {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}
.stat {
  text-align: center;
}
.stat .num {
  font-size: 1.8rem;
  font-weight: 600;
  color: #64ffda;
}
.stat .label {
  font-size: 0.85rem;
  color: #8892b0;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* 🧭 Journey Content */
#journeyWrapper {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 6rem;
}
/* 💬 Message Bubbles */
#journeyMessages {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.message-bubble {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0;
}

/* 🔧 Make this a stacking context */
.bubble-inner {
  position: relative; /* Required for absolute positioning inside */
  z-index: 1;          /* Ensure it's above reactions */
  text-align: center;
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 2rem 2.5rem;
  max-width: 600px;
  box-shadow: 0 0 25px rgba(100,255,218,0.1);
  backdrop-filter: blur(10px);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.bubble-inner:hover {
  transform: scale(1.02);
  box-shadow: 0 0 30px rgba(100,255,218,0.25);
}

.bubble-text {
  font-size: 1.25rem;
  color: #e6f1ff;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.bubble-location {
  color: #64ffda;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  opacity: 0.9;
}

.bubble-sender {
  color: #a8b2d1;
  font-style: italic;
  font-size: 0.9rem;
}

/* ✅ Reactions appear behind bubble content */
.message-reactions {
  position: absolute;
  bottom: 0.5rem;     /* shift up from bottom */
  right: 1rem;        /* shift in from right edge */
  width: auto;        /* only take as much space as needed */
  height: auto;
  z-index: 0;         /* still behind the bubble-inner (z-index: 1) */
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  pointer-events: none;
  opacity: 0.6;
}

/* 🔒 Prevent reaction children from overlapping */
.message-reactions > * {
  z-index: inherit !important;
}

/* 🌏 Outro */
.journey-outro {
  position: relative; /* 🔧 Create stacking context */
  z-index: 1;         /* 👆 Ensures it's above .message-reactions or .lottie-scroller */
  text-align: center;
  margin-top: 6rem;
  padding-top: 4rem;
  background: linear-gradient(to top, rgba(10,25,47,0.95), rgba(10,25,47,0));
}
.journey-outro h2 {
  font-size: 1.8rem;
  color: #64ffda;
  margin-bottom: 1rem;
}
.journey-outro p {
  max-width: 520px;
  margin: 0 auto 2rem;
  color: #e6f1ff;
  font-size: 1.1rem;
  line-height: 1.6;
}
.continue-btn {
  display: inline-block;
  background: linear-gradient(90deg, #64ffda, #00b4d8);
  color: #001219;
  padding: 12px 28px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.continue-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(100,255,218,0.3);
}


/* 📱 Responsive */
@media (max-width: 700px) {
  .journey-intro h1 {
    font-size: 1.8rem;
  }
  .bubble-inner {
    padding: 1.8rem;
  }
  .modal-content {
    padding: 1.8rem;
    width: 90%;
  }
}

.reaction-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.8rem;
  color: #a8b2d1;
}

.reaction-display .reaction-label {
  margin-top: 4px;
  font-size: 0.7rem;
  opacity: 0.8;
}