/* Mixura User Manual - Branded Documentation Site */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

:root {
  --primary: #17D4C5;
  --primary-dark: #0FA99F;
  --primary-light: #5DE5DA;
  --purple: #B32CD8;
  --orange: #FF9D10;
  --bg: #F8F9FA;
  --surface: #FFFFFF;
  --surface-variant: #F0F2F5;
  --text: #1A1A2E;
  --text-secondary: #6C757D;
  --text-hint: #ADB5BD;
  --border: #E2E8F0;
  --sidebar-width: 280px;
  --header-height: 64px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.12);
  --transition: 0.2s ease;
}

[data-theme="dark"] {
  --bg: #121212;
  --surface: #1E1E1E;
  --surface-variant: #2D2D2D;
  --text: #F5F5F5;
  --text-secondary: #B0B0B0;
  --text-hint: #757575;
  --border: #3A3A3A;
  --shadow: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
  font-size: 20px;
}

.menu-toggle:hover {
  background: var(--surface-variant);
}

.header-logo {
  height: 36px;
  width: auto;
}

.header-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.header-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 12px;
  font-weight: 500;
}

.header-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  transition: background var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-variant);
}

/* Search */
.search-container {
  position: relative;
}

.search-input {
  padding: 8px 16px 8px 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--surface-variant);
  color: var(--text);
  width: 220px;
  transition: all var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  width: 280px;
  box-shadow: 0 0 0 3px rgba(23, 212, 197, 0.15);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-hint);
  font-size: 14px;
}

.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  display: none;
  z-index: 100;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.search-result-item:hover {
  background: var(--surface-variant);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}

.search-result-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 24px 0;
  z-index: 900;
  transition: transform var(--transition);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-section {
  padding: 0 16px;
  margin-bottom: 8px;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-hint);
  padding: 8px 12px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-variant);
}

.sidebar-link.active {
  color: var(--primary-dark);
  background: rgba(23, 212, 197, 0.1);
  font-weight: 600;
}

.sidebar-link-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.badge-pro {
  background: linear-gradient(135deg, var(--purple), #8B5CF6);
  color: white;
}

.badge-ios {
  background: #007AFF;
  color: white;
}

.badge-android {
  background: #34A853;
  color: white;
}

/* Main content */
.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  display: flex;
}

.content {
  flex: 1;
  max-width: 800px;
  padding: 40px 48px;
}

/* Table of contents (right side) */
.toc {
  width: 220px;
  padding: 40px 16px;
  position: sticky;
  top: var(--header-height);
  height: fit-content;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-hint);
  margin-bottom: 12px;
}

.toc-list {
  list-style: none;
}

.toc-item {
  margin-bottom: 4px;
}

.toc-link {
  display: block;
  padding: 4px 0 4px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  border-left: 2px solid transparent;
  transition: all var(--transition);
}

.toc-link:hover {
  color: var(--text);
}

.toc-link.active {
  color: var(--primary-dark);
  border-left-color: var(--primary);
  font-weight: 600;
}

.toc-link.toc-h3 {
  padding-left: 24px;
  font-size: 12px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  font-size: 13px;
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
}

.breadcrumb-link:hover {
  color: var(--primary-dark);
}

.breadcrumb-sep {
  color: var(--text-hint);
}

.breadcrumb-current {
  color: var(--text);
  font-weight: 600;
}

/* Typography */
.page-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.page-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  margin-bottom: 32px;
  font-weight: 400;
}

h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-top: 40px;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

h2:first-of-type {
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}

h3 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin-top: 28px;
  margin-bottom: 12px;
}

p {
  margin-bottom: 16px;
  color: var(--text);
}

/* Lists */
ul, ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--text);
}

li strong {
  color: var(--text);
}

/* Callout boxes */
.callout {
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 14px;
}

.callout-title {
  font-weight: 700;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.callout-tip {
  background: rgba(23, 212, 197, 0.08);
  border: 1px solid rgba(23, 212, 197, 0.3);
}

.callout-tip .callout-title {
  color: var(--primary-dark);
}

.callout-warning {
  background: rgba(255, 157, 16, 0.08);
  border: 1px solid rgba(255, 157, 16, 0.3);
}

.callout-warning .callout-title {
  color: #E68A00;
}

.callout-pro {
  background: rgba(179, 44, 216, 0.06);
  border: 1px solid rgba(179, 44, 216, 0.25);
}

.callout-pro .callout-title {
  color: var(--purple);
}

.callout-info {
  background: rgba(66, 133, 244, 0.06);
  border: 1px solid rgba(66, 133, 244, 0.25);
}

.callout-info .callout-title {
  color: #4285F4;
}

/* Platform badges inline */
.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  vertical-align: middle;
}

.platform-ios {
  background: #007AFF;
  color: white;
}

.platform-android {
  background: #34A853;
  color: white;
}

.platform-both {
  background: var(--surface-variant);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.pro-badge-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--purple), #8B5CF6);
  color: white;
  text-transform: uppercase;
  vertical-align: middle;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

thead {
  background: var(--surface-variant);
}

th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text);
}

tr:hover td {
  background: var(--surface-variant);
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  padding-left: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 48px;
  padding-bottom: 20px;
  border-left: 2px solid var(--border);
  margin-left: 16px;
  margin-bottom: 0;
}

.steps li:last-child {
  border-left-color: transparent;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: -15px;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

.steps li strong {
  display: block;
  margin-bottom: 4px;
}

/* Feature cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: box-shadow var(--transition);
}

.feature-card:hover {
  box-shadow: var(--shadow);
}

.feature-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
}

.feature-card-title {
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 15px;
}

.feature-card-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Comparison table */
.comparison-table td:nth-child(2),
.comparison-table td:nth-child(3) {
  text-align: center;
}

.comparison-table th:nth-child(2),
.comparison-table th:nth-child(3) {
  text-align: center;
}

.check {
  color: var(--primary-dark);
  font-weight: 700;
}

.cross {
  color: var(--text-hint);
}

/* Star rating display */
.stars {
  color: #FFB800;
  letter-spacing: 2px;
}

/* Color swatches */
.color-swatch {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: 6px;
  border: 1px solid var(--border);
}

/* Delta E quality indicator */
.quality-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.quality-excellent {
  background: rgba(39, 174, 96, 0.1);
  color: #27AE60;
}

.quality-verygood {
  background: rgba(46, 204, 113, 0.1);
  color: #2ECC71;
}

.quality-good {
  background: rgba(243, 156, 18, 0.1);
  color: #F39C12;
}

.quality-fair {
  background: rgba(230, 126, 34, 0.1);
  color: #E67E22;
}

/* Hero section for landing page */
.hero {
  text-align: center;
  padding: 48px 0;
  margin-bottom: 40px;
  border-bottom: 1px solid var(--border);
}

.hero-logo {
  height: 80px;
  margin-bottom: 20px;
}

.hero-title {
  font-size: 36px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.hero-desc {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 899;
}

.sidebar-overlay.active {
  display: block;
}

/* Responsive */
@media (max-width: 1100px) {
  .toc {
    display: none;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .main {
    margin-left: 0;
  }

  .content {
    padding: 24px 20px;
  }

  .header-subtitle {
    display: none;
  }

  .search-input {
    width: 160px;
  }

  .search-input:focus {
    width: 200px;
  }

  .page-title {
    font-size: 26px;
  }

  h2 {
    font-size: 20px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  table {
    font-size: 13px;
  }

  th, td {
    padding: 8px 12px;
  }
}

@media (max-width: 480px) {
  .search-container {
    display: none;
  }

  .content {
    padding: 20px 16px;
  }

  .hero-title {
    font-size: 28px;
  }
}

/* Print styles */
@media print {
  .header, .sidebar, .toc, .theme-toggle, .menu-toggle, .search-container {
    display: none !important;
  }

  .main {
    margin-left: 0;
    margin-top: 0;
  }

  .content {
    max-width: none;
    padding: 0;
  }
}
