/* Variables */
:root {
  --primary: #3B82F6;
  --secondary: #10B981;
  --accent: #F59E0B;
  --bg: #FFFFFF;
  --surface: #F9FAFB;
  --text: #111827;
  --text-light: #6B7280;
  --border: #E5E7EB;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: linear-gradient(135deg, var(--primary), #2563EB);
  border-radius: 16px;
  color: white;
  margin-bottom: 30px;
  box-shadow: var(--shadow-lg);
}

.header-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 14px;
  opacity: 0.9;
}

.btn-back {
  padding: 10px 20px;
  background: rgba(255,255,255,0.2);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}

.btn-back:hover {
  background: rgba(255,255,255,0.3);
  transform: translateY(-2px);
}

/* Quick Nav */
.quick-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.quick-nav a {
  padding: 8px 16px;
  background: white;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  border: 2px solid var(--border);
}

.quick-nav a:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Sections */
.section {
  background: white;
  padding: 30px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.section h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--primary);
}

.section h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

/* Steps */
.steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.step {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 4px solid var(--primary);
}

.step-number {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  flex-shrink: 0;
}

.step h3 {
  margin-bottom: 4px;
}

.step code {
  background: rgba(59,130,246,0.1);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.feature {
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.feature:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature h3 {
  margin-bottom: 12px;
  color: var(--primary);
}

.feature ul {
  margin-left: 20px;
  margin-top: 8px;
}

.feature li {
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--text-light);
}

.code {
  background: #1F2937;
  color: #10B981;
  padding: 8px 12px;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 12px;
  margin-top: 8px;
  display: inline-block;
}

/* Badges */
.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.badge.exact {
  background: #D1FAE5;
  color: #065F46;
}

.badge.close {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge.far {
  background: #FEF3C7;
  color: #92400E;
}

/* Palette Types */
.palette-types {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.palette-type {
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid var(--border);
  text-align: center;
  transition: all 0.2s;
}

.palette-type:hover {
  border-color: var(--primary);
  transform: scale(1.05);
}

.palette-type.special {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(16,185,129,0.1));
  border-color: var(--primary);
}

.palette-type .icon {
  font-size: 32px;
  display: block;
  margin-bottom: 8px;
}

.palette-type h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.palette-type p {
  font-size: 12px;
  color: var(--text-light);
}

/* Feature Highlight */
.feature-highlight {
  background: linear-gradient(135deg, rgba(59,130,246,0.05), rgba(16,185,129,0.05));
  padding: 24px;
  border-radius: 12px;
  border: 2px solid var(--primary);
  margin-top: 24px;
}

.feature-highlight pre {
  background: #1F2937;
  color: #10B981;
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 12px 0;
}

.feature-highlight code {
  font-family: 'Consolas', monospace;
  font-size: 13px;
}

.tip {
  background: rgba(245,158,11,0.1);
  color: #92400E;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  margin-top: 12px;
  border-left: 4px solid var(--accent);
}

/* Shortcuts */
.shortcuts {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.shortcut {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid var(--border);
}

kbd {
  padding: 4px 10px;
  background: #374151;
  color: white;
  border-radius: 6px;
  font-family: 'Consolas', monospace;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.mouse {
  font-size: 18px;
  font-weight: 700;
}

/* Tips Section */
.tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.tip-card {
  display: flex;
  gap: 12px;
  padding: 16px;
  background: var(--surface);
  border-radius: 12px;
  border: 2px solid var(--border);
  transition: all 0.2s;
}

.tip-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.tip-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.tip-card h3 {
  font-size: 14px;
  margin-bottom: 4px;
}

.tip-card p {
  font-size: 13px;
  color: var(--text-light);
}

/* FAQ */
.faq {
  margin-top: 20px;
}

.faq details {
  background: var(--surface);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 2px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
}

.faq details:hover {
  border-color: var(--primary);
}

.faq details[open] {
  background: rgba(59,130,246,0.05);
  border-color: var(--primary);
}

.faq summary {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  font-size: 24px;
  color: var(--primary);
  font-weight: 700;
}

.faq details[open] summary::after {
  content: '−';
}

.faq p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* Footer */
.footer {
  text-align: center;
  padding: 30px;
  background: var(--surface);
  border-radius: 12px;
  margin-top: 40px;
  border: 1px solid var(--border);
}

.footer p {
  margin-bottom: 12px;
  color: var(--text-light);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: var(--secondary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .header-content {
    flex-direction: column;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .palette-types {
    grid-template-columns: repeat(2, 1fr);
  }

  .tips {
    grid-template-columns: 1fr;
  }
}