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

:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --bg-body: #fafafa;
  --bg-sidebar: #0f172a;
  --bg-card: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-sidebar: #94a3b8;
  --text-sidebar-active: #ffffff;
  --border: #e2e8f0;
  --code-bg: #1e293b;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

html {
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  background: var(--bg-body);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  height: 100vh;
  overflow-y: auto;
  padding: 32px 24px;
  border-right: 1px solid var(--border);
}

.sidebar h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-sidebar-active);
  margin-bottom: 32px;
  letter-spacing: -0.025em;
}

.sidebar ul {
  list-style: none;
}

.sidebar ul li {
  margin: 4px 0;
}

.sidebar ul li a {
  display: block;
  color: var(--text-sidebar);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.sidebar ul li a:hover {
  color: var(--text-sidebar-active);
  background: rgba(255, 255, 255, 0.05);
}

.content {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  padding: 48px;
}

.inner-content {
  max-width: 720px;
  margin: 0 auto;
}

.hero {
  text-align: center;
  padding: 32px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.hero img {
  width: 100%;
  max-width: 320px;
  height: auto;
  margin-bottom: 24px;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}

.hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin: 0 0 1rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  scroll-margin-top: 24px;
}

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

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

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

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

pre[class*="language-"] {
  position: relative;
  margin: 1rem 0;
  padding: 1.25rem;
  background: var(--code-bg);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: var(--shadow-lg);
}

pre[class*="language-"] code {
  font-family:
    "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas,
    "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.6;
}

pre[class*="language-"] button {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-sidebar);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

pre[class*="language-"] button:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--text-sidebar-active);
}

pre[class*="language-"] button.copied {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.tabs {
  margin: 1rem 0;
}

.tab-buttons {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-body);
  border-radius: 10px;
  width: fit-content;
  margin-bottom: 12px;
}

.tab-btn {
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  color: var(--primary);
  background: var(--bg-card);
  box-shadow: var(--shadow);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

@media screen and (max-width: 768px) {
  .sidebar {
    display: none;
  }
  .content {
    margin-left: 0;
    width: 100%;
    padding: 24px;
  }
  .hero {
    padding: 24px 0 32px;
  }
  h1 {
    font-size: 1.75rem;
  }
  h2 {
    font-size: 1.25rem;
  }
}
