/* ==========================================================================
   Grouply Design System — Tokens & Global Styles (Apple Dark Glass Doctrine)
   True Black OLED #000000 | Unbounded + Inter | Neutral Translucent Glass (Zero Blue)
   ========================================================================== */

:root {
  /* Typography Tokens: Unbounded (Display/Numbers) & Inter (Body/UI) */
  --font-display: 'Unbounded', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Theme Color Variables — Pure Apple Pitch Black #000000 */
  --color-canvas: #000000;
  
  /* Apple Frosted Glass Surfaces (neutral translucent depth, zero blue) */
  --color-surface-card: rgba(255, 255, 255, 0.055);
  --color-surface-card-hover: rgba(255, 255, 255, 0.085);
  --color-surface-card-solid: #121214;
  --color-surface-inset: rgba(255, 255, 255, 0.04);
  --color-surface-inset-hover: rgba(255, 255, 255, 0.07);
  --color-surface-dock: rgba(20, 20, 24, 0.75);

  /* High Contrast Neutral Typography (Clean Apple White & Slate) */
  --color-text-primary: #ffffff;
  --color-text-secondary: rgba(255, 255, 255, 0.78);
  --color-text-muted: rgba(255, 255, 255, 0.50);
  --color-text-dim: rgba(255, 255, 255, 0.32);

  /* Primary Action Colors (Apple White Solid & tactile, zero blue) */
  --color-accent: #ffffff;
  --color-accent-hover: #e5e5ea;
  --color-accent-text: #000000;
  --color-link: #ffffff;

  /* Semantic State Colors (Subtle & Crisp) */
  --color-success: #34d399;
  --color-warning: #fbbf24;
  --color-danger: #f87171;

  /* Apple Glass Hairline Borders */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-highlight: rgba(255, 255, 255, 0.22);
  --border-focus: rgba(255, 255, 255, 0.4);
  
  /* Radius Tokens - Crisp, modern & sleek (No bloated bubble look) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Elevation & Apple Glass Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --shadow-dock: 0 16px 44px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.18);

  /* Touch & Safe Areas */
  --min-touch-target: 44px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

/* Box sizing reset & smooth tap behavior */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  background-color: #000000;
}

body {
  font-family: var(--font-body);
  background-color: #000000;
  color: var(--color-text-primary);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  padding-top: var(--safe-top);
  user-select: none;
}

::selection {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  letter-spacing: -0.4px;
  color: var(--color-text-primary);
}

#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  min-height: 100vh;
  background-color: transparent;
}

/* --------------------------------------------------------------------------
   Ambient Living Aurora Mesh (GPU Accelerated, 60fps)
   -------------------------------------------------------------------------- */
.ambient-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  contain: strict;
  opacity: 0.55;
}

.ambient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(65px);
  -webkit-filter: blur(65px);
  will-change: transform;
}

.orb-1 {
  width: 320px;
  height: 320px;
  top: -60px;
  right: -40px;
  background: radial-gradient(circle, rgba(239, 68, 68, 0.28) 0%, rgba(249, 115, 22, 0.14) 45%, transparent 70%);
  animation: floatOrb1 18s ease-in-out infinite alternate;
}

.orb-2 {
  width: 380px;
  height: 380px;
  top: 35%;
  left: -90px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.20) 0%, rgba(217, 119, 6, 0.08) 50%, transparent 75%);
  animation: floatOrb2 22s ease-in-out infinite alternate;
}

.orb-3 {
  width: 340px;
  height: 340px;
  bottom: 8%;
  right: -50px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.16) 0%, rgba(99, 102, 241, 0.06) 50%, transparent 75%);
  animation: floatOrb3 20s ease-in-out infinite alternate;
}

@keyframes floatOrb1 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-35px, 45px, 0) scale(1.12); }
  100% { transform: translate3d(25px, 70px, 0) scale(0.95); }
}

@keyframes floatOrb2 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(50px, -40px, 0) scale(1.08); }
  100% { transform: translate3d(20px, 50px, 0) scale(0.92); }
}

@keyframes floatOrb3 {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-40px, -50px, 0) scale(1.15); }
  100% { transform: translate3d(30px, -20px, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .ambient-orb {
    animation: none !important;
  }
}

.main-content {
  flex: 1;
  padding: 16px 16px 105px 16px; /* 105px bottom offset for floating dock */
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Skeleton Loading Shimmer */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}
