/* ColorPreview Pro - 紧凑单屏布局 */

:root {
  --bg-primary: #0d0d12;
  --bg-secondary: #14141c;
  --bg-card: rgba(20, 20, 28, 0.95);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.7);
  --text-muted: rgba(255, 255, 255, 0.45);
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.4);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --radius: 10px;
  --radius-sm: 6px;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 1100px) {
  html, body {
    overflow: auto;
  }
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
}

#particleCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.bg-gradient-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(ellipse at 15% 30%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
  z-index: 0;
}

.container, .container-full {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

.container-full {
  height: calc(100vh - 100px);
  padding: 10px 16px;
}

/* Header */
.header-glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 100;
}

.nav-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
}

.logo-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
}

.color-wheel {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #6366f1, #8b5cf6, #a78bfa, #6366f1);
  animation: spin 8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.logo-text h1 {
  font-size: 16px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-subtitle {
  font-size: 9px;
  color: #a78bfa;
  font-weight: 600;
  letter-spacing: 2px;
  margin-left: 4px;
}

.nav-actions {
  display: flex;
  gap: 8px;
}

.nav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  position: relative;
}

.nav-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
  color: var(--text-primary);
}

.badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: linear-gradient(135deg, #ec4899, #f43f5e);
  color: white;
  font-size: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Workspace - 调整布局比例 */
.workspace-compact {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  gap: 10px;
  height: 100%;
}

/* 左侧控制面板 */
.control-panel-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  overflow: hidden;
}

/* 模式切换 */
.mode-switch-compact {
  display: flex;
  gap: 4px;
}

.mode-btn-compact {
  flex: 1;
  padding: 6px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 9px;
  transition: all 0.2s;
}

.mode-btn-compact i {
  font-size: 12px;
}

.mode-btn-compact:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.mode-btn-compact.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* 控制区域 */
.controls-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-row {
  display: flex;
  gap: 6px;
}

.input-group-compact {
  flex: 1;
}

.input-group-compact label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.hex-input-compact {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 6px;
}

.hex-input-compact span {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
}

.hex-input-compact input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 5px 3px;
  outline: none;
  width: 55px;
}

.hex-input-compact.small input {
  width: 45px;
}

.color-dot {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.picker-group {
  width: 45px;
}

.picker-group label {
  text-align: center;
}

.picker-group {
  position: relative;
}

.picker-group input[type="color"] {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.picker-btn {
  width: 100%;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.picker-btn:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

/* 滑块 */
.slider-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slider-item-compact {
  display: flex;
  align-items: center;
  gap: 5px;
}

.slider-label {
  width: 12px;
  font-size: 9px;
  font-weight: 600;
  font-family: 'JetBrains Mono', monospace;
}

.slider-label.r { color: #ef4444; }
.slider-label.g { color: #22c55e; }
.slider-label.b { color: #3b82f6; }
.slider-label.a { color: var(--text-muted); }

.color-slider {
  flex: 1;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  outline: none;
}

.color-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 0 6px var(--accent-glow);
}

.slider-num {
  width: 36px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 3px;
  text-align: center;
}

/* 预设 */
.preset-section {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.preset-section label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 4px;
  flex-shrink: 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-content: start;
  overflow: hidden;
}

.preset-color {
  height: 0;
  padding-bottom: 100%;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
  position: relative;
}

.preset-color:hover {
  transform: scale(1.12);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 1;
}

/* 渐变控制 */
.gradient-type-row {
  display: flex;
  gap: 4px;
}

.gradient-type-btn {
  flex: 1;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  transition: all 0.2s;
}

.gradient-type-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

.angle-row label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.angle-row label span {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.angle-slider {
  width: 100%;
  height: 5px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.angle-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

.gradient-colors-row {
  display: flex;
  align-items: flex-end;
  gap: 5px;
}

.gradient-color-input {
  flex: 1;
}

.gradient-color-input label {
  display: block;
  font-size: 8px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.gradient-picker {
  width: 100%;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  background: transparent;
  margin-top: 3px;
}

.swap-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  font-size: 10px;
}

.swap-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

.gradient-presets-row label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.gradient-presets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.gradient-preset {
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
}

.gradient-preset:hover {
  transform: scale(1.05);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* 调色板 */
.palette-desc {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  color: var(--text-muted);
  padding: 6px 8px;
  background: rgba(99, 102, 241, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.palette-desc i {
  color: var(--accent);
}

.palette-base-row {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.palette-base-row label {
  display: block;
  font-size: 9px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.palette-base-row .hex-input-compact {
  flex: 1;
}

.palette-picker-btn {
  width: 32px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: transparent;
  flex-shrink: 0;
}

.palette-modes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.palette-mode-btn {
  padding: 5px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: all 0.2s;
}

.palette-mode-btn .palette-icon {
  font-weight: 600;
  font-size: 9px;
}

.palette-mode-btn .palette-hint {
  font-size: 7px;
  opacity: 0.7;
}

.palette-mode-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

.palette-mode-btn:hover {
  background: rgba(99, 102, 241, 0.1);
}

.palette-result {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.palette-color {
  width: 40px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
  position: relative;
}

.palette-color:hover {
  transform: scale(1.1);
  border-color: white;
  box-shadow: 0 0 10px var(--accent-glow);
}

.palette-color .copy-icon {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 16px;
  height: 16px;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
  cursor: pointer;
  z-index: 2;
}

.palette-color:hover .copy-icon {
  opacity: 1;
}

.palette-color .copy-icon i {
  color: white;
  font-size: 8px;
}

.palette-color::after {
  content: attr(data-hex);
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 7px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  white-space: nowrap;
}

.palette-export {
  margin-top: 4px;
}

.export-btn {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.2s;
}

.export-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
  color: var(--text-primary);
}

/* 中间预览区 - 进一步缩小 */
.preview-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-main {
  flex: 0.6;
  min-height: 0;
  background: #165DFF;
  border-radius: var(--radius);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
  overflow: hidden;
}

.preview-main::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
}

.preview-info {
  position: relative;
  z-index: 1;
}

.preview-hex {
  display: block;
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  text-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.preview-rgb {
  display: block;
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.8);
}

.preview-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
  z-index: 1;
}

.action-btn {
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(10px);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 11px;
}

.action-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: scale(1.05);
}

.preview-bottom {
  flex: 0.4;
  min-height: 0;
}

.preview-details-panel {
  display: flex;
  gap: 8px;
  height: 100%;
}

.detail-section {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.contrast-score {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  padding: 3px 10px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-weight: 600;
}

.contrast-samples {
  display: flex;
  gap: 8px;
  flex: 1;
}

.contrast-sample {
  flex: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.contrast-sample.light {
  background: #ffffff;
  color: #165DFF;
}

.contrast-sample.dark {
  background: #1a1a2e;
  color: #165DFF;
}

.sample-text {
  font-size: 20px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
}

.sample-label {
  font-size: 9px;
  opacity: 0.6;
  font-weight: 400;
}

.component-buttons {
  display: flex;
  gap: 8px;
  flex: 1;
  align-items: center;
}

.btn-compact {
  flex: 1;
  padding: 10px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  letter-spacing: 0.3px;
}

.btn-compact.primary {
  background: #165DFF;
  color: white;
}

.btn-compact.primary:hover {
  box-shadow: 0 0 12px rgba(22, 93, 255, 0.4);
  transform: translateY(-1px);
}

.btn-compact.secondary {
  background: rgba(22, 93, 255, 0.12);
  color: #165DFF;
}

.btn-compact.secondary:hover {
  background: rgba(22, 93, 255, 0.2);
}

.btn-compact.outline {
  background: transparent;
  border: 1.5px solid #165DFF;
  color: #165DFF;
}

.btn-compact.outline:hover {
  background: rgba(22, 93, 255, 0.08);
}

/* 右侧代码区 - 增大 */
.code-panel-compact {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.code-section, .info-section, .history-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.code-header, .info-header, .history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.copy-code-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid var(--accent);
  border-radius: 4px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s;
}

.copy-code-btn:hover {
  background: var(--accent);
}

.code-formats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.code-format-btn {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 9px;
  font-family: 'JetBrains Mono', monospace;
  transition: all 0.2s;
}

.code-format-btn.active {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

.code-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin: 0;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  line-height: 1.6;
  color: var(--text-secondary);
  min-height: 120px;
}

.copy-toast {
  display: none;
  align-items: center;
  gap: 6px;
  padding: 8px;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: var(--radius-sm);
  color: #22c55e;
  font-size: 10px;
}

.copy-toast.show {
  display: flex;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.info-item {
  padding: 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.info-label {
  display: block;
  font-size: 8px;
  color: var(--text-muted);
  margin-bottom: 2px;
  text-transform: uppercase;
}

.info-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  color: var(--text-primary);
}

.history-header .clear-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 9px;
}

.history-header .clear-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #ef4444;
}

.history-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  min-height: 50px;
}

.history-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--text-muted);
  font-size: 9px;
  padding: 15px 0;
}

.history-color {
  aspect-ratio: 1;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.15s;
  position: relative;
}

.history-color:hover {
  transform: scale(1.1);
  box-shadow: 0 0 6px var(--accent-glow);
}

.history-color .delete-x {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 14px;
  height: 14px;
  background: #ef4444;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  color: white;
}

.history-color:hover .delete-x {
  display: flex;
}

/* Footer */
.footer-compact {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 8px 0;
  position: relative;
  z-index: 1;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
}

.footer-brand .logo-icon.small {
  width: 18px;
  height: 18px;
}

.footer-links {
  display: flex;
  gap: 8px;
}

.footer-links a {
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 10px;
}

.footer-links a:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
  color: var(--text-primary);
}

.footer-legal {
  display: flex;
  gap: 12px;
}

.footer-legal a {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 9px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-legal a:hover {
  color: var(--accent);
}

.footer-legal img {
  width: 10px;
  height: 10px;
}

.hidden {
  display: none !important;
}

/* 响应式 - 完善移动端适配 */
@media (max-width: 1360px) {
  .workspace-compact {
    grid-template-columns: 240px 1fr 300px;
  }
}

@media (max-width: 1200px) {
  .workspace-compact {
    grid-template-columns: 220px 1fr 280px;
  }
}

@media (max-width: 1100px) {
  .workspace-compact {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  
  .container-full {
    height: auto;
    min-height: calc(100vh - 100px);
    padding: 10px 12px;
  }
  
  .control-panel-compact, .code-panel-compact {
    max-height: none;
  }
  
  .preview-main {
    min-height: 120px;
  }
  
  .preview-compact {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 10px;
  }
  
  .container-full {
    padding: 8px 10px;
    min-height: calc(100vh - 90px);
  }
  
  .nav-content {
    padding: 8px 0;
  }
  
  .logo-icon {
    width: 24px;
    height: 24px;
  }
  
  .logo-text h1 {
    font-size: 14px;
  }
  
  .logo-subtitle {
    display: none;
  }
  
  .nav-btn {
    width: 36px;
    height: 36px;
  }
  
  .workspace-compact {
    gap: 8px;
  }
  
  .control-panel-compact {
    padding: 8px;
  }
  
  .code-panel-compact {
    padding: 10px;
  }
  
  .preview-main {
    min-height: 100px;
    padding: 10px;
  }
  
  .preview-hex {
    font-size: 18px;
  }
  
  .preview-rgb {
    font-size: 9px;
  }
  
  .preview-bottom {
    flex: none;
  }
  
  .preview-details-panel {
    flex-direction: column;
    gap: 6px;
  }
  
  .detail-section {
    padding: 10px;
  }
  
  .contrast-sample {
    padding: 8px;
  }
  
  .sample-text {
    font-size: 16px;
  }
  
  .btn-compact {
    padding: 10px 6px;
    font-size: 11px;
  }
  
  .footer-compact {
    padding: 6px 0;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }
  
  .footer-legal {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }
  
  .footer-legal a {
    font-size: 8px;
  }
  
  .footer-links {
    display: none;
  }
  
  .preset-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 2px;
  }
  
  .preset-color {
    padding-bottom: 80%;
  }
  
  .preset-color:nth-child(n+13) {
    display: none;
  }
  
  .history-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  
  .palette-modes {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .gradient-colors-row {
    flex-wrap: wrap;
  }
  
  .gradient-color-input {
    min-width: 80px;
  }
  
  .slider-item-compact {
    gap: 4px;
  }
  
  .slider-num {
    width: 34px;
  }
}

@media (max-width: 480px) {
  .container-full {
    padding: 6px 8px;
  }
  
  .preview-hex {
    font-size: 16px;
  }
  
  .mode-btn-compact {
    padding: 5px 3px;
    font-size: 8px;
  }
  
  .mode-btn-compact i {
    font-size: 10px;
  }
  
  .preset-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
  }
  
  .code-formats {
    gap: 3px;
  }
  
  .history-grid {
    gap: 3px;
  }
  
  .code-format-btn {
    padding: 3px 6px;
    font-size: 8px;
  }
  
  .code-display {
    font-size: 10px;
    padding: 8px;
    min-height: 90px;
  }
  
  .info-grid {
    gap: 4px;
  }
  
  .info-item {
    padding: 6px;
  }
  
  .info-value {
    font-size: 9px;
  }
  
  .footer-legal a {
    font-size: 8px;
  }
}