/* CIMPLE: THE DEFINITIVE, FINAL STYLESHEET */

html {
  scroll-behavior: smooth;
}

:root {
  --font-main: 'Inter', sans-serif;
  --bg-color: #121212;
  --text-color: #EAEAEA;
  --text-secondary: #999999;
  --accent-color: #448aff;
  --button-text-color: #FFFFFF;
  --header-bg: rgba(18, 18, 18, 0.7);
  --card-bg: rgba(30, 30, 30, 0.5);
  --card-border: rgba(255, 255, 255, 0.1);
}
body.light-mode {
  --bg-color: #f5f5f7;
  --text-color: #1d1d1f;
  --text-secondary: #5a5a5f;
  --accent-color: #0071e3;
  --header-bg: rgba(251, 251, 253, 0.7);
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.1);
}
body {
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: var(--font-main);
  margin: 0;
  transition: background-color 0.4s ease, color 0.4s ease;
}

/* --- HEADER & NAVIGATION --- */
.site-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 10; background-color: var(--header-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid var(--card-border); }
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; padding: 0 2rem; height: 64px; }
.logo-container a { text-decoration: none; display: flex; align-items: center; gap: 12px; color: inherit; }
.site-logo { height: 36px; width: auto; }
.logo-text { font-size: 1.25rem; font-weight: 500; }
.nav-controls { display: flex; align-items: center; gap: 24px; }
.site-nav a { color: var(--text-secondary); text-decoration: none; font-weight: 500; margin-left: 24px; transition: color .2s ease; }
.site-nav a:hover { color: var(--text-color); }
.site-nav a.nav-active { color: var(--text-color); cursor: default; }
.site-nav a.nav-active:hover { color: var(--text-color); }
.theme-toggle { display: flex; justify-content: center; align-items: center; background: none; border: none; cursor: pointer; padding: 4px; }
.toggle-track { width: 40px; height: 22px; background-color: #4d4d4d; border-radius: 22px; position: relative; transition: background-color .3s ease; }
.toggle-thumb { width: 16px; height: 16px; background-color: #fff; border-radius: 50%; position: absolute; top: 3px; left: 3px; transition: transform .3s ease; }
body.light-mode .toggle-track { background-color: var(--accent-color); }
body.light-mode .toggle-thumb { transform: translateX(18px); }

/* --- HERO & GENERAL SECTIONS --- */
.main-content { padding-top: 64px; }
.hero-section { display: flex; flex-direction: column; justify-content: center; height: calc(100vh - 64px); padding: 2rem; max-width: 800px; margin: 0 auto; text-align: center; }
.hero-headline { font-size: 6rem; font-weight: 800; letter-spacing: -2.5px; margin: 0; min-height: 96px; }
.hero-alt-name { font-size: 1.2rem; color: var(--text-secondary); margin-top: .75rem; }
.hero-alt-name strong { font-weight: 500; color: var(--text-color); }
.hero-subheadline { font-size: 1.25rem; color: var(--text-secondary); margin: 2rem auto 3rem auto; line-height: 1.6; max-width: 600px; }
.content-section { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; scroll-margin-top: 80px; width: 100%; box-sizing: border-box; }
.content-section:not(.hero-section) { border-top: 1px solid var(--card-border); }
.section-title { font-size: 3rem; text-align: center; margin-bottom: 3rem; min-height: 64px; }
.section-paragraph { font-size: 1.2rem; line-height: 1.8; color: var(--text-secondary); max-width: 700px; margin: 0 auto; text-align: center; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(250px,1fr)); gap: 1rem; text-align: left; }
.feature-item { background-color: var(--card-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border: 1px solid var(--card-border); padding: 1.5rem; border-radius: 16px; }
.feature-title { font-size: 1.25rem; font-weight: 600; margin-top: 0; margin-bottom: 1rem; color: var(--text-color); }

/* --- BUTTONS & LINKS --- */
.hero-cta,.community-links { display: flex; justify-content: center; flex-wrap: wrap; align-items: center; gap: 1rem; }
.button-elegant { background-image: linear-gradient(45deg, var(--accent-color) 0%, #448aff 100%); border: 1px solid rgba(255, 255, 255, 0.1); color: #FFF; text-decoration: none; font-weight: 500; padding: 12px 24px; border-radius: 8px; transition: all 0.3s ease; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); }
.button-elegant:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0, 113, 227, 0.4); }
.cta-link { color: var(--accent-color); text-decoration: none; font-weight: 500; }

/* --- ANIMATIONS & TYPEWRITER --- */
.animate-on-scroll { opacity: 0; transform: translateY(40px); transition: opacity 1.0s ease-out, transform 1.0s ease-out; }
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }
.typewriter-heading { visibility: hidden; }
.Typewriter__cursor { color: var(--accent-color); font-weight: 100; font-size: inherit; }
.Typewriter__wrapper { display: inline-block; }

/* --- MOBILE SIDEBAR --- */
.hamburger-menu { display: none; background: none; border: none; padding: 0; margin-left: 1rem; cursor: pointer; color: var(--text-color); }
.mobile-sidebar { position: fixed; top: 0; right: 0; width: 280px; height: 100vh; background-color: var(--header-bg); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); z-index: 1001; transform: translateX(100%); transition: transform .4s cubic-bezier(.25,.46,.45,.94); border-left: 1px solid var(--card-border); }
.sidebar-header { display: flex; justify-content: space-between; align-items: center; padding: 0 1.5rem; height: 64px; border-bottom: 1px solid var(--card-border); }
.sidebar-title { font-size: 1.1rem; font-weight: 500; color: var(--text-secondary); }
.close-sidebar-btn { background: none; border: none; padding: 0; color: var(--text-color); cursor: pointer; }
.sidebar-nav { display: flex; flex-direction: column; padding: 1.5rem; gap: 1rem; }
.sidebar-nav a { color: var(--text-color); text-decoration: none; font-size: 1.2rem; font-weight: 500; padding: .75rem 0; }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, .3); z-index: 1000; opacity: 0; pointer-events: none; transition: opacity .4s ease; }
body.sidebar-open .mobile-sidebar { transform: translateX(0); }
body.sidebar-open .sidebar-overlay { opacity: 1; pointer-events: auto; }
body.sidebar-open { overflow: hidden; }

/* --- DOCUMENTATION PAGE --- */
.docs-wrapper { display: flex; max-width: 1200px; margin: 0 auto; padding-top: 64px; }
.docs-sidebar { width: 240px; flex-shrink: 0; height: calc(100vh - 64px); position: sticky; top: 64px; padding: 2rem; border-right: 1px solid var(--card-border); }
.docs-sidebar nav ul { list-style: none; padding: 0; margin: 0; }
.docs-sidebar nav a { display: block; text-decoration: none; color: var(--text-secondary); font-weight: 500; padding: .5rem 0; transition: all .2s ease; }
.docs-sidebar nav a:hover { color: var(--text-color); padding-left: .25rem; }
.docs-sidebar nav a.active { color: var(--accent-color); font-weight: 700; padding-left: .25rem; }
.docs-content { flex-grow: 1; padding: 2rem 3rem; }
.docs-content section { scroll-margin-top: 80px; padding: 2rem 0; }
.docs-content h1 { font-size: 2rem; text-align: center; border: none; margin-bottom: 2rem; min-height: 32px; }
.docs-content h2 { font-size: 2rem; min-height: 38px; }
.docs-heading-with-icon { display: flex; align-items: center; gap: .75rem; border-bottom: 1px solid var(--card-border); padding-bottom: .5rem; margin-top: 4rem; }
.heading-icon { width: 28px; height: 28px; stroke: var(--accent-color); stroke-width: 1.5; flex-shrink: 0; fill: none; }
.docs-heading-with-icon h2 { margin: 0; border: none; padding: 0; }
.docs-content h3 { font-size: 1.4rem; margin-top: 2.5rem; }
/* === DEFINITIVE PADDING FIX FOR CODE BLOCKS === */
.docs-content pre {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 1.5rem 2rem; /* Increased padding */
  margin-top: 1rem;
  margin-bottom: 2rem; /* Added margin for space after */
  border-radius: 12px;
  white-space: pre-wrap;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.docs-content pre code { font-family: Menlo, Consolas, monospace; }
.docs-content table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; background-color: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; }
.docs-content th, .docs-content td { text-align: left; padding: .75rem 1rem; border-bottom: 1px solid var(--card-border); }
.docs-content tbody tr:last-child td { border-bottom: none; }
.docs-content ul { list-style-type: disc; padding-left: 1.5rem; line-height: 1.9; }

/* --- DESKTOP-ONLY FULL-SCREEN SCROLLING --- */
@media (min-width: 901px) {
  html { scroll-snap-type: y mandatory; }
  .hero-section, .content-section, .docs-content > section {
    min-height: calc(100vh - 64px);
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
}

/* --- MOBILE & TABLET RESPONSIVENESS --- */
@media (max-width: 900px) { .docs-sidebar { display: none; } }
@media (max-width: 768px) {
  .site-nav { display: none; }
  .hamburger-menu { display: block; }
  .hero-headline { font-size: 3.5rem; min-height: 0; }
  .section-title, .docs-content h1, .docs-content h2 { font-size: 2rem; min-height: 0; }
  .content-section { padding: 3rem 1.5rem; }
}
@media (max-width: 480px) { .hero-cta { flex-direction: column; gap: 1rem; } }