:root {
  --bg: #050607;
  --panel: #0b0f0d;
  --panel-strong: #111713;
  --line: #25322a;
  --line-bright: #405443;
  --text: #e8f0e8;
  --muted: #92a196;
  --green: #39d353;
  --green-soft: #143f23;
  --orange: #f78166;
  --blue: #58a6ff;
  --yellow: #f2cc60;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 18% 12%, rgba(57, 211, 83, 0.12), transparent 28rem),
    linear-gradient(135deg, #020302 0%, #080b09 42%, #11140f 100%);
  font-family: "Inter", system-ui, sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  align-items: center;
}

.workspace {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 9, 7, 0.92);
  box-shadow: var(--shadow);
}

.topbar {
  min-height: 48px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #0c110e;
  font-family: "Fira Code", monospace;
  color: var(--muted);
}

.window-dots {
  display: flex;
  gap: 8px;
}

.window-dots span {
  width: 12px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
}

.window-dots span:nth-child(2) {
  background: var(--yellow);
}

.window-dots span:nth-child(3) {
  background: var(--green);
}

.repo-path {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.branch-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  color: var(--green);
}

.branch-dot {
  width: 8px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.hero {
  min-height: 260px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 32px;
  align-items: center;
  padding: 42px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(57, 211, 83, 0.08), transparent 58%),
    repeating-linear-gradient(0deg, transparent, transparent 28px, rgba(57, 211, 83, 0.035) 29px);
}

.kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-family: "Fira Code", monospace;
  font-weight: 600;
}

h1 {
  margin: 0;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.88;
  letter-spacing: 0;
}

.intro {
  max-width: 620px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}

.git-scene {
  position: relative;
  min-height: 210px;
}

.commit-line {
  position: absolute;
  inset: 32px 42px 42px 32px;
  border-left: 3px solid var(--green);
}

.commit-line::before,
.commit-line::after {
  content: "";
  position: absolute;
  left: -3px;
  width: 138px;
  height: 72px;
  border: 3px solid var(--green);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 28px 0 0;
}

.commit-line::before {
  top: 18px;
}

.commit-line::after {
  top: 94px;
  border-color: var(--blue);
}

.commit-line span {
  position: absolute;
  width: 22px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  border: 4px solid var(--green);
}

.commit-line span:nth-child(1) {
  left: -13px;
  top: -2px;
}

.commit-line span:nth-child(2) {
  left: 124px;
  top: 77px;
  border-color: var(--blue);
}

.commit-line span:nth-child(3) {
  left: -13px;
  bottom: -8px;
}

.git-character {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 112px;
  height: 152px;
}

.git-character .head {
  position: absolute;
  top: 8px;
  left: 32px;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: inset -8px -8px 0 rgba(0, 0, 0, 0.18);
}

.git-character .head::before,
.git-character .head::after {
  content: "";
  position: absolute;
  top: 18px;
  width: 7px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #090b0a;
}

.git-character .head::before {
  left: 15px;
}

.git-character .head::after {
  right: 15px;
}

.git-character .body,
.git-character .arm,
.git-character .leg {
  position: absolute;
  background: var(--green);
  border-radius: 999px;
}

.git-character .body {
  top: 64px;
  left: 54px;
  width: 12px;
  height: 54px;
}

.git-character .arm {
  top: 76px;
  width: 58px;
  height: 10px;
}

.git-character .arm.left {
  left: 8px;
  rotate: -24deg;
}

.git-character .arm.right {
  right: 2px;
  rotate: 28deg;
}

.git-character .leg {
  top: 112px;
  width: 50px;
  height: 10px;
}

.git-character .leg.left {
  left: 18px;
  rotate: 118deg;
}

.git-character .leg.right {
  right: 10px;
  rotate: 62deg;
}

.floating-command {
  position: absolute;
  right: 0;
  top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line-bright);
  border-radius: 6px;
  background: rgba(5, 6, 7, 0.86);
  color: var(--green);
  font-family: "Fira Code", monospace;
  font-size: 14px;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 0;
}

.commit-form,
.preview-panel {
  padding: 32px;
}

.commit-form {
  border-right: 1px solid var(--line);
}

fieldset {
  min-width: 0;
  margin: 0 0 22px;
  padding: 0;
  border: 0;
}

legend,
label > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 13px;
  font-weight: 600;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.type-card {
  min-height: 78px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  cursor: pointer;
  transition: 160ms ease;
}

.type-card:hover,
.type-card.selected {
  border-color: var(--green);
  background: var(--green-soft);
  transform: translateY(-1px);
}

.type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.type-card span {
  display: block;
  color: var(--text);
  font-family: "Fira Code", monospace;
  font-weight: 700;
}

.type-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 150px;
  gap: 14px;
}

label {
  display: block;
  margin-bottom: 18px;
}

input[type="text"],
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: #070a08;
  color: var(--text);
  font-family: "Fira Code", monospace;
  font-size: 15px;
}

input[type="text"] {
  min-height: 48px;
  padding: 0 14px;
}

textarea {
  min-height: 128px;
  resize: vertical;
  padding: 14px;
  line-height: 1.6;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 211, 83, 0.12);
}

.options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-family: "Fira Code", monospace;
}

.checkbox-line input {
  width: 18px;
  aspect-ratio: 1;
  accent-color: var(--green);
}

.checkbox-line span {
  margin: 0;
  color: var(--text);
}

.ghost-button,
.copy-button {
  min-height: 44px;
  border: 1px solid var(--line-bright);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.ghost-button {
  padding: 0 16px;
  background: transparent;
}

.ghost-button:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--panel-strong);
}

.terminal-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 13px;
}

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

.commit-preview {
  min-height: 224px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #030403;
  color: var(--green);
  font-family: "Fira Code", monospace;
  line-height: 1.7;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.quality-box {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(3, 4, 3, 0.46);
}

.quality-box > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.meter-label {
  color: var(--muted);
  font-family: "Fira Code", monospace;
  font-size: 13px;
}

.meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #1b241e;
}

.meter span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
  transition: 160ms ease;
}

.quality-box p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: auto;
  background: var(--green);
  color: #031007;
  font-weight: 800;
}

.copy-button:hover {
  filter: brightness(1.08);
}

.copy-icon {
  width: 16px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 3px;
  position: relative;
}

.copy-icon::before {
  content: "";
  position: absolute;
  inset: -6px 4px 4px -6px;
  border: 2px solid currentColor;
  border-radius: 3px;
  opacity: 0.55;
}

@media (max-width: 920px) {
  .hero,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 32px 24px 20px;
  }

  .git-scene {
    min-height: 190px;
  }

  .commit-form {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 18px, 1180px);
    padding: 9px 0;
  }

  .topbar {
    grid-template-columns: auto 1fr;
  }

  .branch-pill {
    display: none;
  }

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

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .commit-form,
  .preview-panel {
    padding: 22px;
  }
}
