html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

.converter {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px;
}

#converter-title {
  text-align: center;
  font-size: 28px;
  margin: 0 0 8px 0;
  color: #1a202c;
}

.converter-desc {
  text-align: center;
  color: #718096;
  font-size: 14px;
  margin: 0 0 24px 0;
}

.input-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.input-group {
  flex: 1;
  display: flex;
  gap: 8px;
  align-items: center;
}

.input-value {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  font-size: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #ffffff;
  color: #2d3748;
  box-sizing: border-box;
}

.input-value:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.input-unit {
  padding: 12px 12px;
  font-size: 16px;
  border: 2px solid #cbd5e0;
  border-radius: 10px;
  outline: none;
  background: #ffffff;
  color: #2d3748;
  cursor: pointer;
  min-width: 120px;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-unit:focus {
  border-color: #1a73e8;
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.15);
}

.swap-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 2px solid #cbd5e0;
  border-radius: 10px;
  background: #f7fafc;
  color: #4a5568;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}

.swap-btn:hover {
  background: #ebf4ff;
  border-color: #1a73e8;
  color: #1a73e8;
  transform: rotate(180deg);
}

.presets {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.presets-label {
  font-size: 13px;
  color: #718096;
  white-space: nowrap;
}

.preset-btn {
  padding: 6px 14px;
  font-size: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: #f7fafc;
  color: #4a5568;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.preset-btn:hover {
  background: #ebf4ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

.preset-btn:active {
  background: #1a73e8;
  color: #ffffff;
  border-color: #1a73e8;
}

.results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.results-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #a0aec0;
  padding: 32px 0;
  font-size: 15px;
}

.result-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.result-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-label {
  font-size: 13px;
  color: #718096;
  white-space: nowrap;
  min-width: 64px;
}

.result-value {
  flex: 1;
  font-size: 18px;
  font-weight: 600;
  color: #2d3748;
  word-break: break-all;
  min-width: 0;
}

.result-copy-btn {
  flex-shrink: 0;
  padding: 5px 12px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f7fafc;
  color: #4a5568;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.result-copy-btn:hover {
  background: #ebf4ff;
  border-color: #1a73e8;
  color: #1a73e8;
}

.result-copy-btn.copied {
  background: #c6f6d5;
  border-color: #38a169;
  color: #276749;
}

@media (max-width: 480px) {
  .converter {
    padding: 16px 12px;
  }

  #converter-title {
    font-size: 22px;
  }

  .input-area {
    flex-direction: column;
    gap: 8px;
  }

  .input-group {
    flex-direction: column;
    width: 100%;
  }

  .input-value {
    width: 100%;
    font-size: 18px;
  }

  .input-unit {
    width: 100%;
  }

  .swap-btn {
    align-self: center;
    transform: rotate(90deg);
  }

  .swap-btn:hover {
    transform: rotate(270deg);
  }

  .results {
    grid-template-columns: 1fr;
  }

  .result-card {
    padding: 12px 14px;
  }

  .result-value {
    font-size: 16px;
  }
}
