/* ==========================================================================
   TTG Mini App — Velvet Obsidian Minimalist Theme + Floating Capsule Dock
   ========================================================================== */

:root {
  --bg-obsidian: #0b0910;
  --bg-surface: #14121d;
  --bg-surface-elevated: #1b1827;
  --bg-input: #0f0d16;
  --border-hairline: rgba(255, 255, 255, 0.06);
  --border-accent: rgba(168, 85, 247, 0.42);
  --accent-violet: #8b5cf6;
  --accent-lavender: #c4b5fd;
  --text-primary: #f4f3f8;
  --text-muted: #858099;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--bg-obsidian);
  background-image: radial-gradient(560px 240px at 50% -70px, rgba(139, 92, 246, 0.09), transparent 72%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

/* Matte Obsidian Cards */
.glass-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: 18px;
}

.glass-card-interactive {
  transition: transform 0.14s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.glass-card-interactive:active {
  transform: scale(0.985);
  border-color: rgba(168, 85, 247, 0.32);
  background: var(--bg-surface-elevated);
}

/* Minimalist Velvet Primary Action Button */
.btn-primary-gradient {
  background: linear-gradient(180deg, #251a40 0%, #1c1431 100%);
  border: 1px solid rgba(168, 85, 247, 0.44);
  color: #f3e8ff;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.14);
  transition: transform 0.12s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.btn-primary-gradient:hover {
  border-color: rgba(192, 132, 252, 0.6);
}

.btn-primary-gradient:active {
  transform: scale(0.98);
  opacity: 0.92;
}

.btn-primary-gradient:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: not-allowed;
}

/* Secondary Subtle Pill Button (Pause / Neutral Action) */
.btn-subtle-pill {
  background: #1d1a2a;
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f4f3f8;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.btn-subtle-pill:active {
  transform: scale(0.97);
  background: #252136;
}

/* Segmented Filter Bar (Velvet Obsidian style) */
.seg-container {
  background: #12101b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 4px;
}

.seg-btn {
  border: 1px solid transparent;
  color: #858099;
  border-radius: 11px;
  transition: all 0.16s ease;
}

.seg-btn.active {
  background: #1e1633;
  border-color: rgba(168, 85, 247, 0.42);
  color: #d8b4fe;
  font-weight: 600;
}

/* Dark Minimalist Inputs */
.input-dark {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #f8f7fc;
  border-radius: 13px;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-dark::placeholder {
  color: rgba(133, 128, 153, 0.65);
}

.input-dark:focus {
  border-color: rgba(168, 85, 247, 0.48);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

/* Floating Capsule Bottom Navigation Bar */
.floating-nav-wrap {
  padding-bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
}

.floating-nav-capsule {
  background: rgba(18, 15, 28, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(139, 92, 246, 0.05);
  border-radius: 22px;
}

.nav-tab-btn {
  color: #6f6a85;
  border-radius: 16px;
  border: 1px solid transparent;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, transform 0.12s ease;
}

.nav-tab-btn:active {
  transform: scale(0.95);
}

.nav-tab-btn.active {
  color: #c4b5fd;
  background: #211638;
  border-color: rgba(168, 85, 247, 0.28);
}

.main-content-safe {
  padding-bottom: calc(6.5rem + env(safe-area-inset-bottom, 0px));
}

/* SVG Line Icons */
.icon-svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.icon-svg-sm {
  width: 15px;
  height: 15px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

.icon-svg-lg {
  width: 20px;
  height: 20px;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  flex-shrink: 0;
}

/* Minimal Progress Bar */
.progress-bar-fill {
  background: #8b5cf6;
  transition: width 0.35s ease;
}

/* Bottom Sheet Modals */
.modal-backdrop {
  background: rgba(5, 4, 9, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-sheet {
  background: #13111c;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  animation: sheetSlideUp 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-handle {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  margin: 0 auto 6px auto;
}

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

/* QR Code Container */
#qr-canvas-box canvas,
#qr-canvas-box img {
  margin: 0 auto;
  border-radius: 14px;
  padding: 10px;
  background: #ffffff;
}

/* Tabular Counters */
.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* Hide scrollbars cleanly */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Drag to scroll container for desktop mouse navigation */
.drag-scrollable {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  scroll-behavior: auto;
  touch-action: pan-x;
}
.drag-scrollable.is-dragging {
  cursor: grabbing !important;
}


