/* ============================================================
   Claude HUD — Docs Site Styles
   Clean, minimal white theme
   ============================================================ */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&family=Space+Grotesk:wght@400;700&family=Space+Mono&display=swap');

/* --- CSS Variables --- */
:root {
  --bg: #FFFFFF;
  --bg-alt: #FAFAFA;
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --accent: #06B6D4;
  --accent-dark: #0891B2;
  --border: #e5e7eb;
  --code-bg: #f3f4f6;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--accent-dark);
  text-decoration: none;
  transition: color 0.2s;
}

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

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

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

ul, ol {
  margin-left: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

li {
  margin-bottom: 0.25rem;
}


/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.nav-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: color 0.2s;
  position: relative;
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  flex-shrink: 0;
}

.lang-switcher button {
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-family: 'Inter', sans-serif;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lang-switcher button:hover {
  border-color: var(--accent);
  color: var(--text);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  min-width: 120px;
  display: none;
  overflow: hidden;
  z-index: 110;
}

.lang-dropdown.open {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}

.lang-dropdown a:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.lang-dropdown a.active {
  color: var(--accent);
  font-weight: 600;
}


/* ============================================================
   Hero Section
   ============================================================ */
.hero {
  text-align: center;
  padding: 8rem 2rem 4rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text);
  font-weight: 400;
  margin-bottom: 0.75rem;
}

.hero-description {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
}

.hero-stat {
  text-align: center;
}

.hero-stat-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.hero-stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}


/* ============================================================
   Buttons
   ============================================================ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  background: transparent;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: translateY(-1px);
}


/* ============================================================
   Sections
   ============================================================ */
.section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section-alt {
  background: var(--bg-alt);
}

.section-alt .section {
  padding: 4rem 2rem;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--accent);
  margin: 0.75rem auto 0;
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}


/* ============================================================
   Feature Cards
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.feature-card-icon {
  width: 40px;
  height: 40px;
  background: var(--bg-alt);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0;
}


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

thead th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  background: var(--bg-alt);
}

tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

tbody tr:last-child td {
  border-bottom: none;
}

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


/* ============================================================
   Code Blocks
   ============================================================ */
code {
  font-family: 'Space Mono', 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85em;
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--accent-dark);
}

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

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
}


/* ============================================================
   Pet Grid (Collection Preview)
   ============================================================ */
.pet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}

.pet-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.pet-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pet-card .pet-preview {
  width: 64px;
  height: 64px;
  margin: 0 auto 0.75rem;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.pet-card .pet-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pet-card .pet-unlock {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

.pet-card .stages {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  margin: 0.75rem 0;
}

.pet-card .stage {
  text-align: center;
}

.pet-card .stage-label {
  font-size: 0.65rem;
  font-family: 'Space Mono', monospace;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.pixel-preview {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}


/* ============================================================
   Install Steps
   ============================================================ */
.install-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.install-step {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
  text-align: center;
  box-shadow: var(--card-shadow);
}

.install-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 50%;
  margin-bottom: 1rem;
}

.install-step h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.install-step p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
}

.footer p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

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

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


/* ============================================================
   Docs Layout
   ============================================================ */
.docs-layout {
  display: flex;
  padding-top: 60px;
}

/* ============================================================
   Sidebar (Docs Page)
   ============================================================ */
.sidebar-header {
  padding: 0 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.sidebar-header .version {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
}

.sidebar-header .sidebar-github {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  transition: color 0.2s;
}

.sidebar-header .sidebar-github:hover {
  color: var(--accent);
}

.sidebar {
  position: fixed;
  top: 60px;
  left: 0;
  width: 260px;
  height: calc(100vh - 60px);
  overflow-y: auto;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0;
  z-index: 50;
}

.sidebar-section {
  padding: 0 1.25rem;
  margin-bottom: 1.5rem;
}

.sidebar-section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: block;
  padding: 0.35rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: background 0.15s, color 0.15s;
  margin-bottom: 2px;
}

.sidebar-link:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.sidebar-link.active {
  background: rgba(6, 182, 212, 0.08);
  color: var(--accent-dark);
  font-weight: 600;
}


/* ============================================================
   Doc Content (with sidebar offset)
   ============================================================ */
.doc-content {
  margin-left: 280px;
  padding: 2.5rem 3rem 4rem;
  max-width: 860px;
  min-height: calc(100vh - 60px);
}

.doc-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2rem;
  margin-bottom: 0.5rem;
  padding-top: 1rem;
}

.doc-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.doc-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.doc-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
}

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

.doc-content li {
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.doc-content table {
  margin: 1.5rem 0;
}

.doc-content .info-box {
  background: rgba(6, 182, 212, 0.06);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

.doc-content .info-box p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 0.9rem;
}


/* ============================================================
   States Table (for pet states display)
   ============================================================ */
.states-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.state-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
}

.state-card .state-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.state-card .state-trigger {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* ============================================================
   Muscle Stages Display
   ============================================================ */
.muscle-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.muscle-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
}

.muscle-card .muscle-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.muscle-card .muscle-condition {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}


/* ============================================================
   Badge Section
   ============================================================ */
.badge-section {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  margin: 2rem 0;
}


/* ============================================================
   Utility Classes
   ============================================================ */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--text-muted);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }


/* ============================================================
   Mobile Menu Toggle
   ============================================================ */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  transition: transform 0.2s, opacity 0.2s;
}


/* ============================================================
   Responsive
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .doc-content {
    margin-left: 240px;
    padding: 2rem;
  }

  .sidebar {
    width: 240px;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pet-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

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

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a.active::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero {
    padding: 6rem 1.25rem 3rem;
  }

  .hero-title {
    font-size: 2.25rem;
  }

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

  .hero-cta {
    flex-direction: column;
    align-items: center;
  }

  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .section {
    padding: 3rem 1.25rem;
  }

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

  .install-steps {
    grid-template-columns: 1fr;
  }

  .pet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

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

  .states-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Sidebar hidden on mobile */
  .sidebar {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 280px;
    height: calc(100vh - 60px);
    z-index: 90;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.08);
  }

  .sidebar.open {
    display: block;
  }

  .doc-content {
    margin-left: 0;
    padding: 1.5rem 1.25rem 3rem;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.85rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .hero-stat-value {
    font-size: 1.2rem;
  }

  .pet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .pet-card {
    padding: 1rem;
  }

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


/* ============================================================
   Sidebar Overlay (mobile backdrop)
   ============================================================ */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 80;
}

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


/* ============================================================
   Scrollbar Styling
   ============================================================ */
.sidebar::-webkit-scrollbar {
  width: 4px;
}

.sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}


/* ============================================================
   Selection
   ============================================================ */
::selection {
  background: rgba(6, 182, 212, 0.15);
  color: var(--text);
}


/* ============================================================
   Transitions & Animations
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease-out;
}
