body {
  background: #0f172a;
  color: #e2e8f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin: 0;
  padding: 0;
}

.app-header {
  background: #1e293b;
  padding: 1rem;
  border-bottom: 1px solid #334155;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-title {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
}

main {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  overflow-y: auto;
  height: 100dvh;
}

.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

select, input[type="text"] {
  width: 100%;
  padding: 0.75rem;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 0.375rem;
  color: #e2e8f0;
  font-size: 1rem;
}

select:focus, input[type="text"]:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
}

.checkbox-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal;
}

.cost-preview, .total-cost {
  display: block;
  padding: 0.75rem;
  background: #1e293b;
  border-left: 3px solid #8b5cf6;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  margin-bottom: 1rem;
}

.btn-primary {
  width: 100%;
  padding: 0.875rem;
  background: #8b5cf6;
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: #7c3aed;
}

.btn-primary:disabled {
  background: #64748b;
  cursor: not-allowed;
}

.spinner {
  display: none;
  width: 2rem;
  height: 2rem;
  border: 3px solid #334155;
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 1rem auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#results {
  margin-top: 2rem;
}

.cost-summary {
  padding: 1rem;
  background: #1e293b;
  border-left: 3px solid #10b981;
  border-radius: 0.375rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #a7f3d0;
}

.result-card {
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.result-card img {
  width: 100%;
  border-radius: 0.375rem;
  margin-bottom: 0.75rem;
}

.result-meta {
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.result-card details {
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.result-card summary {
  font-size: 0.875rem;
  color: #8b5cf6;
  font-weight: 600;
  padding: 0.5rem 0;
}

.result-card pre {
  background: #0f172a;
  padding: 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
  color: #cbd5e1;
}

.result-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-sm {
  flex: 1;
  padding: 0.5rem;
  background: #334155;
  color: #e2e8f0;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.2s;
}

.btn-sm:hover {
  background: #475569;
}

.error-card {
  background: #7f1d1d;
  border: 1px solid #991b1b;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
  color: #fca5a5;
}

.error-card strong {
  display: block;
  margin-bottom: 0.5rem;
}

.error-card a {
  color: #fca5a5;
  text-decoration: underline;
}

#panels-div {
  display: none;
}

input, select, textarea { box-sizing: border-box; max-width: 100%; }
