/* colors.css — 色卡类页面统一样式
 * 覆盖：传统色卡 / 日本传统色 / 渐变色导航 / 配色方案
 * 全局布局与 CSS 设计变量由 ../skin/mystyle/css/style.css 提供
 */

/* ---------- 14. 传统色卡页（color-cards.html） ---------- */
.color-head h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 6px 0 8px;
  color: var(--text-main);
}

.color-head .tip {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 14px;
}

.color-filter {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 520px;
  height: 50px;
  padding: 0 20px;
  margin-bottom: 24px;
  background-color: var(--bg-page);
  border-radius: 50px;
  overflow: hidden;
}

.color-filter .bi {
  font-size: 18px;
  color: var(--text-muted);
  margin-right: 10px;
}

.color-filter input {
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 15px;
  color: var(--text-main);
}

/* 4 列网格 */
.color-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.color-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--bg-card);
  border: 8px solid #f8f8f8;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.color-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.color-swatch {
  position: relative;
  width: 100%;
  height: 130px;
}

/* 编号角标：左上角 */
.color-no {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 9px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  color: #1a1a1a;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 6px;
  z-index: 2;
  pointer-events: none;
}

/* 渐变页：左右两色值 */
.color-vals {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.color-val {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
  transition: background 0.18s ease, color 0.18s ease;
}

.color-val:hover {
  background: var(--brand-primary);
  color: #fff;
}

/* ---------- 15. 配色方案页（palette-colors.html） ---------- */
.palette-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  background: var(--bg-card);
  border: 1px solid var(--line-soft);
  border-radius: 50px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tool-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
  background: var(--brand-primary);
  color: #fff;
}

.tool-btn .bi {
  font-size: 16px;
}

.palette-card {
  padding: 0;
  overflow: hidden;
}

.palette-band {
  position: relative;
  display: flex;
  width: 100%;
  height: 150px;
}

.palette-swatch {
  flex: 1 1 0;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  transition: flex-grow 0.18s ease, filter 0.18s ease;
}

.palette-swatch:hover {
  flex-grow: 1.6;
  filter: saturate(1.1);
}

.palette-band .color-no {
  top: auto;
  bottom: 8px;
  left: 8px;
}

.color-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
}

.color-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.color-hex {
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* 复制提示 */
.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(20px);
  padding: 12px 26px;
  background: var(--brand-primary);
  color: #fff;
  font-size: 15px;
  border-radius: 50px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9998;
}

.copy-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 色卡页响应式：列数随宽度收缩，但始终不分页 */
@media screen and (max-width: 1180px) {
  .color-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media screen and (max-width: 768px) {
  .color-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media screen and (max-width: 480px) {
  .color-grid {
    grid-template-columns: 1fr;
  }
}
