:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #0f172a;
  --text-secondary: #475569;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

.site-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 32px 0;
}

.site-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
}

.site-header .subtitle {
  margin-top: 6px;
  opacity: 0.9;
  font-size: 0.9rem;
}

.main-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 28px 20px;
}

.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-field select,
.form-field input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field select:focus,
.form-field input[type="number"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.btn-primary {
  width: 100%;
  margin-top: 22px;
  padding: 12px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-primary:active {
  transform: translateY(1px);
}

.result-content {
  text-align: center;
  padding: 12px 0 8px;
}

.placeholder {
  color: var(--text-secondary);
  padding: 40px 0;
}

.current-value {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.current-unit {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-left: 4px;
}

.result-label {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.temp-note {
  margin-top: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.detail-table {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.detail-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.detail-table th,
.detail-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.detail-table tr:last-child th,
.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  width: 45%;
}

.notes {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.comparison {
  margin-top: 20px;
}

.comparison h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 10px;
}

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  white-space: nowrap;
}

.comparison-table th,
.comparison-table td {
  padding: 9px 12px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.comparison-table thead th {
  background: #f8fafc;
  color: var(--text-secondary);
  font-weight: 600;
  position: sticky;
  top: 0;
}

.comparison-table tbody tr:hover {
  background: #f0f6ff;
}

.comparison-table td:first-child {
  font-weight: 600;
  text-align: center;
}

.notes h3 {
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 8px;
}

.notes ul {
  padding-left: 18px;
}

.notes li {
  margin-bottom: 4px;
}

.site-footer {
  text-align: center;
  padding: 20px 0;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

@media (max-width: 768px) {
  .main-layout {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }
}
