.credit-calculator-app .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

@media (min-width: 1024px) {
  .credit-calculator-app .container {
    flex-direction: row;
  }
}

.credit-calculator-app .main-card,
.credit-calculator-app .summary-card {
  background-color: white;
  border-radius: 8px;
  border: 1px solid #E2E8F0;
  padding: 24px;
}

.credit-calculator-app .main-card {
  flex: 1;
}

.credit-calculator-app .summary-card {
  width: auto;
}

@media (min-width: 1024px) {
  .credit-calculator-app .summary-card {
    width: 320px;
  }
}

.credit-calculator-app h1,
.credit-calculator-app h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 32px;
  color: #1A202C;
}

h2 {
  font-size: 20px;
  margin: 32px 0 24px;
}

.credit-calculator-app .input-group {
  margin-bottom: 24px;
  position: relative;
}

.credit-calculator-app .label-with-bonus {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bonus-badge {
  font-size: 14px;
  color: #48BB78;
  background-color: #F0FFF4;
  padding: 4px 8px;
  border-radius: 4px;
}

label {
  display: block;
  font-size: 16px;
  color: #4A5568;
  margin-bottom: 8px;
}

.required {
  color: #E53E3E;
  margin-left: 2px;
}

.amount-input, .term-input, .payment-display {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 16px;
}

.amount-input input, .term-input input {
  font-size: 24px;
  font-weight: 600;
  border: none;
  outline: none;
  width: 200px;
}


input[type="range"] {
  width: 100%;
  margin-bottom: 8px;
  -webkit-appearance: none;
  height: 4px;
  background: #EDF2F7;
  border-radius: 2px;
  outline: none;
}

@media (min-width: 1024px) {
  .term-range-group {
    max-width: 370px;
  }
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: #4299E1;
  border-radius: 50%;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: #4299E1;
  border-radius: 50%;
  cursor: pointer;
}

.range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #4A5568;
  position: relative;
  margin-top: 8px;
  height: 20px;
  font-weight: 500;
}

.range-labels button {
  position: absolute;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.range-labels button:hover {
  color: #4299E1;
}

.range-labels button:nth-child(1) { left: 0%; }
.range-labels button:nth-child(2) { left: 33.33%; transform: translateX(-50%);}
.range-labels button:nth-child(3) { left: 66.66%; transform: translateX(-50%);}
.range-labels button:nth-child(4) { left: 100%; transform: translateX(-100%);}

.term-labels {
  justify-content: space-between;
}

.term-labels span {
  position: static;
  transform: none;
}

.select-wrapper {
  position: relative;
  margin-bottom: 4px;
}

select {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #F8FAFC;
  appearance: none;
  cursor: pointer;
}

.select-wrapper::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #4A5568;
  pointer-events: none;
}

.error-text {
  color: #E53E3E;
  font-size: 14px;
  margin-top: 4px;
}

.form-input {
  width: calc(100% - 24px);
  padding: 12px;
  font-size: 16px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #F8FAFC;
}

.form-input::placeholder {
  color: #A0AEC0;
}

.terms {
  font-size: 14px;
  color: #4A5568;
  margin-bottom: 24px;
  line-height: 1.5;
}

.link {
  color: #4299E1;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
}

.submit-button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: #1A202C;
  background-color: #FCD34D;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.submit-button:hover {
  background-color: #F6E05E;
}

.submit-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #1A202C;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.summary-item {
  margin-bottom: 24px;
}

.summary-item > div:first-child {
  font-size: 14px;
  color: #4A5568;
}

.large-text {
  font-size: 24px;
  font-weight: 600;
  margin-top: 4px;
  color: #1A202C;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background-color: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress {
  height: 100%;
  background-color: #48BB78;
  border-radius: 4px;
}

.bonus {
  font-size: 14px;
  color: #48BB78;
  margin-top: 4px;
}

.success-message {
  color: #2ecc71;
  font-size: 16px;
  padding: 15px 20px;
  background-color: rgba(46, 204, 113, 0.1);
  border-radius: 8px;
  text-align: center;
  margin: 15px 0;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}

.phone-input-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  background-color: #F8FAFC;
}

.phone-prefix {
  padding: 12px;
  border-right: 1px solid #E2E8F0;
  color: #4A5568;
  user-select: none;
  font-size: 16px;
}

.phone-input {
  border: none !important;
  border-radius: 0 8px 8px 0 !important;
  width: auto !important;
  flex: 1;
}

.phone-input:focus {
  outline: none;
}

.phone-input-wrapper:focus-within {
  border-color: #4299E1;
}

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}
