:root {
  --bg: #ffffff;
  --text: #222222;
  --link: #4A1A9E;
  /* Deeper, richer purple */
  --link-hover: #2E0070;
  --border: #cccccc;
  --bg-alt: #f0f0f4;
  --font: "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: Consolas, Monaco, "Courier New", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b22;
    --text: #fbfbfe;
    --link: #9333ea;
    /* Darker, more muted purple for dark mode */
    --link-hover: #a855f7;
    --border: #42414d;
    --bg-alt: #2b2a33;
  }
}

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

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

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

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.5rem;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.nav-brand {
  font-size: 1.5rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
}

.nav-brand img {
  width: 32px;
  height: 32px;
}

.nav-brand:hover {
  text-decoration: none;
}

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

.hero {
  text-align: center;
  margin: 3rem 0;
}

.hero-logo {
  width: 128px;
  height: 128px;
  margin-bottom: 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn {
  padding: 0.5rem 1.2rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  border-radius: 3px;
  text-decoration: none;
  font-weight: bold;
  font-size: 0.95rem;
}

.btn-primary {
  background: var(--link);
  color: #ffffff;
  border-color: var(--link);
}

.btn-primary:hover {
  background: var(--link-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--border);
  text-decoration: none;
}

.btn-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: default;
}

.features {
  margin-top: 3rem;
}

.section-title {
  font-size: 1.8rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.feature-grid,
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card,
.download-card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  border-radius: 3px;
}

.feature-card h3,
.download-card h4 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.download-section {
  margin-top: 3rem;
}

.download-card p {
  margin-bottom: 1rem;
}

.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.content-section {
  margin-bottom: 2.5rem;
}

.content-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.content-section h3 {
  font-size: 1.2rem;
  margin: 1.5rem 0 0.5rem 0;
}

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

.content-section ul {
  padding-left: 2rem;
}

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

code {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.9em;
}

pre code {
  border: none;
  padding: 0;
  background: transparent;
}

.note {
  background: var(--bg-alt);
  border-left: 4px solid var(--link);
  padding: 1rem;
  margin-bottom: 1rem;
}

footer {
  margin-top: 4rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.9rem;
  color: var(--text);
}