.km-to-miles-tool {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 30px 15px;
  background: linear-gradient(135deg, #20c3b1 0%, #ff5858 100%);
  color: white;
  border-radius: 20px;
  max-width: 850px;
  margin: 40px auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.converter-card {
  background: rgba(255, 255, 255, 0.97);
  color: #333;
  padding: 30px 20px;
  border-radius: 20px;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.tool-title {
  font-size: 30px;
  font-weight: bold;
  background: linear-gradient(90deg, #f7971e, #ffd200);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 10px;
}

.tool-subtitle {
  font-size: 16px;
  margin-bottom: 25px;
  color: #666;
}

.converter-inputs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.input-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 230px;
}

.input-group label {
  margin-bottom: 6px;
  font-weight: 600;
  color: #e91e63;
}

.input-group input {
  padding: 12px 15px;
  font-size: 16px;
  width: 100%;
  border-radius: 10px;
  border: 2px solid rgba(255, 85, 85, 0.3);
  transition: 0.3s;
  background: #fdfdfd;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.input-group input:focus {
  border-color: #ff4081;
  outline: none;
  box-shadow: 0 0 8px rgba(255, 64, 129, 0.4);
}

.swap-btn {
  background: linear-gradient(145deg, #ff416c, #ff4b2b);
  color: white;
  font-size: 22px;
  padding: 12px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
  margin-bottom: 10px;
}

.swap-btn:hover {
  transform: scale(1.05);
}

.button-row {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.action-btn {
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.convert {
  background: linear-gradient(135deg, #ffb347, #ffcc33);
  color: white;
}

.reset {
  background: linear-gradient(135deg, #ffe259, #ffa751);
  color: #333;
}

.copy {
  background: linear-gradient(135deg, #f857a6, #ff5858);
  color: white;
}

.convert:hover,
.reset:hover,
.copy:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.result-display {
  margin-top: 35px;
  font-size: 26px;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.8);
  color: #e91e63;
  padding: 15px 20px;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.history-box {
  margin-top: 30px;
  text-align: left;
}

.history-box h3 {
  margin-bottom: 12px;
  font-size: 18px;
  color: #444;
}

.history-box ul {
  list-style: none;
  padding-left: 0;
}

.history-box li {
  background: #ffe9ec;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-radius: 8px;
  font-size: 15px;
  color: #c2185b;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.formula-info {
  margin-top: 30px;
  font-size: 16px;
  color: #555;
  font-weight: 500;
  background: #fce4ec;
  padding: 12px;
  border-radius: 10px;
}

@media (max-width: 600px) {
  .input-group {
    width: 100%;
  }

  .converter-inputs {
    flex-direction: column;
  }

  .button-row {
    flex-direction: column;
    gap: 10px;
  }
}
