/* 基础重置 */
/** {*/
/*  margin: 0;*/
/*  padding: 0;*/
/*  box-sizing: border-box;*/
/*}*/

/*body {*/
/*  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;*/
/*  line-height: 1.6;*/
/*  color: #333;*/
/*  background-color: #f8f9fa;*/
/*  padding: 20px;*/
/*  max-width: 1200px;*/
/*  margin: 0 auto;*/
/*}*/

/*.container {*/
/*  background-color: white;*/
/*  border-radius: 10px;*/
/*  box-shadow: 0 2px 15px rgba(0,0,0,0.1);*/
/*  padding: 25px;*/
/*}*/

h1 {
  text-align: center;
  margin-bottom: 25px;
  color: #2c3e50;
}

/* 输入区域 */
.input-group {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

#color-input {
  flex: 1;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
}

.btn {
  padding: 12px 20px;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  transition: background-color 0.3s;
}

.btn:hover {
  background-color: #2980b9;
}

/* 颜色预览 */
#color-preview {
  height: 60px;
  width: 100%;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  background-color: #86dda4;
}

/* 画布选择器 */
.color-canvas-container {
  display: none; /* 初始隐藏 */
  margin-bottom: 25px;
  text-align: center;
}

#color-canvas {
  border: 1px solid #ddd;
  border-radius: 5px;
  margin-bottom: 15px;
  cursor: crosshair;
}

#canvas-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

#current-color {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ddd;
}

/* 结果网格 */
.results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.result-item {
  background-color: #f1f8ff;
  padding: 15px;
  border-radius: 5px;
  border-left: 4px solid #3498db;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.copy-btn {
  padding: 6px 12px;
  background-color: #2ecc71;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s;
}

.copy-btn:hover {
  background-color: #27ae60;
}

.result-item span {
  display: block;
}

.result-item span:first-child {
  font-weight: bold;
  margin-bottom: 5px;
  color: #2c3e50;
}

.value {
  font-family: 'Courier New', monospace;
  color: #e74c3c;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .results-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .input-group {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  #color-canvas {
    width: 100%;
    height: auto;
  }
}
