/*
  Custom styles layered on top of Bootstrap 5.
  Leverages CSS variables so dark / light theme swaps feel instant.
*/

:root {
  --loooom-body-bg: #f5f7fb;
  --loooom-surface: #ffffff;
  --loooom-border: rgba(15, 23, 42, 0.08);
  --loooom-gradient: radial-gradient(circle at top, #fef3c7, #e0e7ff 45%, #f5f5f5);
  --loooom-hero-glow: rgba(255, 255, 255, 0.5);
  --font-body: 'Plus Jakarta Sans', 'Inter', 'Space Grotesk', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Syne', 'Space Grotesk', 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-bs-theme='dark'] {
  --loooom-body-bg: #020617;
  --loooom-surface: rgba(15, 23, 42, 0.7);
  --loooom-border: rgba(148, 163, 184, 0.2);
  --loooom-gradient: radial-gradient(circle at 10% 20%, #0f172a, #020617 55%, #030712);
  --loooom-hero-glow: rgba(15, 23, 42, 0.6);
}

body {
  font-family: var(--font-body);
  background: var(--loooom-body-bg);
  color: var(--bs-body-color);
}

.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6,
h1,
h2,
h3,
h4,
.navbar-brand,
.hero-panel h1,
.thread-card .fs-5 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.text-gradient {
  background: linear-gradient(120deg, #4f46e5, #fb7185, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-panel {
  background: var(--loooom-gradient);
  padding: clamp(2rem, 5vw, 3.5rem);
  border: 1px solid var(--loooom-border);
}

.noise-layer {
  position: absolute;
  inset: 0;
  background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"%3E%3Cg fill-opacity=".03"%3E%3Cpath d="M0 0h20v20H0z"/%3E%3C/g%3E%3C/svg%3E');
  opacity: 0.6;
  pointer-events: none;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 1.5rem;
  border: 1px solid rgba(79, 70, 229, 0.1);
}

[data-bs-theme='dark'] .glass-panel {
  background: rgba(2, 6, 23, 0.8);
  border-color: rgba(148, 163, 184, 0.2);
}

.pill {
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  font-size: 0.85rem;
  border: 1px solid var(--loooom-border);
}

.stat-card {
  background: var(--loooom-surface);
  border-radius: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--loooom-border);
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.08);
}

.theme-toggle {
  border-radius: 999px;
}

.thread-card {
  background: var(--loooom-surface);
  border: 1px solid var(--loooom-border);
  border-radius: 1.25rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.thread-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 50px rgba(15, 23, 42, 0.12);
}

.vote-chip {
  width: 70px;
  background: rgba(79, 70, 229, 0.08);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
}

[data-bs-theme='dark'] .vote-chip {
  background: rgba(96, 165, 250, 0.15);
}

.gradient-card {
  background: radial-gradient(circle at 0% 0%, rgba(79, 70, 229, 0.35), transparent 50%),
              radial-gradient(circle at 80% 0%, rgba(248, 113, 113, 0.25), transparent 50%),
              var(--loooom-gradient);
  border: none;
  color: #0f172a;
}

[data-bs-theme='dark'] .gradient-card {
  color: #f8fafc;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.75;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0.5rem;
  width: 2px;
  background: var(--loooom-border);
}

.timeline-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #6366f1;
  margin-top: 0.35rem;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.15);
}

.comment-tile {
  background: var(--loooom-surface);
  border: 1px solid var(--loooom-border);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.comment-replies {
  border-left: 2px dashed var(--loooom-border);
  margin-left: 2rem;
  padding-left: 1rem;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.15);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.comment-actions .btn-link {
  color: var(--bs-primary);
}

.reply-form {
  border-radius: 1rem;
}

.hero-panel .input-group .form-control {
  box-shadow: none !important;
}

.thread-feed .btn {
  min-width: 44px;
}

.text-body-tertiary {
  color: var(--bs-secondary-color) !important;
}

.tracking-wide {
  letter-spacing: 0.25em;
}
