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

:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f5f5f5;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --link-color: #2563eb;
  --link-hover: #1d4ed8;
  --border: #e5e5e5;
  --shadow: rgba(0, 0, 0, 0.1);
}

:root[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --text-primary: #e5e5e5;
  --text-secondary: #a3a3a3;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --link-color: #ffffff;
  --link-hover: #e5e5e5;
  --border: #333333;
  --shadow: rgba(255, 255, 255, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  transition: background-color 0.3s ease, color 0.3s ease;
}

header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 1.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px var(--shadow);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-container {
  display: flex;
  gap: 0;
  align-items: center;
}

.header-logo {
  height: 80px;
  width: auto;
  transition: opacity 0.3s ease;
}

nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

nav button {
  padding: 0.5rem 1rem;
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

nav button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

nav button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
  min-height: calc(100vh - 200px);
}

#content {
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

#content h2 {
  font-size: 1.75rem;
  margin: 2rem 0 1rem;
  color: var(--text-primary);
}

#content h3 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--text-primary);
}

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

#content ul, #content ol {
  margin: 1rem 0 1rem 2rem;
  color: var(--text-secondary);
}

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

#content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

#content a {
  color: var(--link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

#content a:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

#content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

#content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.menu-nav {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.menu-nav button {
  padding: 0.75rem 1.5rem;
  background: var(--bg-primary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.menu-nav button:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.menu-nav button.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  margin-top: 4rem;
}

footer p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

footer a {
  color: var(--link-color);
  text-decoration: none;
}

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

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    text-align: center;
  }

  h1 {
    font-size: 1.5rem;
  }

  .header-logo {
    height: 60px;
  }

  nav {
    flex-direction: column;
  }

  #content h1 {
    font-size: 2rem;
  }

  #content h2 {
    font-size: 1.5rem;
  }

  main {
    padding: 2rem 1rem;
  }
}
