@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@600;700&display=swap');

:root {
  /* JCP-VISION Brand Tokens - Enforced Dark Mode */
  --jcp-primary: #68de7e;
  --jcp-primary-dark: #4db861;
  
  /* Primary & Background */
  --bg-primary: #101318;
  --bg-secondary: #1A1E24;
  --bg-sidebar: #0a0c0f;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-color: var(--jcp-primary);
  --accent-hover: var(--jcp-primary-dark);
  --border-color: rgba(255, 255, 255, 0.05);
  --code-bg: #15181E;
  --code-text: #68de7e;
  
  /* Spacing & Borders */
  --sidebar-width: 280px;
  --content-max-width: 960px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-md: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: var(--transition-base);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color var(--transition-base), color var(--transition-base);
}

h1, h2, h3, h4 {
  font-family: 'Google Sans Text', 'Outfit', sans-serif;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.2;
}

h1 { font-size: 3rem; letter-spacing: -0.03em; margin-bottom: 2rem; }
h2 { font-size: 2rem; margin-top: 3.5rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.75rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; margin-top: 2.5rem; border-left: 4px solid var(--accent-color); padding-left: 1rem; }

p { margin-bottom: 1.5rem; color: var(--text-secondary); font-size: 1.1rem; }

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: var(--transition-fast);
  font-weight: 500;
}

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

/* Layout Structure */
.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: white;
  padding: 1.5rem 1.25rem;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  border-right: 1px solid var(--border-color);
}

.sidebar-brand {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.brand-logo {
  font-family: 'Inter', 'Outfit', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  display: flex;
  align-items: center;
}

.logo-jcp {
  color: #ffffff;
}

.logo-vision {
  color: var(--jcp-primary);
}

.brand-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.sidebar nav {
  flex: 1;
}

.sidebar nav a {
  display: block;
  color: rgba(255, 255, 255, 0.6);
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: white;
}

.sidebar nav a.active {
  background: rgba(104, 222, 126, 0.1);
  color: var(--jcp-primary);
  box-shadow: inset 0 0 0 1px rgba(104, 222, 126, 0.2);
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: auto;
}

.btn-github {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition-fast);
  text-decoration: none !important;
}

.btn-github:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border-color: rgba(255, 255, 255, 0.1);
}

.btn-github svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}


.content-wrapper {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 5rem 3rem;
  background-color: var(--bg-primary);
}

.content {
  max-width: var(--content-max-width);
  width: 100%;
}

/* UI Components */
pre {
  background: var(--code-bg);
  padding: 2.5rem 2rem 2rem 2rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 2rem 0;
  position: relative;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

[data-theme="light"] pre {
  --code-bg: #111827;
  --code-text: #68de7e;
}

code {
  font-family: 'ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'monospace';
  font-size: 0.95rem;
  color: var(--code-text);
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.alert {
  padding: 1.5rem 2rem;
  border-radius: var(--radius-md);
  margin: 2.5rem 0;
  display: flex;
  gap: 1.25rem;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: currentColor;
}

.alert-note {
  background: rgba(104, 222, 126, 0.05);
  border-color: rgba(104, 222, 126, 0.1);
  color: var(--jcp-primary);
}

[data-theme="dark"] .alert-note {
  background: rgba(104, 222, 126, 0.03);
  color: #68de7e;
}

.alert-important {
  background: rgba(255, 46, 99, 0.05);
  border-color: rgba(255, 46, 99, 0.1);
  color: #ff2e63;
}

[data-theme="dark"] .alert-important {
  background: rgba(255, 46, 99, 0.03);
  color: #ff2e63;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition-fast);
  z-index: 10;
}

.copy-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.copy-btn::before {
  content: 'content_copy';
  font-family: 'Material Symbols Outlined';
  font-size: 1.1rem;
}

.copy-btn.copied::before {
  content: 'check';
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: 3rem 0;
  font-size: 1rem;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

th {
  text-align: left;
  background: var(--bg-secondary);
  padding: 1rem 1.5rem;
  border-bottom: 2px solid var(--border-color);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

td {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-secondary);
}

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

tr:hover td {
  background: rgba(104, 222, 126, 0.02);
}

/* Responsive */
@media (max-width: 1024px) {
  .sidebar { width: 240px; }
}

@media (max-width: 768px) {
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    padding: 1.5rem;
  }
  .sidebar nav {
    flex: none;
    display: none; /* Mobile menu logic to be added */
  }
  .sidebar nav.open { display: block; }
  .content-wrapper { padding: 2rem 1.5rem; }
  h1 { font-size: 2rem; }
}