/* LUMEO — Global Design System (TASK 6) */
/* Brand: Premium emotional connection platform */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  --lumeo-void:       #08080f;
  --lumeo-deep:       #0d0d1a;
  --lumeo-surface:    #13131f;
  --lumeo-card:       #1a1a2e;
  --lumeo-elevated:   #212136;
  --lumeo-border:     rgba(255,255,255,0.07);
  --lumeo-border-hi:  rgba(255,255,255,0.14);

  --lumeo-violet:     #7c3aed;
  --lumeo-violet-lo:  #4527a0;
  --lumeo-violet-hi:  #a78bfa;
  --lumeo-violet-glow:rgba(124,58,237,0.35);

  --lumeo-rose:       #e11d7a;
  --lumeo-rose-lo:    #9b1159;
  --lumeo-rose-hi:    #f472b6;
  --lumeo-rose-glow:  rgba(225,29,122,0.35);

  --lumeo-gold:       #d4a054;
  --lumeo-gold-hi:    #f0c07a;

  --lumeo-text:       #f0f0f8;
  --lumeo-text-2:     #a0a0c0;
  --lumeo-text-3:     #606080;
  --lumeo-text-4:     #404060;

  --lumeo-success:    #22c55e;
  --lumeo-warning:    #f59e0b;
  --lumeo-error:      #ef4444;

  --grad-primary:  linear-gradient(135deg, #7c3aed 0%, #e11d7a 100%);
  --grad-surface:  linear-gradient(180deg, #1a1a2e 0%, #13131f 100%);
  --grad-hero:     radial-gradient(ellipse at 30% 30%, rgba(124,58,237,0.15) 0%, transparent 50%),
                   radial-gradient(ellipse at 70% 70%, rgba(225,29,122,0.12) 0%, transparent 50%),
                   linear-gradient(180deg, #0d0d1a 0%, #08080f 100%);

  --font-sans:  'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;

  --s1: 4px;  --s2: 8px;   --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 40px;  --s8: 48px; --s9: 64px; --s10: 80px;

  --r-sm:   8px;  --r-md: 12px; --r-lg: 20px; --r-xl: 28px; --r-full: 9999px;

  --shadow-sm:     0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:     0 8px 32px rgba(0,0,0,0.6);
  --shadow-glow-v: 0 0 24px rgba(124,58,237,0.4), 0 0 8px rgba(124,58,237,0.2);
  --shadow-glow-r: 0 0 24px rgba(225,29,122,0.4), 0 0 8px rgba(225,29,122,0.2);

  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:    cubic-bezier(0, 0, 0.2, 1);

  --dur-fast:  120ms;  --dur-base: 240ms;  --dur-slow: 400ms;  --dur-xslow: 600ms;
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--lumeo-void);
  color: var(--lumeo-text);
  line-height: 1.6;
  min-height: 100dvh;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ─────────────────────────────────────────────── */
.text-display-1 { font-size: clamp(2.5rem, 6vw, 5rem);    font-weight: 800; letter-spacing: -0.04em; line-height: 1.05; }
.text-display-2 { font-size: clamp(2rem, 4.5vw, 3.5rem);  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.text-h1        { font-size: clamp(1.5rem, 3vw, 2.25rem);  font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.text-h2        { font-size: clamp(1.25rem, 2.5vw, 1.75rem); font-weight: 600; letter-spacing: -0.015em; }
.text-h3        { font-size: clamp(1.1rem, 2vw, 1.4rem);   font-weight: 600; }
.text-body-lg   { font-size: 1.0625rem; line-height: 1.7; }
.text-body      { font-size: 0.9375rem; line-height: 1.65; }
.text-body-sm   { font-size: 0.8125rem; line-height: 1.55; }
.text-caption   { font-size: 0.75rem;   letter-spacing: 0.04em; }
.text-label     { font-size: 0.6875rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }

.font-serif   { font-family: var(--font-serif); }
.text-gradient { background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-muted   { color: var(--lumeo-text-2); }
.text-faint   { color: var(--lumeo-text-3); }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--s5);
}
@media (min-width: 768px)  { .container { padding: 0 var(--s6); } }
@media (min-width: 1280px) { .container { padding: 0 var(--s9); } }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: var(--lumeo-card);
  border: 1px solid var(--lumeo-border);
  border-radius: var(--r-lg);
  padding: var(--s5);
  transition: border-color var(--dur-base) var(--ease-smooth),
              box-shadow    var(--dur-base) var(--ease-smooth),
              transform     var(--dur-base) var(--ease-spring);
}
.card:hover { border-color: var(--lumeo-border-hi); box-shadow: var(--shadow-md); }
.card--glow-v:hover { box-shadow: var(--shadow-glow-v); }
.card--glow-r:hover { box-shadow: var(--shadow-glow-r); }
.card--glass {
  background: rgba(26,26,46,0.6);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  padding: var(--s3) var(--s5); border-radius: var(--r-full);
  font-family: var(--font-sans); font-size: 0.9375rem; font-weight: 600;
  border: none; cursor: pointer; transition: all var(--dur-base) var(--ease-spring);
  white-space: nowrap; text-decoration: none; position: relative; overflow: hidden;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn::after { content:''; position:absolute; inset:0; background:rgba(255,255,255,0.1); opacity:0; transition:opacity var(--dur-fast); }
.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-primary); color: #fff;
  box-shadow: 0 4px 20px rgba(124,58,237,0.4);
}
.btn-primary:hover { box-shadow: 0 6px 28px rgba(124,58,237,0.55), 0 2px 8px rgba(225,29,122,0.3); transform: translateY(-1px); }

.btn-secondary { background: transparent; color: var(--lumeo-text); border: 1px solid var(--lumeo-border-hi); }
.btn-secondary:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.2); }

.btn-ghost { background: transparent; color: var(--lumeo-text-2); border: none; }
.btn-ghost:hover { color: var(--lumeo-text); background: rgba(255,255,255,0.05); }

.btn-icon {
  width: 40px; height: 40px; padding: 0; border-radius: var(--r-md);
  background: var(--lumeo-elevated); border: 1px solid var(--lumeo-border);
}
.btn-icon:hover { background: var(--lumeo-card); border-color: var(--lumeo-border-hi); }

.btn-sm { padding: var(--s1) var(--s4); font-size: 0.8125rem; }
.btn-lg { padding: var(--s4) var(--s8); font-size: 1.0625rem; }

/* ── Inputs ──────────────────────────────────────────────────── */
.input {
  width: 100%; background: var(--lumeo-surface); border: 1.5px solid var(--lumeo-border);
  border-radius: var(--r-md); color: var(--lumeo-text); font-family: var(--font-sans);
  font-size: 0.9375rem; padding: var(--s3) var(--s4);
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
  outline: none; -webkit-appearance: none;
}
.input::placeholder { color: var(--lumeo-text-3); }
.input:focus { border-color: var(--lumeo-violet); box-shadow: 0 0 0 3px rgba(124,58,237,0.15); }
.input:hover:not(:focus) { border-color: var(--lumeo-border-hi); }

/* ── Navigation ──────────────────────────────────────────────── */
.nav-bottom {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(13,13,26,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-top: 1px solid var(--lumeo-border);
  padding: var(--s2) var(--s4);
  padding-bottom: calc(var(--s2) + env(safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: var(--s2) var(--s1); border-radius: var(--r-md); cursor: pointer;
  transition: all var(--dur-base) var(--ease-spring);
  color: var(--lumeo-text-3); font-size: 0.625rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  border: none; background: none; -webkit-tap-highlight-color: transparent;
}
.nav-item svg { transition: transform var(--dur-base) var(--ease-spring); }
.nav-item.active { color: var(--lumeo-violet-hi); }
.nav-item.active svg { transform: scale(1.12); filter: drop-shadow(0 0 6px var(--lumeo-violet)); }
.nav-item:hover:not(.active) { color: var(--lumeo-text-2); background: rgba(255,255,255,0.04); }

.nav-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: 240px; z-index: 100;
  background: rgba(13,13,26,0.96); backdrop-filter: blur(20px);
  border-right: 1px solid var(--lumeo-border);
  flex-direction: column; padding: var(--s6) var(--s4);
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes fadeUp   { from { opacity:0; transform:translateY(16px); }  to { opacity:1; transform:translateY(0); } }
@keyframes fadeIn   { from { opacity:0; }  to { opacity:1; } }
@keyframes scaleIn  { from { opacity:0; transform:scale(0.92); }  to { opacity:1; transform:scale(1); } }
@keyframes slideRight { from { opacity:0; transform:translateX(-20px); } to { opacity:1; transform:translateX(0); } }
@keyframes slideUp  { from { opacity:0; transform:translateY(100%); }  to { opacity:1; transform:translateY(0); } }
@keyframes pulse-glow {
  0%,100% { box-shadow: 0 0 10px rgba(124,58,237,0.3); }
  50%      { box-shadow: 0 0 24px rgba(124,58,237,0.7), 0 0 48px rgba(124,58,237,0.3); }
}
@keyframes float { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-8px); } }
@keyframes shimmer { from { background-position:-200% center; } to { background-position:200% center; } }
@keyframes spin  { from { transform:rotate(0deg); }   to { transform:rotate(360deg); } }
@keyframes ping  { 0% { transform:scale(1); opacity:1; } 75%,100% { transform:scale(2); opacity:0; } }

.animate-fadeUp     { animation: fadeUp    var(--dur-slow)  var(--ease-out)    both; }
.animate-fadeIn     { animation: fadeIn    var(--dur-slow)  var(--ease-out)    both; }
.animate-scaleIn    { animation: scaleIn   var(--dur-slow)  var(--ease-spring) both; }
.animate-slideRight { animation: slideRight var(--dur-slow) var(--ease-out)    both; }
.animate-slideUp    { animation: slideUp   var(--dur-slow)  var(--ease-out)    both; }
.animate-float      { animation: float     3s ease-in-out infinite; }
.animate-pulse-glow { animation: pulse-glow 2.5s ease-in-out infinite; }
.animate-spin       { animation: spin      1s linear infinite; }
.animate-ping       { animation: ping      1.5s cubic-bezier(0,0,0.2,1) infinite; }

.delay-100 { animation-delay:100ms; } .delay-200 { animation-delay:200ms; }
.delay-300 { animation-delay:300ms; } .delay-400 { animation-delay:400ms; }
.delay-500 { animation-delay:500ms; }

/* ── Skeleton ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--lumeo-elevated) 25%, rgba(255,255,255,0.05) 50%, var(--lumeo-elevated) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.8s infinite;
  border-radius: var(--r-sm);
}

/* ── Scrollbar ───────────────────────────────────────────────── */
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(255,255,255,0.1); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:rgba(255,255,255,0.2); }

/* ── Presence ────────────────────────────────────────────────── */
.presence-dot {
  width:10px; height:10px; border-radius:50%; position:relative;
}
.presence-dot::after {
  content:''; position:absolute; inset:-2px; border-radius:50%;
  border:2px solid var(--lumeo-deep);
}
.presence-online  { background: var(--lumeo-success); }
.presence-away    { background: var(--lumeo-warning); }
.presence-offline { background: var(--lumeo-text-4); }
.presence-online::before {
  content:''; position:absolute; inset:0; border-radius:50%;
  background: var(--lumeo-success); animation: ping 2s infinite;
}

/* ── Toast / Modal / Banner ──────────────────────────────────── */
.toast {
  position:fixed; top:var(--s5); right:var(--s4); z-index:9999;
  background:var(--lumeo-elevated); border:1px solid var(--lumeo-border-hi);
  border-radius:var(--r-lg); padding:var(--s4) var(--s5);
  box-shadow:var(--shadow-lg); max-width:360px;
  animation: slideRight var(--dur-base) var(--ease-spring);
}
.update-banner {
  position:fixed; bottom:80px; left:var(--s4); right:var(--s4); z-index:9998;
  background:var(--lumeo-card); border:1px solid var(--lumeo-violet);
  border-radius:var(--r-xl); padding:var(--s4) var(--s5);
  box-shadow:var(--shadow-glow-v); animation:slideUp var(--dur-slow) var(--ease-spring);
}
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.75);
  backdrop-filter:blur(4px); z-index:500;
  display:flex; align-items:center; justify-content:center;
  padding:var(--s4); animation:fadeIn var(--dur-base) both;
}
.modal {
  width:100%; max-width:480px; background:var(--lumeo-card);
  border:1px solid var(--lumeo-border-hi); border-radius:var(--r-xl);
  padding:var(--s7) var(--s6); box-shadow:var(--shadow-lg);
  animation:scaleIn var(--dur-slow) var(--ease-spring) both;
}

/* ── Badge ───────────────────────────────────────────────────── */
.badge {
  display:inline-flex; align-items:center; gap:var(--s1);
  padding:2px var(--s2); border-radius:var(--r-full);
  font-size:0.6875rem; font-weight:600; letter-spacing:0.04em;
}
.badge-violet  { background:rgba(124,58,237,0.2); color:var(--lumeo-violet-hi); border:1px solid rgba(124,58,237,0.3); }
.badge-rose    { background:rgba(225,29,122,0.2); color:var(--lumeo-rose-hi);   border:1px solid rgba(225,29,122,0.3); }
.badge-success { background:rgba(34,197,94,0.2);  color:#86efac; border:1px solid rgba(34,197,94,0.3); }
.badge-gold    { background:rgba(212,160,84,0.2); color:var(--lumeo-gold-hi);   border:1px solid rgba(212,160,84,0.3); }

/* ── Progress ────────────────────────────────────────────────── */
.progress-track { width:100%; height:6px; background:var(--lumeo-elevated); border-radius:var(--r-full); overflow:hidden; }
.progress-fill {
  height:100%; border-radius:var(--r-full); background:var(--grad-primary);
  transition:width var(--dur-slow) var(--ease-out); position:relative;
}
.progress-fill::after {
  content:''; position:absolute; right:0; top:-2px;
  width:10px; height:10px; border-radius:50%;
  background:#fff; box-shadow:0 0 8px rgba(124,58,237,0.8);
}

/* ── Page / Layout ───────────────────────────────────────────── */
.page {
  min-height:100dvh; min-height:100vh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
  background: var(--grad-hero);
  animation: fadeIn var(--dur-slow) var(--ease-out);
}

/* Desktop sidebar */
@media (min-width: 1024px) {
  .page         { padding-left:240px; padding-bottom:0; }
  .nav-bottom   { display:none; }
  .nav-sidebar  { display:flex; }
}
@media (max-width: 1023px) {
  .nav-sidebar  { display:none; }
}

/* ── Dividers / Helpers ──────────────────────────────────────── */
.divider { height:1px; background:var(--lumeo-border); border:none; margin:var(--s4) 0; }
.divider-text {
  display:flex; align-items:center; gap:var(--s4);
  color:var(--lumeo-text-3); font-size:0.75rem;
}
.divider-text::before, .divider-text::after {
  content:''; flex:1; height:1px; background:var(--lumeo-border);
}

/* ── Avatar ──────────────────────────────────────────────────── */
.avatar-frame { border-radius:50%; overflow:hidden; flex-shrink:0; position:relative; }
.avatar-frame--glow-v { box-shadow:var(--shadow-glow-v); }
.avatar-frame--glow-r { box-shadow:var(--shadow-glow-r); }

/* ── Chat Bubbles ────────────────────────────────────────────── */
.bubble {
  max-width:72%; padding:var(--s3) var(--s4); border-radius:var(--r-lg);
  font-size:0.9375rem; line-height:1.55; word-break:break-word; position:relative;
}
.bubble--self {
  background: linear-gradient(135deg, var(--lumeo-violet-lo), var(--lumeo-violet));
  color:#fff; align-self:flex-end; border-bottom-right-radius:var(--r-sm);
}
.bubble--other {
  background:var(--lumeo-elevated); color:var(--lumeo-text);
  align-self:flex-start; border-bottom-left-radius:var(--r-sm);
}
.bubble-time { font-size:0.6875rem; color:rgba(255,255,255,0.45); margin-top:3px; text-align:right; }

/* ── Level Badge ─────────────────────────────────────────────── */
.level-badge {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:50%; background:var(--grad-primary);
  font-size:0.6875rem; font-weight:800; color:#fff;
  box-shadow:0 0 12px rgba(124,58,237,0.5);
}

/* ── Map Canvas ──────────────────────────────────────────────── */
#lumeo-map-canvas { display:block; width:100%; height:100%; touch-action:none; }

/* ── Section / Utility ───────────────────────────────────────── */
.section-header { padding:var(--s5) var(--s4) var(--s3); display:flex; align-items:center; justify-content:space-between; gap:var(--s4); }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.no-select { user-select:none; -webkit-user-select:none; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.flex-center { display:flex; align-items:center; justify-content:center; }
.absolute-center { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); }
.pointer { cursor:pointer; }
.relative { position:relative; }
.overflow-hidden { overflow:hidden; }
.w-full { width:100%; }
.h-full { height:100%; }

/* ── Desktop-specific ────────────────────────────────────────── */
@media (min-width: 1024px) {
  .card   { padding: var(--s6); }
  .modal  { max-width: 560px; }
  .toast  { top:var(--s6); right:var(--s6); }
  .update-banner { bottom:var(--s5); }
}
