* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1600px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
  display: flex;
  flex-direction: column;
}

.container * {
  box-sizing: border-box;
}

/* 头部样式 */
header {
  position: relative;
  margin-bottom: 20px;
  text-align: center;
}

header h1 {
  font-size: 32px;
  margin-bottom: 5px;
}

header p{
  font-size: 16px;
  line-height: 1.6;
  max-width: 95%;
}

.tabs {
  display: flex;
  background-color: #fff;
  border-bottom: 1px solid #dee2e6;
  border-top-right-radius: 12px;
  border-top-left-radius: 12px;
  overflow: hidden;
}

.tab {
  padding: 15px 25px;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
}

.tab.active {
  background-color: white;
  border-bottom: 3px solid #2575fc;
  font-weight: bold;
}

.tab:hover:not(.active) {
  background-color: #e9ecef;
}

.tab-content {
  display: none;
  padding: 20px;
  background: #fff;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

.tab-content.active {
  display: block;
}

h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #343a40;
}

.description {
  background-color: #f8f9fa;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  line-height: 1.6;
  border: 1px solid #eee;
}

.color-inputs {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.color-input {
  display: flex;
  align-items: center;
  gap: 10px;
}


input[type="color"] {
  width: 150px;
  height: 40px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  cursor: pointer;
}

input[type="text"] {
  padding: 11.25px 12px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  width: 150px;
}

button {
  padding: 8.75px 50px;
  background-color: #2575fc;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #1a68e0;
}

.results {
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 5px;
  border: 1px solid #eee;
}

.results h3{
  font-size: 18px;
  margin-top: 20px;
}

.results h3:first-child{
  margin-top: 0px;
}

.results .tip{
  margin-top: 15px;
}

.result-item {
  display: flex;
  align-items: center;
  margin-top: 15px;
}

.result-color {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  border: 1px solid #dee2e6;
  margin-right: 15px;
}

.result-text {
  font-family: monospace;
}

.similarity-meter {
  width: 100%;
  height: 20px;
  background-color: #e9ecef;
  border-radius: 10px;
  margin-top: 10px;
  overflow: hidden;
}

.similarity-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00);
}

.similarity-value {
  text-align: center;
  font-weight: bold;
  margin-top: 5px;
}

.color-picker-container {
  text-align: center;
  margin-top: 30px;
}

#color-picker-canvas {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  cursor: crosshair;
}

.color-picker-preview {
  display: inline-block;
  width: 100px;
  height: 100px;
  border-radius: 5px;
  border: 1px solid #dee2e6;
  margin-top: 20px;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 200px;
  background-color: #555;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

input.error {
  border-color: #ff0000 !important;
  background-color: #ffeeee !important;
}

.error-message {
  color: #ff0000;
  font-size: 0.8rem;
  margin-top: 5px;
  display: none;
}
