:root {
  --bg: #081018;
  --bg-soft: #0d1824;
  --panel: rgba(12, 24, 36, 0.72);
  --panel-border: rgba(137, 185, 255, 0.22);
  --text: #e8f1ff;
  --text-muted: #acc0db;
  --primary: #2dd4bf;
  --primary-strong: #10b981;
  --danger: #fb7185;
  --chip: #12263a;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 10% 10%, #16304a 0%, transparent 35%),
    radial-gradient(circle at 90% 30%, #0a3c39 0%, transparent 36%),
    linear-gradient(150deg, #05080d 0%, #091321 55%, #081018 100%);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.24;
  pointer-events: none;
}

.orb-a {
  top: -8vw;
  left: -8vw;
  background: #22c55e;
}

.orb-b {
  bottom: -12vw;
  right: -8vw;
  background: #38bdf8;
}

.app-shell {
  width: min(1100px, 94vw);
  margin: 0 auto;
  padding: 1rem 0 3rem;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 1rem 0;
  animation: fade-in 550ms ease;
}

.eyebrow {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  color: var(--primary);
}

h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.05;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  max-width: 60ch;
}

.panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: lift-in 420ms ease;
}

.panel h2 {
  margin: 0;
  font-size: 1.15rem;
}

.setting-group {
  margin-top: 0.9rem;
}

.group-title {
  margin: 0 0 0.55rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.segmented {
  display: flex;
  gap: 0.5rem;
}

.segmented-btn {
  border: 1px solid #2e4560;
  background: #111f2f;
  color: var(--text);
  border-radius: 999px;
  padding: 0.52rem 0.84rem;
  font: inherit;
  cursor: pointer;
  transition: all 180ms ease;
}

.segmented-btn.active {
  border-color: #45f3cb;
  background: #153039;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.18);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.42rem 0.76rem;
  background: var(--chip);
  border: 1px solid #2d4967;
  font-size: 0.88rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 0.62rem 0.9rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.btn-primary {
  background: linear-gradient(115deg, var(--primary), var(--primary-strong));
  color: #052221;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #355778;
  color: var(--text);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.meta {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
}

.revision-card {
  margin-top: 0.8rem;
  border: 1px solid #345778;
  border-radius: 14px;
  background: rgba(11, 24, 38, 0.85);
  padding: 1rem;
}

.revision-card.empty {
  color: var(--text-muted);
}

.revision-title {
  margin: 0;
  font-size: 1.4rem;
}

.revision-subtitle {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
}

.revision-image {
  width: 100%;
  margin-top: 0.9rem;
  border-radius: 12px;
  border: 1px solid #355778;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.revision-controls {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.9rem;
}

.tech-grid {
  margin-top: 0.8rem;
  display: grid;
  gap: 0.75rem;
}

.tech-card {
  border: 1px solid #2d4967;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(10, 22, 33, 0.9);
}

.tech-image-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f1d2c;
}

.tech-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tech-content {
  padding: 0.8rem;
}

.tech-name {
  margin: 0;
  font-size: 1rem;
}

.tech-info {
  margin: 0.22rem 0 0;
  color: var(--text-muted);
  font-size: 0.86rem;
}

.tech-tags {
  margin-top: 0.55rem;
  display: flex;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.18rem 0.52rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: #17334b;
  border: 1px solid #2a5272;
}

.tag.warn {
  background: rgba(251, 113, 133, 0.15);
  border-color: rgba(251, 113, 133, 0.6);
  color: #ffd7de;
}

@media (min-width: 760px) {
  .app-shell {
    padding-top: 1.6rem;
  }

  .settings-panel,
  .revision-panel,
  .list-panel {
    padding: 1.2rem;
  }

  .tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .tech-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@keyframes lift-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
