* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    margin: 0;
    padding: 0;
    background: #111827;
    color: #f9fafb;
    display: flex;
    justify-content:center;
    align-items: flex-start;
    min-height: 100vh;
}

.app-container {
    background: #1f2937;
    border-radius: 1rem;
    padding: 1.5rem 2rem 2rem;
    margin: 1.5rem;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

h1 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.6rem;
}

.subtitle {
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: #9ca3af;
  font-size: 0.95rem;
}

form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 500;
}

input,
select {
  width: 100%;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid #374151;
  background: #030712;
  color: #e5e7eb;
  font-size: 0.95rem;
}

input:focus,
select:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.6);
}

.dimensions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem 1rem;
}

.buttons-row {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

button {
  border-radius: 9999px;
  border: none;
  font-size: 0.95rem;
  padding: 0.45rem 1.2rem;
  cursor: pointer;
  font-weight: 500;
}

.primary-btn {
  background: #3b82f6;
  color: #f9fafb;
}

.primary-btn:hover {
  background: #2563eb;
}

.secondary-btn {
  background: #374151;
  color: #e5e7eb;
}

.secondary-btn:hover {
  background: #4b5563;
}

.results-card {
  background: #020617;
  border-radius: 0.75rem;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid #111827;
}

.results-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.results-card p {
  margin: 0.1rem 0;
}

.volume-line,
.density-line {
  color: #9ca3af;
  font-size: 0.85rem;
}

.info-panel {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.info-panel summary {
  cursor: pointer;
  color: #e5e7eb;
}

.info-panel p {
  margin-top: 0.5rem;
}