body {
  margin: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  height: 100vh;
  overflow: hidden;
  color: #1f2937;
  background: #f3f5f9;
}

:root {
  --left-pane-width: 46%;
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, var(--left-pane-width)) 10px minmax(420px, 1fr);
  height: 100vh;
  gap: 14px;
  padding: 14px;
  box-sizing: border-box;
}

.left {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  min-height: 0;
}

.right {
  position: relative;
  padding: 16px;
  border: 1px solid #d9e0ea;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  overflow: auto;
}

textarea {
  --active-line-offset: 0px;
  --editor-line-height: 20px;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  resize: none;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 13px;
  line-height: 20px;
  white-space: pre;
  overflow: auto;
  color: #1f2937;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px 12px;
  background-color: #fff;
  background-image: linear-gradient(#fff3bf, #fff3bf);
  background-repeat: no-repeat;
  background-size: calc(100% - 22px) var(--editor-line-height);
  background-position: 11px var(--active-line-offset);
  background-clip: padding-box;
  outline: none;
}

.paneDivider {
  width: 10px;
  border-radius: 8px;
  background: transparent;
  cursor: col-resize;
  position: relative;
}

.paneDivider::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 4px;
  width: 2px;
  border-radius: 2px;
  background: #cbd5e1;
}

.paneDivider:hover::before {
  background: #94a3b8;
}

textarea:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.controls button {
  margin-right: 6px;
}

button {
  border: 1px solid #c7d2e0;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  cursor: pointer;
  transition: all 0.15s ease;
}

button:hover {
  background: #eef2ff;
  border-color: #93c5fd;
}

button:active {
  transform: translateY(1px);
}

.topTools {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.topTools h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #0f172a;
}

.exportBox {
  margin-left: auto;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fafcff;
}

.exportActions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.exportStatus {
  min-height: 18px;
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.duration {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
}

#durationInput {
  width: 110px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  outline: none;
}

#durationInput:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

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

.sectionHeader h3 {
  margin: 0;
  font-size: 14px;
  color: #0f172a;
}

.stepInfo {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

#preview {
  padding: 10px 10px 44px;
  min-width: max-content;
}

#preview svg {
  display: block;
}

.repoLink {
  position: absolute;
  right: 16px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid #d9e0ea;
  color: #64748b;
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
}

.repoLink svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex: 0 0 auto;
}

.repoLink:hover {
  color: #2563eb;
  border-color: #93c5fd;
  background: rgba(239, 246, 255, 0.96);
}

.error {
  color: #dc2626;
  font-size: 12px;
  min-height: 18px;
}

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

  .paneDivider {
    display: none;
  }
}

