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

#app {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px;
}

#calculator {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  padding: 32px 28px;
}

#calc-title {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a2e;
  text-align: center;
  margin: 0 0 6px 0;
}

#calc-subtitle {
  font-size: 14px;
  color: #888;
  text-align: center;
  margin: 0 0 24px 0;
}

.precision-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 12px 16px;
  background: #f8fafc;
  border-radius: 8px;
}

.precision-bar label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

.precision-bar input[type="range"] {
  flex: 1;
  max-width: 200px;
  accent-color: #2196F3;
}

#precision-value {
  color: #2196F3;
  font-weight: 700;
}

.converter-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.converter-card {
  border: 2px solid #e8ecf1;
  border-radius: 10px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.converter-card:hover {
  border-color: #d0d7e0;
}

.converter-card.active {
  border-color: #2196F3;
  box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.card-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 8px;
}

.converter-card.active .card-label {
  color: #2196F3;
}

.card-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-input-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  color: #333;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
  background: #fafbfc;
}

.converter-card.active .card-input-row input {
  background: #fff;
  border-color: #2196F3;
}

.card-input-row input:focus {
  border-color: #2196F3;
  background: #fff;
}

.card-input-row input::placeholder {
  color: #bbb;
}

.unit-tag {
  display: inline-block;
  padding: 6px 12px;
  background: #f0f2f5;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #777;
  white-space: nowrap;
  min-width: 50px;
  text-align: center;
}

.converter-card.active .unit-tag {
  background: #e3f2fd;
  color: #2196F3;
}

.action-bar {
  display: flex;
  gap: 12px;
}

.btn-swap {
  flex: 1;
  padding: 12px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-swap:hover {
  border-color: #2196F3;
  color: #2196F3;
  background: #f5f9ff;
}

.btn-copy {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2196F3, #1976D2);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: linear-gradient(135deg, #1E88E5, #1565C0);
  box-shadow: 0 4px 14px rgba(33, 150, 243, 0.35);
  transform: translateY(-1px);
}

.btn-copy:active {
  transform: translateY(0);
}

.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

#__fork {
  text-align: center;
  margin: 24px 0;
}

#__fork button {
  padding: 10px 24px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

#__fork button:hover {
  background: #f5f5f5;
  color: #333;
}

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

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

#features p {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
}

#scenarios ul {
  padding-left: 20px;
}

#scenarios li {
  font-size: 15px;
  color: #555;
  line-height: 1.8;
  margin-bottom: 6px;
}

#FAQ dl {
  margin: 0;
}

#FAQ dt {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-bottom: 4px;
  margin-top: 14px;
}

#FAQ dd {
  font-size: 14px;
  color: #666;
  line-height: 1.7;
  margin-left: 0;
  margin-bottom: 8px;
}

@media (max-width: 480px) {
  #calculator {
    padding: 20px 16px;
    border-radius: 8px;
  }

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

  .converter-card {
    padding: 12px 14px;
  }

  .card-input-row input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .btn-swap, .btn-copy {
    padding: 10px 16px;
    font-size: 13px;
  }

  .precision-bar {
    flex-direction: column;
    gap: 8px;
  }

  .action-bar {
    flex-direction: column;
  }
}
