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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fa;
  color: #333;
  min-height: 100vh;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 20px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e8ecf0;
}

.form-group {
  margin-bottom: 14px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
  margin-bottom: 4px;
}

input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #dde2e8;
  border-radius: 8px;
  font-size: 1rem;
  color: #333;
  background: #fafbfc;
  transition: border-color 0.2s;
}

input[type="number"]:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}

small {
  display: block;
  font-size: 0.78rem;
  color: #888;
  margin-top: 3px;
}

.btn-calc {
  width: 100%;
  padding: 13px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.2s;
}

.btn-calc:hover {
  background: #2563eb;
}

.btn-clear {
  width: 100%;
  padding: 10px;
  background: #f1f5f9;
  color: #555;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.2s;
}

.btn-clear:hover {
  background: #e2e8f0;
}

.result-card {
  border-left: 4px solid #3b82f6;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f0f3f7;
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.875rem;
  color: #555;
}

.result-value {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1a2e;
}

.result-row.highlight .result-label {
  color: #333;
  font-weight: 600;
}

.result-row.highlight .result-value {
  color: #3b82f6;
  font-size: 1.1rem;
}

.result-row.highlight.red .result-value {
  color: #ef4444;
}

.divider {
  height: 1px;
  background: #e8ecf0;
  margin: 8px 0;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }

  .result-label {
    font-size: 0.82rem;
  }

  .result-value {
    font-size: 0.95rem;
  }
}
