.calculator {
  background: var(--ifm-background-surface-color);
  border: 1px solid var(--ifm-color-emphasis-300);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Mode Toggle */
.modeToggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  justify-content: center;
}

.modeToggle button {
  flex: 1;
  max-width: 180px;
  padding: 0.5rem 1rem;
  border: 1px solid var(--ifm-color-emphasis-300);
  background: var(--ifm-background-color);
  color: var(--ifm-color-emphasis-800);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.modeToggle button:hover {
  border-color: var(--ifm-color-primary);
  transform: translateY(-2px);
}

.modeToggle button.active {
  background: var(--ifm-color-primary);
  color: white;
  border-color: var(--ifm-color-primary);
}

/* Controls */
.controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.control {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.control label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.label {
  font-weight: 600;
  color: var(--ifm-color-emphasis-800);
  font-size: 0.95rem;
}

.value {
  font-weight: 700;
  color: var(--ifm-color-primary);
  font-size: 1.1rem;
  min-width: 80px;
  text-align: right;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: var(--ifm-color-emphasis-200);
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ifm-color-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(37, 194, 160, 0.1);
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--ifm-color-primary);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.slider::-moz-range-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 0 8px rgba(37, 194, 160, 0.1);
}

.playerSlider::-webkit-slider-thumb {
  background: var(--ifm-color-warning);
}

.playerSlider::-moz-range-thumb {
  background: var(--ifm-color-warning);
}

.hint {
  color: var(--ifm-color-emphasis-600);
  font-size: 0.85rem;
  font-style: italic;
}

.infoBox {
  padding: 1rem;
  background: var(--ifm-color-emphasis-100);
  border-left: 4px solid var(--ifm-color-primary);
  border-radius: 4px;
  font-size: 0.9rem;
  color: var(--ifm-font-color-base);
}

/* Chart */
.chart {
  margin-top: 1.25rem;
}

.chartHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--ifm-color-emphasis-200);
}

.chartTitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ifm-color-emphasis-800);
}

.resultBadge {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.resultLabel {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ifm-color-emphasis-700);
}

.resultValue {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ifm-color-success);
}

.chartContainer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 160px;
  padding: 0.75rem;
  background: var(--ifm-color-emphasis-100);
  border-radius: 6px;
  gap: 2px;
}

.chartBar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  height: 100%;
  position: relative;
}

.coinLabel {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ifm-color-emphasis-700);
  position: absolute;
  top: -18px;
  white-space: nowrap;
}

.bar {
  width: 100%;
  background: var(--ifm-color-primary);
  border-radius: 4px;
  transition: all 0.3s ease;
  position: relative;
  min-height: 2px;
  align-self: flex-end;
}

.bar:hover {
  opacity: 0.8;
  transform: scaleY(1.05);
}

.currentBar {
  box-shadow: 0 0 0 2px var(--ifm-color-emphasis-800);
  z-index: 10;
}

.chartLabel {
  font-size: 0.65rem;
  color: var(--ifm-color-emphasis-600);
  font-weight: 600;
  position: absolute;
  bottom: -20px;
}

/* Responsive */
@media (max-width: 768px) {
  .calculator {
    padding: 1rem;
  }

  .resultValue {
    font-size: 1.25rem;
  }

  .chartContainer {
    height: 120px;
  }

  .coinLabel {
    font-size: 0.6rem;
  }

  .chartTitle {
    font-size: 0.85rem;
  }
}
