@import url("https://fonts.googleapis.com/css2?family=Fraunces:wght@400;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  --bg: #f6f0e8;
  --bg-2: #f1e7da;
  --surface: #fff9f2;
  --surface-2: #fff4e4;
  --ink: #1d1b19;
  --muted: #6b5f52;
  --accent: #c45a1a;
  --accent-2: #247c8a;
  --accent-3: #e2b13c;
  --danger: #b63b29;
  --ring: rgba(196, 90, 26, 0.25);
  --shadow: 0 18px 50px rgba(29, 27, 25, 0.12);
  --font-title: "Fraunces", "Times New Roman", serif;
  --font-body: "Space Grotesk", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, #fff3df 0%, var(--bg) 45%, #eadfce 100%);
  color: var(--ink);
  font-family: var(--font-body);
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
  display: grid;
  gap: 28px;
  position: relative;
}

.hero {
  position: relative;
  padding: 28px;
  background: linear-gradient(120deg, var(--surface) 10%, var(--surface-2) 90%);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2rem, 3vw, 3rem);
  margin: 0 0 12px;
}

.hero__subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 0.85rem;
  color: var(--muted);
}

.hero__art {
  position: relative;
  min-height: 200px;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  animation: float 12s ease-in-out infinite;
}

.orb--one {
  width: 150px;
  height: 150px;
  background: rgba(196, 90, 26, 0.18);
  top: 10px;
  right: 40px;
}

.orb--two {
  width: 210px;
  height: 210px;
  background: rgba(36, 124, 138, 0.2);
  bottom: -40px;
  right: 10px;
  animation-delay: -4s;
}

.orb--three {
  width: 120px;
  height: 120px;
  background: rgba(226, 177, 60, 0.25);
  top: 90px;
  left: 20px;
  animation-delay: -8s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.panel {
  background: var(--surface);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
}

.panel--grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.panel--wide {
  grid-template-columns: 1fr;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
  gap: 24px;
  align-items: start;
  position: relative;
}

.layout__left {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 24px;
}

.layout__right {
  position: sticky;
  top: 24px;
  z-index: 1;
  display: grid;
  gap: 24px;
  height: calc(100vh - 48px);
  grid-template-rows: 9fr 1fr;
}

.yaml-panel {
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100%;
}

.yaml-panel .compose-output {
  height: 100%;
  overflow: hidden;
}

.yaml-panel .compose-editor {
  height: 100%;
}

.yaml-panel textarea {
  height: 100%;
  max-height: none;
}

.editor-panel {
  display: grid;
  align-content: center;
  min-height: 0;
  text-align: left;
}

.editor-panel .panel__intro {
  margin-bottom: 6px;
}

.editor-panel p {
  margin: 0;
}

.panel__intro h2 {
  margin: 0 0 6px;
  font-family: var(--font-title);
  font-size: 1.6rem;
}

.panel__intro p {
  margin: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

input,
textarea,
select {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(29, 27, 25, 0.15);
  background: #fff;
  font-family: var(--font-body);
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--ring);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-body);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 18px rgba(196, 90, 26, 0.25);
}

.button--ghost {
  background: transparent;
  border: 1px solid rgba(29, 27, 25, 0.15);
  color: var(--ink);
}

.button--danger {
  background: var(--danger);
  color: #fff;
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  box-shadow: none;
}

.chip {
  border: 1px dashed rgba(29, 27, 25, 0.2);
  background: transparent;
  padding: 6px 12px;
  border-radius: 16px;
  cursor: pointer;
}

.chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip-label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-right: 6px;
}

.checkbox-list {
  display: grid;
  gap: 8px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--ink);
}

.service-card {
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(29, 27, 25, 0.08);
  background: var(--surface-2);
  display: grid;
  gap: 18px;
  animation: fadeIn 0.4s ease;
  border-left: 10px solid transparent;
  min-width: 0;
}

.service-card__header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.service-card__header > div {
  min-width: 0;
}

.service-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.color-tag {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}

.image-scroll {
  max-width: 100%;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: thin;
  min-width: 0;
}

.image-scroll--auto {
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.image-scroll--auto span {
  display: inline-block;
  padding-right: 32px;
  animation: marquee 10s linear infinite;
}

.image-scroll--auto:hover span {
  animation-play-state: paused;
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid--ports,
.grid--env,
.grid--vols {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  align-items: end;
}

.subpanel {
  padding: 16px;
  border-radius: 18px;
  background: #fffdf8;
  border: 1px dashed rgba(29, 27, 25, 0.12);
  display: grid;
  gap: 12px;
}

.subpanel__header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.hint {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

.empty {
  padding: 28px;
  border-radius: 16px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(29, 27, 25, 0.2);
}

.compose-output {
  background: #191613;
  color: #f5e9da;
  border-radius: 18px;
  padding: 18px;
  overflow-x: auto;
  font-family: "JetBrains Mono", "Courier New", monospace;
  font-size: 0.9rem;
}

.compose-editor {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: start;
}

.line-numbers {
  user-select: none;
  text-align: right;
  color: rgba(245, 233, 218, 0.5);
  font-size: inherit;
  line-height: 1.5;
  overflow: hidden;
}

.line-numbers span {
  display: block;
  line-height: 1.5;
}

.line-numbers__inner {
  will-change: transform;
}

.compose-output textarea {
  width: 100%;
  min-height: 220px;
  max-height: 360px;
  border: none;
  outline: none;
  background: transparent;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.5;
  padding: 0;
  resize: vertical;
  overflow: auto;
  white-space: pre;
  overflow-wrap: normal;
}

.footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.panel--compact {
  padding: 16px;
}

.editor-panel .panel__intro h2 {
  font-size: 1.1rem;
}

.editor-panel .panel__intro p {
  font-size: 0.85rem;
}

.editor-panel p {
  font-size: 0.9rem;
}

.editor-panel h3 {
  margin: 0;
  font-family: var(--font-title);
  font-size: 1.1rem;
}

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

@media (max-width: 720px) {
  .hero {
    padding: 22px;
  }

  .panel {
    padding: 20px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .layout__right {
    position: static;
  }
}
