html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

#app {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
}

#app-title {
  text-align: center;
  font-size: 28px;
  color: #1e293b;
  margin-bottom: 28px;
}

#calculator-container {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

#input-panel {
  flex: 0 0 320px;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#result-panel {
  flex: 1;
  min-width: 0;
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#result-title {
  font-size: 18px;
  color: #1e293b;
  margin-bottom: 16px;
}

.input-group {
  margin-bottom: 16px;
}

.input-group label {
  display: block;
  font-size: 14px;
  color: #475569;
  margin-bottom: 6px;
  font-weight: 500;
}

.input-field {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  color: #1e293b;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.input-field:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#button-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e2e8f0;
  color: #475569;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.tab-container {
  display: flex;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 10px 12px;
  border: none;
  background: #f8fafc;
  color: #64748b;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}

.tab-btn:first-child {
  border-right: 1px solid #cbd5e1;
}

.tab-btn.tab-active {
  background: #2563eb;
  color: #ffffff;
}

.tab-btn:not(.tab-active):hover {
  background: #e2e8f0;
}

.summary-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.summary-item {
  flex: 1;
  min-width: 120px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-label {
  font-size: 13px;
  color: #64748b;
}

.summary-value {
  font-size: 20px;
  font-weight: 700;
  color: #2563eb;
}

#table-wrapper {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.result-table thead th {
  background: #2563eb;
  color: #ffffff;
  padding: 10px 12px;
  text-align: center;
  font-weight: 500;
}

.result-table thead th:first-child {
  border-radius: 8px 0 0 0;
}

.result-table thead th:last-child {
  border-radius: 0 8px 0 0;
}

.result-table tbody td {
  padding: 10px 12px;
  text-align: center;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

.result-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.result-table tbody tr:hover {
  background: #eff6ff;
}

.placeholder-text {
  color: #94a3b8;
  padding: 24px;
  text-align: center;
}

#__fork {
  text-align: center;
  margin-top: 32px;
}

#__fork button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#__fork button:hover {
  background: #1d4ed8;
}

#features, #scenarios, #FAQ {
  max-width: 960px;
  margin: 32px auto 0;
  padding: 0 16px;
}

#features h2, #scenarios h2, #FAQ h2 {
  font-size: 20px;
  color: #1e293b;
  margin-bottom: 12px;
}

#features p {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
}

#scenarios ul {
  padding-left: 20px;
  font-size: 15px;
  color: #475569;
  line-height: 1.8;
}

#scenarios ul li {
  margin-bottom: 4px;
}

#FAQ dl {
  font-size: 15px;
  color: #475569;
  line-height: 1.7;
}

#FAQ dt {
  font-weight: 600;
  color: #1e293b;
  margin-top: 16px;
}

#FAQ dd {
  margin-left: 0;
  margin-top: 4px;
  color: #64748b;
}

footer {
  text-align: center;
  padding: 24px 16px;
  color: #94a3b8;
  font-size: 13px;
}

footer a {
  color: #2563eb;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #calculator-container {
    flex-direction: column;
  }

  #input-panel {
    flex: none;
    width: 100%;
    box-sizing: border-box;
  }

  #app-title {
    font-size: 22px;
  }

  .summary-row {
    flex-direction: column;
    gap: 10px;
  }
}
