:root {
  --bg-deep: #080808;
  --bg-mid: #171717;
  --panel-bg: rgba(26, 26, 26, 0.84);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f2f2f2;
  --text-muted: #ababab;
  --blue-strong: #4f8dff;
  --blue-soft: #a6c8ff;
  --green-soft: #91d391;
  --red-soft: #ff8c8c;
  --retro-green: #61d14d;
  --retro-yellow: #f3d94d;
  --retro-orange: #ff9c39;
  --retro-red: #ff5f57;
  --retro-purple: #a87dff;
  --retro-blue: #4f8dff;
}

* {
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  margin: 0;
  padding: 56px 20px 32px;
  min-height: 100vh;
  position: relative;
  background-size: 130% 130%, 120% 120%, 135% 135%, 100% 100%;
  background:
    radial-gradient(
      circle at 16% 14%,
      rgba(255, 95, 87, 0.12),
      transparent 30%
    ),
    radial-gradient(
      circle at 84% 14%,
      rgba(243, 217, 77, 0.1),
      transparent 24%
    ),
    radial-gradient(
      circle at 50% 100%,
      rgba(79, 141, 255, 0.1),
      transparent 26%
    ),
    linear-gradient(
      160deg,
      var(--bg-deep),
      var(--bg-mid) 50%,
      #090909 100%
    );
  color: var(--text-main);
  overflow-x: hidden;
  animation: gradient-shift 28s ease-in-out infinite;
}

body::after,
body::before,
body .color-breath {
  pointer-events: none;
}

body .color-breath {
  position: fixed;
  inset: -10%;
  z-index: 0;
  background:
    radial-gradient(
      circle at 18% 22%,
      rgba(97, 209, 77, 0.16),
      transparent 32%
    ),
    radial-gradient(
      circle at 78% 18%,
      rgba(255, 156, 57, 0.16),
      transparent 28%
    ),
    radial-gradient(
      circle at 55% 82%,
      rgba(79, 141, 255, 0.16),
      transparent 34%
    );
  opacity: 0.46;
  will-change: opacity, transform;
  animation: color-float 24s ease-in-out infinite;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  border-radius: 999px;
  filter: blur(16px);
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
  will-change: transform, opacity;
}

body::before {
  width: 280px;
  height: 280px;
  top: 84px;
  right: 8%;
  background: radial-gradient(
    circle,
    rgba(168, 125, 255, 0.2),
    transparent 68%
  );
  animation-name: drift-north;
}

body::after {
  width: 340px;
  height: 340px;
  bottom: 40px;
  left: 6%;
  background: radial-gradient(
    circle,
    rgba(255, 95, 87, 0.18),
    transparent 70%
  );
  animation-name: drift-south;
  animation-duration: 24s;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.9fr);
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.panel {
  padding: 20px;
  border-radius: 22px;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03),
      rgba(255, 255, 255, 0.01)
    ),
    var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(12px);
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 20px;
}

input {
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(22, 22, 22, 0.92);
  color: white;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

button {
  padding: 12px 24px;
  background: linear-gradient(
    90deg,
    var(--retro-green),
    var(--retro-yellow) 22%,
    var(--retro-orange) 42%,
    var(--retro-red) 60%,
    var(--retro-purple) 80%,
    var(--retro-blue)
  );
  color: #0d0d0d;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.36);
  font-weight: 700;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.42);
  filter: brightness(1.04);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

a {
  color: #cddfff;
}

.progress-shell {
  display: none;
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(14, 14, 14, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.progress-copy {
  margin-bottom: 10px;
}

.progress-stats {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

progress {
  width: 100%;
  height: 18px;
  accent-color: #2490ff;
  animation: pulse-progress 1.4s ease-in-out infinite;
}

progress::-webkit-progress-bar {
  background: #1c2430;
  border-radius: 999px;
}

progress::-webkit-progress-value {
  background: linear-gradient(90deg, #1d7dff, #4aa3ff);
  border-radius: 999px;
}

progress::-moz-progress-bar {
  background: linear-gradient(90deg, #1d7dff, #4aa3ff);
  border-radius: 999px;
}

@keyframes pulse-progress {
  0% {
    filter: drop-shadow(0 0 0 rgba(36, 144, 255, 0.15));
    transform: scaleY(1);
  }
  50% {
    filter: drop-shadow(0 0 10px rgba(36, 144, 255, 0.45));
    transform: scaleY(1.04);
  }
  100% {
    filter: drop-shadow(0 0 0 rgba(36, 144, 255, 0.15));
    transform: scaleY(1);
  }
}

.community-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.community-item {
  padding: 14px 0;
  border-top: 1px solid #2d2d2d;
}

.community-item:first-child {
  border-top: none;
  padding-top: 0;
}

.community-meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.community-status {
  margin-top: 8px;
  font-size: 0.92rem;
}

.status-running {
  color: var(--blue-soft);
}

.status-idle {
  color: var(--green-soft);
}

.status-error {
  color: var(--red-soft);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5vw, 3.35rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

h2 {
  margin-top: 0;
}

p {
  color: var(--text-muted);
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position:
      0% 0%,
      100% 0%,
      50% 100%,
      0% 0%;
  }
  50% {
    background-position:
      14% 8%,
      86% 10%,
      52% 90%,
      0% 0%;
  }
}

@keyframes color-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(0, -18px, 0) scale(1.04);
  }
}

@keyframes drift-north {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.48;
  }
  50% {
    transform: translate3d(-24px, 20px, 0) scale(1.14);
    opacity: 0.72;
  }
}

@keyframes drift-south {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.44;
  }
  50% {
    transform: translate3d(28px, -26px, 0) scale(1.12);
    opacity: 0.68;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  body {
    padding-top: 36px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }
}
