/* ========================================
   Palette Cards — 色組卡片
   ======================================== */

.palettes-section {
  margin-bottom: 24px;
}

.palettes-section h2 {
  font-size: 24px;
  margin-bottom: 16px;
  text-align: center;
}

.palettes-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

/* Palette Card */
.palette-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 16px 18px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.palette-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Palette Header */
.palette-header {
  margin-bottom: 8px;
}

.palette-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-heading);
  margin-bottom: 6px;
}

.palette-description {
  font-size: 13px;
  color: #888888;
  margin-bottom: 0;
}

/* Mode Toggle (Light/Dark) */
.mode-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
  justify-content: center;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #F5F3F0;
  color: #888888;
  border: 1.5px solid rgba(0, 0, 0, 0.06);
  border-radius: 100px;
  font-size: var(--font-size-small);
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  min-height: 44px;
}

.mode-btn svg {
  width: 18px;
  height: 18px;
}

.mode-btn:hover {
  background: #EAE8E5;
  border-color: #D4D0CC;
}

.mode-btn.active {
  background: var(--color-button);
  color: #FFFFFF;
  border-color: var(--color-button);
}

.mode-btn:focus-visible {
  outline: 2px solid var(--color-button);
  outline-offset: 2px;
}

/* Color Swatches Grid */
.color-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

/* Single Color Swatch */
.color-swatch {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.color-swatch:hover {
  transform: translateY(-2px);
}

.color-swatch:active {
  transform: translateY(0);
}

.color-preview {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.color-swatch:hover .color-preview {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Icon Demo */
.icon-demo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.icon-circle {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.icon-button {
  width: 48px;
  height: 20px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.color-info {
  margin-top: var(--spacing-xs);
  text-align: center;
}

.color-usage {
  font-size: var(--font-size-small);
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 4px;
}

.color-hex {
  font-size: 12px;
  font-family: 'Courier New', monospace;
  color: #888888;
}

/* Text Demo Area */
.text-demo {
  background: rgba(0, 0, 0, 0.02);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 0;
}

.demo-line-1 {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 8px;
}

.demo-line-2 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  margin-bottom: 0;
}

.demo-line-2 span {
  font-weight: 700;
}

/* Apply Button */
.palette-actions {
  display: flex;
  justify-content: center;
}

.apply-button {
  padding: 12px 32px;
  background: var(--color-button);
  color: #FFFFFF;
  border: none;
  border-radius: 100px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.2s ease;
  min-height: 44px;
  min-width: 140px;
}

.apply-button:hover {
  opacity: 0.9;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.apply-button:active {
  transform: translateY(0);
}

.apply-button:focus-visible {
  outline: 2px solid var(--color-button);
  outline-offset: 2px;
}
