.calculator {
  margin: 100px 0;
  padding: 80px 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
  position: relative;
  overflow: hidden;
}

.calculator::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 20%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 70% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.calculator .container {
  position: relative;
  z-index: 1;
}

.calculator__wrapper {
  position: relative;
  overflow: auto;
  padding: 60px 50px 0px 50px;
}

.calculator__title {
  text-transform: uppercase;
  font-weight: 700;
  font-size: 60px;
  line-height: 1.2;
  text-align: center;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.calculator__subtitle {
  font-size: 20px;
  line-height: 1.5;
  text-align: center;
  color: #4a5568;
  max-width: 600px;
  margin: 0 auto;
}

.calculator__inner {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  align-items: center;
}

.controls {
  max-width: 515px;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 24px;
  padding: 40px 35px;
  box-shadow: 0px 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.controls:hover {
  transform: translateY(-3px);
  box-shadow: 0px 25px 70px rgba(0, 0, 0, 0.15);
}

.control__wrapper:first-child {
  margin-bottom: 40px;
}

.control__wrapper {
  position: relative;
}

.control__name {
  font-size: 20px;
  line-height: 1.4;
  color: #2d3748;
  margin-bottom: 24px;
  font-weight: 600;
}

.irs--flat .irs-line {
  height: 10px !important;
  background: linear-gradient(270deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%) !important;
  border-radius: 10px !important;
  box-shadow: inset 0px 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.irs--flat .irs-bar {
  height: 10px !important;
  background: linear-gradient(270deg, #667eea 0%, #764ba2 100%) !important;
  border-radius: 10px !important;
  box-shadow: 0px 2px 8px rgba(102, 126, 234, 0.4) !important;
}

.irs--flat .irs-min,
.irs--flat .irs-max {
  display: none !important;
}

.irs--flat .irs-handle {
  cursor: pointer !important;
  top: 15px !important;
  width: 32px !important;
  height: 32px !important;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
  border: 3px solid #667eea !important;
  border-radius: 50% !important;
  box-shadow: 0px 4px 12px rgba(102, 126, 234, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.3s ease !important;
}

.irs--flat .irs-handle:hover {
  transform: scale(1.1) !important;
  box-shadow: 0px 6px 20px rgba(102, 126, 234, 0.5), 0px 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.irs--flat .irs-handle.state_hover {
  transform: scale(1.1) !important;
}

.irs--flat .irs-handle i {
  display: none !important;
}

.irs--flat .irs-handle::after {
  position: absolute;
  content: '';
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  box-shadow: inset 0px 1px 2px rgba(0, 0, 0, 0.2);
}

.irs--flat .irs-from,
.irs--flat .irs-to,
.irs--flat .irs-single {
  top: -35px !important;
  font-size: 32px !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: #667eea !important;
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px) !important;
  padding: 8px 16px !important;
  border-radius: 12px !important;
  box-shadow: 0px 4px 12px rgba(102, 126, 234, 0.2) !important;
  border: 1px solid rgba(102, 126, 234, 0.2) !important;
  white-space: nowrap !important;
}

.irs--flat .irs-from:before,
.irs--flat .irs-to:before,
.irs--flat .irs-single:before {
  display: none !important;
}

.control__range {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
}

.control__range span {
  font-size: 16px;
  line-height: 1.4;
  color: #4a5568;
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(102, 126, 234, 0.1);
}

.output-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 480px;
  width: 100%;
}

.output-column .btn {
  width: 100%;
  padding: 18px 30px;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.output {
  max-width: 480px;
  width: 100%;
  min-width: 400px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 24px;
  padding: 50px 35px;
  box-shadow: 0px 20px 60px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.output:hover {
  transform: translateY(-5px);
  box-shadow: 0px 25px 70px rgba(102, 126, 234, 0.4);
}

.output::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.output > * {
  position: relative;
  z-index: 1;
}

.output__title {
  font-weight: 500;
  font-size: 22px;
  line-height: 1.4;
  text-align: center;
  color: rgba(255, 255, 255, 0.95);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.output__earn {
  white-space: nowrap;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.2;
  color: #fff;
  text-align: center;
  margin-bottom: 45px;
  text-shadow: 0px 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.output__earn .currency {
  font-size: 48px;
  opacity: 0.95;
}

.output__inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 0;
}

.output__wrapper {
  flex: 1;
  text-align: center;
  padding: 15px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
  min-width: 0;
}

.output__wrapper:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.output__subtitle {
  font-size: 16px;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.output__value {
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #fff;
  text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}

.output__value .currency {
  font-size: 28px;
}

@media (max-width: 1200px) {
  .calculator {
    padding: 60px 0;
  }

  .calculator__title {
    font-size: 48px;
    line-height: 1.2;
  }
  .calculator__subtitle {
    font-size: 18px;
    line-height: 1.5;
  }
  .irs--flat .irs-from,
  .irs--flat .irs-to,
  .irs--flat .irs-single {
    font-size: 26px !important;
    line-height: 1 !important;
    top: -32px !important;
    padding: 6px 12px !important;
  }

  .controls {
    max-width: 460px;
    padding: 35px 30px;
  }

  .output {
    padding: 45px 30px;
    min-width: 380px;
  }

  .output__earn {
    font-size: 48px;
  }

  .output__value {
    font-size: 28px;
  }

  .output__value .currency {
    font-size: 24px;
  }
}

@media (max-width: 1024px) {
  .calculator {
    margin: 50px 0;
    padding: 50px 0;
  }

  .calculator__wrapper {
    padding: 40px 30px 0;
  }

  .control__range span:last-child {
    margin-right: 0;
  }
}

@media (max-width: 1023px) {
  .calculator__inner {
    flex-direction: column-reverse;
    gap: 30px;
  }
  .output {
    max-width: 100%;
    min-width: unset;
    margin-bottom: 0;
  }
  .output__inner {
    max-width: 100%;
    margin: 0 auto;
  }
  .output__subtitle.revenue {
    text-align: center;
  }
  .controls {
    max-width: 100%;
    margin: 0 auto;
  }
  .output-column {
    max-width: 100%;
  }
}
@media (max-width: 767px) {
  .calculator {
    margin: 30px 0;
    padding: 40px 0;
  }

  .calculator__title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 12px;
  }
  .calculator__subtitle {
    font-size: 16px;
    line-height: 1.5;
    padding: 0 20px;
  }

  .calculator__wrapper {
    padding: 30px 15px 0;
  }

  .controls {
    padding: 30px 20px;
    box-shadow: 0px 15px 40px rgba(0, 0, 0, 0.1);
  }

  .output {
    box-shadow: 0px 15px 40px rgba(102, 126, 234, 0.25);
  }

  .output {
    padding: 35px 25px;
  }

  .output__title {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 12px;
  }

  .output__earn {
    font-size: 42px;
    line-height: 1.2;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .output__earn .currency {
    font-size: 36px;
  }

  .output__inner {
    flex-direction: column;
    gap: 20px;
    padding-top: 25px;
  }

  .output__wrapper {
    padding: 20px 15px;
  }

  .output__subtitle {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 8px;
  }

  .output__value {
    font-size: 28px;
    line-height: 1.2;
  }

  .control__name {
    font-size: 18px;
    line-height: 1.4;
    margin-bottom: 20px;
  }

  .irs--flat .irs-from,
  .irs--flat .irs-to,
  .irs--flat .irs-single {
    font-size: 24px !important;
    line-height: 1 !important;
    top: -28px !important;
    padding: 6px 10px !important;
  }

  .irs--flat .irs-handle {
    width: 28px !important;
    height: 28px !important;
    top: 13px !important;
  }

  .control__range {
    margin-top: 15px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .control__range span {
    font-size: 14px;
    line-height: 1.4;
    padding: 5px 10px;
  }

  .control__wrapper:first-child {
    margin-bottom: 30px;
  }

  .output-column {
    gap: 15px;
  }

  .output-column .btn {
    padding: 15px 25px;
    font-size: 16px;
  }
}
