/* Camera App Docs - Minimal Dark Theme */

:root {
  --bg: #0a0a0a;
  --bg-secondary: #111111;
  --bg-elevated: #1a1a1a;
  --text: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;
  --accent: #ffffff;
  --border: #2a2a2a;
  --code-bg: #161616;
  --link: #e8e8e8;
  --link-hover: #ffffff;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Header */
header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

nav a:hover {
  color: var(--accent);
}

/* Main Content */
main {
  padding: 3rem 0;
  min-height: calc(100vh - 200px);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 1rem;
  color: var(--accent);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin: 1rem 0;
  color: var(--text);
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

a:hover {
  color: var(--link-hover);
}

/* Lists */
ul, ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

li {
  margin: 0.5rem 0;
  color: var(--text);
}

/* Code */
code {
  font-family: 'SF Mono', 'Menlo', 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: #e8e8e8;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Syntax Highlighting */
.highlight { background: var(--code-bg); }
.highlight .c { color: #6a737d; } /* Comment */
.highlight .k { color: #ff7b72; } /* Keyword */
.highlight .n { color: #e8e8e8; } /* Name */
.highlight .s { color: #a5d6ff; } /* String */
.highlight .m { color: #79c0ff; } /* Number */
.highlight .o { color: #ff7b72; } /* Operator */
.highlight .p { color: #e8e8e8; } /* Punctuation */

/* Blockquotes */
blockquote {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

th, td {
  border: 1px solid var(--border);
  padding: 0.75rem;
  text-align: left;
}

th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--accent);
}

tr:hover {
  background: var(--bg-secondary);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
}

/* Horizontal Rule */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* Cards */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin: 1rem 0;
}

.card h3 {
  margin-top: 0;
}

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

/* Sidebar Navigation */
.sidebar {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  margin: 0;
}

.sidebar a {
  display: block;
  padding: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s;
}

.sidebar a:hover {
  background: var(--bg-elevated);
  color: var(--accent);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 4rem;
  color: var(--text-tertiary);
  text-align: center;
  font-size: 0.9rem;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 3px;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  header .container {
    flex-direction: column;
    gap: 1rem;
  }

  nav ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }

  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }

  .grid {
    grid-template-columns: 1fr;
  }
  
  pre {
    padding: 0.75rem;
  }
  
  pre code {
    font-size: 0.8rem;
  }
}

/* Performance: Reduce animations on low-end devices */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
  }
  
  header, footer, nav {
    display: none;
  }
  
  a {
    text-decoration: none;
    color: black;
  }
  
  pre, code {
    border: 1px solid #ccc;
    page-break-inside: avoid;
  }
}

