* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: #f0f0f0;
  gap: 20px;
  padding: 20px;
}

.calculator {
  background-color: #333;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  width: 320px;
}

.display {
  background-color: #444;
  color: #fff;
  padding: 20px;
  text-align: right;
  font-size: 24px;
  margin-bottom: 20px;
  border-radius: 5px;
  min-height: 60px;
  word-wrap: break-word;
}

.display input {
  width: 100%;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  text-align: right;
  outline: none;
  padding: 0;
}

.display input::-webkit-inner-spin-button,
.display input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.display input[type=number] {
  -moz-appearance: textfield;
}

.display input:focus {
  outline: none;
}

.display input::placeholder {
  color: #fff;
  opacity: 0.5;
}

.display input:focus::placeholder {
  opacity: 0;
}

.vat-rate {
  margin-bottom: 20px;
  padding: 10px;
  background-color: #444;
  border-radius: 5px;
  color: #fff;
}

.vat-rate label {
  display: block;
  margin-bottom: 8px;
  color: #aaa;
}

.vat-rate-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vat-rate input[type="range"] {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  background: #666;
  border-radius: 5px;
  outline: none;
}

.vat-rate input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #ff9500;
  border-radius: 50%;
  cursor: pointer;
}

.vat-rate input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  background: #ff9500;
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.vat-rate-value {
  min-width: 45px;
  text-align: right;
  font-weight: bold;
}

.buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.operators {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
}

button {
  padding: 15px;
  font-size: 18px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background-color: #666;
  color: white;
  transition: background-color 0.2s;
}

button:hover {
  background-color: #777;
}

.operator {
  background-color: #ff9500;
}

.operator:hover {
  background-color: #ffaa33;
}

.equals {
  background-color: #2196F3;
}

.equals:hover {
  background-color: #1976D2;
}

.clear {
  background-color: #f44336;
}

.clear:hover {
  background-color: #d32f2f;
}

.result {
  font-size: 16px;
  color: #fff;
  text-align: left;
  min-height: 80px;
  width: 320px;
  background-color: #333;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.result-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #444;
}

.result-line:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.result-label {
  color: #aaa;
}

.result-value {
  color: #fff;
  font-weight: bold;
}

.credits {
  position: fixed;
  bottom: 20px;
  font-size: 14px;
  color: #666;
  z-index: 100;
}

.credits-right {
  right: 20px;
}

.credits-left {
  left: 20px;
}

.credits a {
  color: #ff9500;
  text-decoration: none;
  font-weight: bold;
}

.credits a:hover {
  text-decoration: underline;
}

@media (max-width: 360px) {
  .credits {
      position: static;
      text-align: center;
      margin-top: 20px;
      width: 100%;
  }

  .credits-right, .credits-left {
      position: static;
      right: auto;
      left: auto;
      display: inline-block;
  }

  .credits-left {
      margin-right: 20px;
  }
}