/* Modern & Refined Palette Styles */
* {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fcfcfc;
  margin: 0;
  padding: 40px 20px;
  color: #1a1a1a;
}

.container {
  max-width: 1000px;
  margin: auto;
}

h1 { 
  text-align: center; 
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 10px;
  font-size: 2rem;
  color: #111;
}

.site-description {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
  max-width: 600px;
  margin: 0 auto 40px auto;
  line-height: 1.5;
}

/* Category Buttons */
.controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.controls button {
  padding: 6px 16px;
  border: 1px solid #eee;
  background: white;
  cursor: pointer;
  border-radius: 100px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.85rem;
  font-weight: 500;
  color: #666;
}

.controls button:hover {
  background: #f5f5f5;
  color: #111;
  border-color: #ddd;
}

.controls button.active {
  background: #111;
  color: white;
  border-color: #111;
}

/* Palette Grid */
.palette-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 60px;
}

/* Color Card Item */
.color-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: white;
  border: 1px solid #f0f0f0;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.color-item:hover {
  border-color: #e0e0e0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transform: translateY(-2px);
}

.color-swatch {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 8px;
  margin-right: 20px;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
  cursor: pointer;
}

.color-info {
  display: flex;
  gap: 8px;
  flex-grow: 1;
  align-items: center;
  justify-content: flex-start; /* space-between 대신 flex-start로 변경 */
  flex-wrap: wrap; /* 추가: 공간이 부족할 경우 줄바꿈 허용 */
}

/* Information Boxes */
.info-box {
  padding: 6px 10px;
  background: #f9f9f9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-weight: 500;
  color: #555;
  border: 1px solid transparent;
  transition: all 0.15s;
  flex: 0 1 auto; /* flex: 1 대신 변경 */
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-box:hover {
  background: #f0f0f0;
  border-color: #ddd;
  color: #111;
}

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
}

footer a {
  color: #555;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body { padding: 20px 10px; }
  .color-swatch { width: 40px; height: 40px; min-width: 40px; margin-right: 12px; }
  .info-box { 
    font-size: 0.7rem; 
    padding: 4px 6px;
  }
  .color-info { gap: 4px; }
}

@media (max-width: 480px) {
  /* .info-box:nth-child(3) { display: none; } 이 부분 제거 */
}

/* Toast Notification Styling */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  color: white;
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  z-index: 1000;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translate(-50%, 20px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}
