* { box-sizing: border-box; }

:root {
  --bg: #090d14;
  --panel: #111722;
  --panel2: #0d131d;
  --line: #263244;
  --text: #f4f7fb;
  --muted: #8f9bad;
  --accent: #7aa2ff;
  --accent2: #8ef0cc;
  --danger: #ff8d8d;
}

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 0%, rgba(78, 116, 194, .18), transparent 28rem),
    radial-gradient(circle at 100% 35%, rgba(69, 174, 153, .10), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  height: 76px;
  padding: 0 5vw;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(9,13,20,.78);
}

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

.brand > div:last-child {
  display: flex;
  flex-direction: column;
}

.brand strong { font-size: 17px; letter-spacing: .2px; }
.brand span { font-size: 11px; color: var(--muted); margin-top: 2px; }

.logo {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid rgba(122,162,255,.5);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(122,162,255,.25), rgba(142,240,204,.08));
  font-weight: 800;
}

.status {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
}

.status .dot {
  width: 7px; height: 7px;
  border-radius: 999px;
  background: var(--danger);
}

.status.online .dot { background: var(--accent2); }

.shell {
  width: min(1180px, 90vw);
  margin: 0 auto;
}

.hero {
  padding: 80px 0 44px;
  max-width: 800px;
}

.eyebrow, .step {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.6px;
  margin: 0 0 10px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.06;
  letter-spacing: -2.2px;
  margin: 0 0 22px;
}

.hero > p:last-child {
  font-size: 17px;
  line-height: 1.7;
  max-width: 690px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding-bottom: 80px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(17,23,34,.96), rgba(13,19,29,.96));
  padding: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
}

.wide { grid-column: 1 / -1; }

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 20px;
}

h2 {
  font-size: 22px;
  margin: 0;
  letter-spacing: -.5px;
}

.badge {
  font-size: 11px;
  font-weight: 800;
  color: var(--accent2);
  border: 1px solid rgba(142,240,204,.22);
  background: rgba(142,240,204,.06);
  padding: 6px 9px;
  border-radius: 8px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

.dropzone {
  min-height: 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px dashed #3c4e69;
  border-radius: 16px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
  transition: .2s ease;
}

.dropzone:hover {
  border-color: var(--accent);
  background: rgba(122,162,255,.045);
}

.dropzone input { display: none; }
.dropzone strong { margin-top: 10px; }
.dropzone span { font-size: 12px; color: var(--muted); margin-top: 5px; }

.upload-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(122,162,255,.10);
  color: var(--accent);
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

label > span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 7px;
}

input, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #0b111a;
  color: var(--text);
  border-radius: 11px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
}

input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(122,162,255,.10);
}

.plot-placeholder {
  height: 370px;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255,255,255,.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.026) 1px, transparent 1px),
    #0a1018;
  background-size: 34px 34px;
}

.well {
  position: absolute;
  left: 23%; right: 23%;
  top: 43%; height: 88px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(122,162,255,.22), transparent 70%);
  filter: blur(8px);
}

.barrier {
  position: absolute;
  top: 31%;
  width: 80px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.075), transparent 70%);
}
.b1 { left: 27%; }
.b2 { right: 27%; }

.dot {
  position: absolute;
}

.plot-placeholder .dot {
  top: 48%;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--accent2);
  box-shadow: 0 0 24px rgba(142,240,204,.45);
}
.d1 { left: 45%; }
.d2 { right: 45%; }

.axis { position: absolute; color: var(--muted); font-size: 12px; }
.axis-x { bottom: 10px; right: 14px; }
.axis-y { top: 10px; left: 14px; }

.plot-message {
  position: absolute;
  inset: auto 0 24px 0;
  margin: auto;
  width: fit-content;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(9,13,20,.80);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  backdrop-filter: blur(10px);
}

.plot-message span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.action-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.run-button {
  min-width: 190px;
  border: 0;
  border-radius: 13px;
  padding: 15px 19px;
  font-weight: 800;
  font-size: 14px;
  color: #07111d;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  cursor: pointer;
  transition: transform .15s ease, filter .15s ease;
}

.run-button:hover { transform: translateY(-1px); filter: brightness(1.06); }

.result-card pre {
  margin: 0;
  white-space: pre-wrap;
  color: #c9d5e6;
  font-size: 13px;
  line-height: 1.6;
}

.hidden { display: none; }

footer {
  width: min(1180px, 90vw);
  margin: 0 auto;
  padding: 28px 0 44px;
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 780px) {
  .topbar { padding: 0 20px; }
  .brand span { display: none; }
  .shell { width: min(94vw, 1180px); }
  .hero { padding-top: 54px; }
  .hero h1 { letter-spacing: -1.5px; }
  .grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .action-card { flex-direction: column; align-items: stretch; }
  .run-button { width: 100%; }
  footer { width: 94vw; flex-direction: column; }
}


.single-setting {
  grid-template-columns: minmax(220px, 360px) 1fr;
  align-items: end;
}

.setting-note {
  min-height: 70px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  background: rgba(122,162,255,.035);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.setting-note strong {
  font-size: 13px;
  font-weight: 700;
}

.setting-note span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 780px) {
  .single-setting {
    grid-template-columns: 1fr;
  }
}
