:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  background: #0b1020;
  color: #e8ecf3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(76, 123, 255, 0.18), transparent 30%),
    linear-gradient(180deg, #0b1020 0%, #111827 100%);
}

#app {
  display: grid;
  grid-template-columns: 360px 1fr;
  min-height: 100vh;
}

.panel {
  padding: 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 15, 30, 0.78);
  backdrop-filter: blur(16px);
}

h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

p,
label,
button,
input {
  font: inherit;
}

.copy {
  color: #9ba7bd;
  line-height: 1.45;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.card {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

input[type="file"] {
  width: 100%;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #5b8cff;
  color: white;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.stats {
  display: grid;
  gap: 10px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #cdd6e5;
}

.meter {
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.meter > div {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5b8cff, #7cf8c4);
}

.viewport {
  position: relative;
}

canvas {
  display: block;
  width: 100%;
  height: 100vh;
}

.badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(124, 248, 196, 0.12);
  color: #7cf8c4;
  font-size: 0.8rem;
}

.footer {
  margin-top: 16px;
  color: #7f8aa3;
  font-size: 0.9rem;
}

code {
  font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 0.9em;
}

@media (max-width: 900px) {
  #app {
    grid-template-columns: 1fr;
  }

  .panel {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  canvas {
    height: 60vh;
  }
}
