/* ============================================================
   UBAAX — Dark super-app design tokens
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,400;14..32,500;14..32,600;14..32,700;14..32,800&display=swap');

:root {
  /* Surfaces */
  --bg:        #0A0A0F;
  --surface:   #15151D;
  --elevated:  #1E1E29;
  --elevated-2:#26263420;
  --border:    #2A2A38;
  --border-soft: #20202C;

  /* Text */
  --text:      #F5F5FA;
  --text-2:    #9A9AB0;
  --text-3:    #6A6A80;

  /* Accent */
  /* Accent — blue → green (dominant duo) */
  --violet:    #2E9BFF;  /* primary accent = blue */
  --blue:      #2BD67B;  /* secondary accent = green */
  --accent-grad: linear-gradient(120deg, #2E9BFF 0%, #2BD67B 100%);
  --accent-grad-soft: linear-gradient(120deg, rgba(46,155,255,0.18) 0%, rgba(43,214,123,0.18) 100%);
  --glow:      0 0 24px rgba(46,155,255,0.45);

  /* Colored-icon palette (cool, blue–green majority + warm pops) */
  --c-blue:    #2E9BFF;
  --c-sky:     #38BDF8;
  --c-cyan:    #1FC8DE;
  --c-teal:    #14C7A8;
  --c-green:   #2BD67B;
  --c-emerald: #34D399;
  --c-indigo:  #5B7CFA;
  --c-amber:   #FBBF24;
  --c-coral:   #FB7185;
  --c-pink:    #F472B6;

  /* Glass surfaces (floating nav, frosted headers) */
  --glass-bg:        rgba(21,21,29,0.72);
  --glass-bg-strong: rgba(18,18,26,0.86);
  --glass-border:    rgba(255,255,255,0.07);
  --glass-shadow:    0 8px 32px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
  --nav-active-ink:  #FFFFFF;

  /* Map palette */
  --map-bg: #0C0C14; --map-block: #13131C; --map-road: #1C1C28;
  --map-park: #10241A; --map-river: #13283A;
  --map-roof: #1B1B2A; --map-label: #3C3C4E; --map-tree: #1A3A28;

  /* Semantic */
  --success:   #34D399;
  --warning:   #FBBF24;
  --danger:    #F87171;

  /* Radius */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.45);
  --shadow-3: 0 16px 40px rgba(0,0,0,0.55);
  --shadow-4: 0 24px 60px rgba(0,0,0,0.62);
  --shadow-glass: 0 8px 32px rgba(0,0,0,0.5);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ============================================================
   DAY (LIGHT) THEME — scoped to the app wrapper
   ============================================================ */
.ubaax-app[data-theme="light"] {
  --bg:        #F1F2F8;
  --surface:   #FFFFFF;
  --elevated:  #ECEEF6;
  --border:    #E2E4EF;
  --border-soft: #ECEDF4;

  --text:      #16161F;
  --text-2:    #585870;
  --text-3:    #9494A8;

  --accent-grad-soft: linear-gradient(120deg, rgba(46,155,255,0.13) 0%, rgba(43,214,123,0.13) 100%);
  --glow:      0 0 24px rgba(46,155,255,0.28);

  --shadow-1: 0 1px 2px rgba(20,40,60,0.06);
  --shadow-2: 0 10px 30px rgba(30,90,140,0.13);
  --shadow-3: 0 16px 40px rgba(30,90,140,0.20);
  --shadow-4: 0 24px 60px rgba(30,90,140,0.26);
  --shadow-glass: 0 10px 32px rgba(30,90,140,0.15);

  --glass-bg:        rgba(255,255,255,0.74);
  --glass-bg-strong: rgba(255,255,255,0.88);
  --glass-border:    rgba(20,40,60,0.06);
  --glass-shadow:    0 10px 32px rgba(30,90,140,0.15), inset 0 1px 0 rgba(255,255,255,0.8);
  --nav-active-ink:  #1E8AF0;

  /* foreground accent palette — darkened so icons & text stay legible on
     white surfaces (the bright dark-mode hues wash out at ~1.5:1 otherwise) */
  --violet:    #1A6FD0;
  --blue:      #0B9150;
  --c-blue:    #1A6FD0;
  --c-sky:     #0E7AB8;
  --c-cyan:    #0E8FA3;
  --c-teal:    #0C8A75;
  --c-green:   #0B9150;
  --c-emerald: #0B9150;
  --c-indigo:  #4F46E5;
  --c-amber:   #B9770A;
  --c-coral:   #E23744;
  --c-pink:    #CE3A95;
  --success:   #0B9150;
  --warning:   #B9770A;

  --map-bg: #E6EAF3; --map-block: #DCE1ED; --map-road: #FFFFFF;
  --map-park: #D3E8D4; --map-river: #C6DCEE;
  --map-roof: #EFF2F9; --map-label: #A8AFC2; --map-tree: #B6D9B8;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* buttons must inherit text colour — UA gives them a black `buttontext`
   default that does NOT inherit, breaking any text span that relies on it */
.ubaax-app button { color: inherit; }

.ubaax-app, .ubaax-app * {
  font-family: 'Inter', -apple-system, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ubaax-app {
  position: absolute;
  inset: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

/* The scrollable screen viewport — sits under the status bar, above tab bar */
.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  isolation: isolate;
}
.screen::-webkit-scrollbar { display: none; }

/* Hide scrollbars on any horizontal rail */
.no-scrollbar { scrollbar-width: none; -ms-overflow-style: none; }
.no-scrollbar::-webkit-scrollbar { display: none; }

/* Typography helpers */
.h-display { font-size: 30px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.h-1 { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.h-2 { font-size: 19px; font-weight: 700; letter-spacing: -0.015em; }
.h-3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.body { font-size: 15px; font-weight: 400; line-height: 1.5; color: var(--text); }
.body-2 { font-size: 14px; font-weight: 400; color: var(--text-2); }
.caption { font-size: 12px; font-weight: 500; color: var(--text-2); }
.overline { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); }

.grad-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit;
  font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
  border-radius: var(--r-md); padding: 0 18px; height: 48px;
  color: var(--text); transition: transform 0.15s var(--ease), filter 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent-grad); color: #fff; box-shadow: 0 6px 20px rgba(124,92,255,0.4); }
.btn-primary:active { filter: brightness(0.95); }
.btn-ghost { background: var(--elevated); color: var(--text); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-block { width: 100%; }

/* Chips */
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  height: 36px; padding: 0 14px; border-radius: var(--r-pill);
  background: var(--elevated); color: var(--text-2);
  font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; transition: all 0.2s var(--ease);
}
.chip.active { background: var(--accent-grad-soft); color: var(--text); border-color: rgba(124,92,255,0.4); }

/* Card */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); overflow: hidden;
}

/* avatar */
.avatar {
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; flex-shrink: 0; overflow: hidden;
}

/* skeleton shimmer */
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.skeleton {
  background: linear-gradient(90deg, #1A1A24 25%, #24243200 37%, #1A1A24 63%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
}

/* entrance — opacity stays 1 (transform-only) so content is NEVER invisible,
   even if a sandboxed compositor freezes the animation at time 0 */
@keyframes fadeUp { from { transform: translateY(14px); } to { transform: none; } }
.fade-up { animation: fadeUp 0.45s var(--ease); }
@media (prefers-reduced-motion: reduce) { .fade-up { animation: none; } }

/* profile overlay slide-in (transform-only) */
@keyframes profileIn { from { transform: translateY(30px); } to { transform: none; } }
.profile-in { animation: profileIn 0.4s var(--ease); }
@media (prefers-reduced-motion: reduce) { .profile-in { animation: none; } }
