.finance-calculator {
  position: relative;
  display: flex;
  flex-direction: column;
  margin-top: -100vh;
  left: 32.5%;
  width: 32.5%;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  font-family: "Arial", "Microsoft JhengHei", sans-serif;
  margin: 20px;
}

.calculator-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  text-align: center;
}

.calculator-header h1 {
  margin: 0;
  font-size: 18px;
  text-align: center;
}

.toggle-calc-btn {
  background: transparent;
  border: 2px solid white;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.toggle-calc-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.calculator-form {
  padding: 20px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
}

.calculator-form.show {
  max-height: 500px;
  padding: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
  font-weight: 600;
}

.form-group input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: #e0e0e0;
  border-radius: 4px;
  outline: none;
}

.form-group input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #2a5298;
  border-radius: 50%;
  cursor: pointer;
}

.value-display {
  text-align: right;
  font-size: 16px;
  color: #2a5298;
  font-weight: bold;
  margin-top: 5px;
}

#calculate-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

#calculate-btn:hover {
  background: linear-gradient(135deg, #c0392b, #a5281b);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(231, 76, 60, 0.3);
}

.calculation-results {
  background: #f9f9f9;
  padding: 15px 20px;
  border-top: 1px solid #eee;
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: all 0.5s ease;
}

.calculation-results.show {
  opacity: 1;
  max-height: 200px;
}

.result-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.result-item span:first-child {
  color: #666;
}

.result-item span:last-child {
  color: #2a5298;
  font-weight: bold;
}
