* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0a0f1e;
  color: #e2e8f0;
  min-height: 100vh;
}


header {
  background: linear-gradient(135deg, #0a0f1e 0%, #1a2744 100%);
  border-bottom: 1px solid #1e3a5f;
  padding: 2rem;
  text-align: center;
}

header h1 {
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(90deg, #00d4ff, #76b900);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

header p {
  color: #94a3b8;
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  background: #76b900;
  color: #0a0f1e;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-left: 0.5rem;
  vertical-align: middle;
  letter-spacing: 0.05em;
}


main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  main { grid-template-columns: 1fr; }
}


.card {
  background: #111827;
  border: 1px solid #1e3a5f;
  border-radius: 12px;
  padding: 1.5rem;
}

.card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}


.control-group {
  margin-bottom: 1.2rem;
}

.control-group label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.control-group label span {
  color: #00d4ff;
  font-weight: 600;
}

input[type="range"] {
  width: 100%;
  accent-color: #00d4ff;
  cursor: pointer;
}

.hint {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.3rem;
}

button#run-btn {
  width: 100%;
  padding: 0.85rem;
  background: linear-gradient(90deg, #00d4ff, #76b900);
  color: #0a0f1e;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: opacity 0.2s;
}

button#run-btn:hover { opacity: 0.88; }
button#run-btn:disabled { opacity: 0.4; cursor: not-allowed; }


#status {
  margin-top: 1rem;
  font-size: 0.82rem;
  text-align: center;
  color: #94a3b8;
  min-height: 1.2rem;
}

#status.running { color: #00d4ff; }
#status.error   { color: #f87171; }
#status.done    { color: #76b900; }


.chart-card {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.chart-wrap {
  position: relative;
  height: 340px;
}


.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.stat {
  background: #0d1b2e;
  border: 1px solid #1e3a5f;
  border-radius: 8px;
  padding: 0.8rem;
  text-align: center;
}

.stat .val {
  font-size: 1.4rem;
  font-weight: 700;
  color: #00d4ff;
}

.stat .lbl {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


.concepts {
  grid-column: 1 / -1;
}

.concepts h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #00d4ff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.2rem;
}

.concept-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.concept {
  background: #0d1b2e;
  border: 1px solid #1e3a5f;
  border-radius: 10px;
  padding: 1.1rem;
}

.concept h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: #76b900;
  margin-bottom: 0.5rem;
}

.concept p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.6;
}


footer {
  text-align: center;
  padding: 2rem;
  color: #334155;
  font-size: 0.78rem;
  border-top: 1px solid #1e3a5f;
}

footer a { color: #00d4ff; text-decoration: none; }