:root {
  --background: 252 34% 98%;
  --foreground: 252 18% 9%;
  --primary: 270 92% 60%;
  --primary-foreground: 0 0% 100%;
  --secondary: 188 88% 44%;
  --secondary-foreground: 250 30% 6%;
  --muted: 252 13% 88%;
  --muted-foreground: 252 9% 38%;
  --destructive: 354 86% 58%;
  --destructive-foreground: 0 0% 100%;
  --border: 252 15% 82%;
  --card: 0 0% 100%;
  --card-foreground: 252 18% 9%;
  --shadow-sm: 0 6px 18px hsl(252 40% 10% / 0.08);
  --shadow-md: 0 16px 46px hsl(252 40% 10% / 0.12);
  --shadow-lg: 0 28px 80px hsl(252 40% 10% / 0.18);
  --transition-fast: 150ms ease;
  --transition-smooth: 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
  --radius-sm: 0.75rem;
  --radius-md: 1.1rem;
  --radius-lg: 1.6rem;
}

.dark {
  --background: 252 34% 5%;
  --foreground: 248 28% 96%;
  --primary: 275 96% 68%;
  --primary-foreground: 252 34% 5%;
  --secondary: 184 95% 52%;
  --secondary-foreground: 252 34% 5%;
  --muted: 252 18% 15%;
  --muted-foreground: 250 12% 68%;
  --destructive: 354 88% 64%;
  --destructive-foreground: 0 0% 100%;
  --border: 252 18% 18%;
  --card: 252 28% 8%;
  --card-foreground: 248 28% 96%;
  --shadow-sm: 0 8px 22px hsl(0 0% 0% / 0.22);
  --shadow-md: 0 20px 54px hsl(0 0% 0% / 0.34);
  --shadow-lg: 0 34px 96px hsl(0 0% 0% / 0.48);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: hsl(var(--background));
}

body {
  min-height: 100vh;
  margin: 0;
  color: hsl(var(--foreground));
  background:
    radial-gradient(circle at 12% 8%, hsl(var(--primary) / 0.22), transparent 30rem),
    radial-gradient(circle at 88% 4%, hsl(var(--secondary) / 0.16), transparent 24rem),
    linear-gradient(180deg, hsl(252 38% 7%), hsl(var(--background)) 42%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, a {
  -webkit-tap-highlight-color: transparent;
}

::selection {
  background: hsl(var(--primary) / 0.35);
}

.trovex-shell {
  width: 100%;
  min-height: 100vh;
}

.glass-card {
  background: linear-gradient(180deg, hsl(var(--card) / 0.88), hsl(var(--card) / 0.68));
  border: 1px solid hsl(var(--border) / 0.88);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(20px);
}

.profile-orb {
  background:
    radial-gradient(circle at 28% 24%, hsl(0 0% 100% / 0.85), transparent 0.45rem),
    conic-gradient(from 210deg, hsl(var(--primary)), hsl(var(--secondary)), hsl(316 92% 64%), hsl(var(--primary)));
}

.record-pulse::before {
  content: "";
  position: absolute;
  inset: -0.85rem;
  border-radius: 9999px;
  border: 1px solid hsl(var(--destructive) / 0.52);
  animation: recordPulse 1.65s ease-out infinite;
}

.post-tile {
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.post-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 44%, hsl(252 34% 5% / 0.7));
  opacity: 0.86;
  transition: opacity var(--transition-smooth);
}

.post-tile:hover {
  transform: translateY(-4px) scale(1.015);
  border-color: hsl(var(--primary) / 0.65);
  box-shadow: var(--shadow-lg);
}

.post-tile:hover::after {
  opacity: 0.68;
}

.skeleton {
  background: linear-gradient(90deg, hsl(var(--muted) / 0.45), hsl(var(--muted) / 0.8), hsl(var(--muted) / 0.45));
  background-size: 220% 100%;
  animation: shimmer 1.35s ease-in-out infinite;
}

@keyframes recordPulse {
  0% { transform: scale(0.92); opacity: 0.88; }
  100% { transform: scale(1.28); opacity: 0; }
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}