/* Docora Brand Colors */
:root {
  --color-violet: #9C68D4;
  --color-coral: #FF7061;
  --color-amber: #FFA726;
  --color-dark: #282828;
  --color-light: #f8f9fa;
  --color-white: #ffffff;
  --color-gray: #6c757d;
  --color-border: #e9ecef;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Base */
html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-dark);
  background-color: var(--color-white);
}

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

/* Header */
.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--color-dark);
  font-weight: 600;
  font-size: 1.25rem;
}

.logo img {
  display: block;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

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

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

/* Main Layout */
.main {
  padding: 3rem 0;
}

.main .container {
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 4rem;
}

@media (max-width: 900px) {
  .main .container {
    grid-template-columns: 1fr;
  }

  .toc {
    display: none;
  }
}

/* Content */
.content {
  max-width: 800px;
}

.content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-violet);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--color-violet);
}

.content h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-gray);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content p {
  margin-bottom: 1rem;
}

.content a {
  color: var(--color-coral);
  text-decoration: none;
}

.content a:hover {
  text-decoration: underline;
}

.content ul, .content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.content li {
  margin-bottom: 0.5rem;
}

.content strong {
  font-weight: 600;
}

/* Code */
.content code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.875rem;
  background: var(--color-light);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.content pre {
  background: var(--color-dark);
  color: var(--color-light);
  padding: 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}

.content pre code {
  background: transparent;
  padding: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
}

/* Tables */
.content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.content th {
  background: var(--color-light);
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  border-bottom: 2px solid var(--color-border);
}

.content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.content tr:hover td {
  background: var(--color-light);
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-post {
  background: var(--color-amber);
  color: var(--color-dark);
}

.badge-required {
  background: var(--color-coral);
  color: var(--color-white);
}

.badge-optional {
  background: var(--color-light);
  color: var(--color-gray);
}

.badge-get {
  background: #4caf50;
  color: var(--color-white);
}

.badge-delete {
  background: var(--color-coral);
  color: var(--color-white);
}

.badge-patch {
  background: var(--color-violet);
  color: var(--color-white);
}

/* Endpoint blocks */
.endpoint {
  background: var(--color-light);
  border-left: 4px solid var(--color-violet);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  border-radius: 0 8px 8px 0;
}

.endpoint code {
  background: var(--color-white);
  font-weight: 600;
}

/* TOC */
.toc {
  position: sticky;
  top: 80px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

.toc h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-gray);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

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

.toc nav li {
  margin-bottom: 0.5rem;
}

.toc nav a {
  color: var(--color-gray);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.toc nav a:hover {
  color: var(--color-violet);
}

.toc nav ul ul {
  margin-top: 0.5rem;
  padding-left: 1rem;
}

/* Footer */
.footer {
  background: var(--color-light);
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 4rem;
}

.footer p {
  color: var(--color-gray);
  font-size: 0.875rem;
  text-align: center;
}

.footer .version {
  background: var(--color-violet);
  color: var(--color-white);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-left: 0.5rem;
}

/* Intro section */
.intro {
  background: linear-gradient(135deg, var(--color-violet) 0%, #7B4BB9 100%);
  color: var(--color-white);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
}

.intro p {
  margin: 0;
  font-size: 1.1rem;
  opacity: 0.95;
}

/* Alert boxes */
.alert {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.alert-info {
  background: rgba(156, 104, 212, 0.1);
  border-left: 4px solid var(--color-violet);
}

.alert-warning {
  background: rgba(255, 167, 38, 0.1);
  border-left: 4px solid var(--color-amber);
}

.alert-important {
  background: rgba(255, 112, 97, 0.1);
  border-left: 4px solid var(--color-coral);
}

/* Navigation active state */
.nav-link {
  color: var(--color-gray);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--color-violet);
}

.nav-active {
  color: var(--color-violet);
  font-weight: 600;
}

/* Homepage layout — single column (no TOC sidebar) */
.home-layout .container {
  grid-template-columns: 1fr;
}

.home-layout {
  padding: 0;
}

/* Hero section */
.hero {
  background: linear-gradient(135deg, var(--color-violet) 0%, #7B4BB9 100%);
  text-align: center;
  padding: 4rem 2rem;
}

.hero h1 {
  color: var(--color-white);
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  border-bottom: none;
  padding-bottom: 0;
}

.hero-subtitle {
  color: var(--color-white);
  opacity: 0.9;
  font-size: 1.2rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Features section */
.features {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.features h2 {
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.features h2:first-child {
  margin-top: 0;
}

.features p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.features ul,
.features ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.features li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.features strong {
  font-weight: 600;
}

.features code {
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
  font-size: 0.875rem;
  background: var(--color-light);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

/* Get Started cards */
.get-started {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.get-started-card {
  flex: 1;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: var(--color-dark);
  transition: box-shadow 0.2s, border-color 0.2s;
}

.get-started-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  border-color: var(--color-violet);
}

.get-started-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-violet);
  margin-bottom: 0.5rem;
}

.get-started-card p {
  font-size: 0.95rem;
  color: var(--color-gray);
  margin: 0;
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .get-started {
    flex-direction: column;
  }
}
