* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: #f8f9fa;
  color: #333;
  padding: 20px;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

h2 {
  margin-bottom: 10px;
  color: #2c3e50;
}

h3 {
  margin: 20px 0 10px;
  color: #2c3e50;
}

.intro {
  text-align: center;
  margin-bottom: 25px;
  color: #555;
}

/* Color inputs */
.color-inputs {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 30px;
  justify-content: center;
}

.input-group {
  display: flex;
  flex-direction: column;
  width: 30%;
  min-width: 150px;
}

label {
  margin-bottom: 8px;
  font-weight: 600;
}

input[type="number"] {
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

/* Color display */
.color-display {
  display: flex;
  gap: 30px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.color-box-wrapper {
  flex: 1;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px;
  border-radius: 8px;
  background-color: #f8f9fa;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.color-box {
  width: 150px;
  height: 150px;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.color-value {
  font-family: monospace;
  font-size: 16px;
  padding: 8px 12px;
  background-color: #f1f3f5;
  border-radius: 4px;
  margin-bottom: 10px;
}

.gamut-notice {
  color: #e74c3c;
  font-weight: bold;
  font-size: 14px;
  padding: 5px 10px;
  background-color: #fdedec;
  border-radius: 4px;
  display: none;
}

/* Presets */
.presets {
  margin-top: 20px;
  text-align: center;
}

.preset-btn {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 8px 12px;
  margin: 5px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.preset-btn:hover {
  background-color: #2980b9;
}

.explanation {
  background-color: #f1f8e9;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 25px;
}

.explanation p {
  margin-bottom: 10px;
}

/* Hide canvas element visually but keep it in DOM for color conversion */
#color-canvas {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 650px) {
  .color-display {
    flex-direction: column;
  }
  
  .color-box-wrapper {
    width: 100%;
  }
  
  .input-group {
    width: 100%;
  }
}