* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  min-height: 100vh;
  color: #e2e8f0;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #334155;
}

h1 {
  font-size: 24px;
  font-weight: 600;
  color: #f1f5f9;
}

.controls {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.control-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-group label {
  font-size: 14px;
  color: #94a3b8;
}

.control-group input {
  width: 80px;
  padding: 8px 12px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #e2e8f0;
  font-family: monospace;
  font-size: 14px;
}

.control-group input:focus {
  outline: none;
  border-color: #22d3ee;
}

button {
  padding: 10px 20px;
  background: #0891b2;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #0e7490;
}

.chart-container {
  background: #1e293b;
  border-radius: 12px;
  border: 1px solid #334155;
  padding: 24px;
  margin-bottom: 24px;
}

#chart {
  width: 100%;
  height: 500px;
}

.info-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.info-card {
  background: #1e293b;
  border-radius: 8px;
  border: 1px solid #334155;
  padding: 16px;
}

.info-card h3 {
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 8px;
}

.info-card .value {
  font-size: 18px;
  font-family: monospace;
  color: #22d3ee;
}

.error-message {
  background: #7f1d1d;
  border: 1px solid #991b1b;
  color: #fecaca;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 24px;
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 300px;
  color: #64748b;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control-group {
    justify-content: space-between;
  }

  #chart {
    height: 350px;
  }
}
