:root {
  --primary: #000000;
  --primary-hover: #333333;
  --primary-text: #ffffff;
  --bg-main: #f8f9fa;
  --bg-surface: #ffffff;
  --text-main: #202124;
  --text-muted: #5f6368;
  --border: #dadce0;
  --danger-bg: #fce8e6;
  --danger-text: #c5221f;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.05);
  --font-family: 'Inter', 'Roboto', 'Segoe UI', system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #ffffff;
    --primary-hover: #e0e0e0;
    --primary-text: #000000;
    --bg-main: #121212;
    --bg-surface: #1e1e1e;
    --text-main: #e8eaed;
    --text-muted: #9aa0a6;
    --border: #3c4043;
    --danger-bg: #3b1716;
    --danger-text: #f28b82;
    --shadow: 0 1px 3px rgba(0,0,0,0.5), 0 4px 8px rgba(0,0,0,0.3);
  }
  
  .hero-logo img { opacity: 0.9; }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-family); color: var(--text-main); background: var(--bg-main); line-height: 1.6; transition: background 0.3s, color 0.3s; }

/* Utilities */
.container { max-width: 1200px; margin: 0 auto; padding: 20px; }
.bg-light { background: var(--bg-main); }
.text-primary { color: var(--text-main); font-weight: 700; font-size: 2.5rem; letter-spacing: -0.5px; }
.text-secondary { color: var(--text-muted); font-weight: 400; font-size: 1.3rem; margin-bottom: 24px; }
.text-muted { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; }
.text-muted:hover { text-decoration: underline; }
.float-right { float: right; }
.fixed-bottom { position: fixed; bottom: 0; width: 100%; }
.full-height { min-height: 100vh; display: flex; align-items: center; justify-content: center; }

/* Layouts */
.hero-layout { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 60px; }
.hero-logo img { max-height: 250px; filter:drop-shadow(2px 4px 6px black); }
.hero-content { max-width: 600px; }

/* Buttons */
.action-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.btn { padding: 12px 24px; font-size: 1rem; font-weight: 600; border-radius: 50px; border: none; cursor: pointer; display: inline-flex; align-items: center; text-decoration: none; transition: all 0.2s ease; font-family: inherit; }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.btn-primary:hover { background: var(--border);color: var(--primary);box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.btn-outline { background: transparent; color: var(--text-main); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); background: var(--bg-surface); }

/* Dropdown */
.dropdown { position: relative; display: inline-flex; }
.dropdown-toggle { padding: 0 15px; border-left: 1px solid var(--bg-surface); }
.dropdown-menu { display: none;position: absolute;top: 100%;left: 0;background: transparent;box-shadow: var(--shadow);border-radius: 40px;min-width: 150px;z-index: 10;padding: 5px 0;}
.dropdown-menu.show { display: block; }
.dropdown-item { padding: 15px 20px;border-radius: 50px;display: block;color: var(--primary-text);background: var(--text-main);text-decoration: none;font-weight: 700;margin: 5px 0;}
.dropdown-item:hover { background: var(--border); color: var(--primary); }

/* Markdown & Docs Styling */
.docs-layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; background: var(--bg-surface); }
.sidebar { background: var(--bg-main); padding: 10px 10px 40px; border-right: 1px solid var(--border); overflow-y: auto; max-height: 100vh; position: sticky; top: 0;}
.sidebar h3 { margin-bottom: 24px; color: var(--text-main); font-weight: 700; letter-spacing: -0.5px; border-bottom: 2px  groove var(--border); }
.sidebar h3 .logoheader { text-decoration:none;display: flex;justify-content: flex-start;align-items: center;gap: 10px;font-size: large; color: var(--primary); }
.sidebar h3 .logoheader:hover { color: var(--primary-text); }
.sidebar a { display: block; padding: 10px 12px; margin-bottom: 4px; color: var(--text-muted); text-decoration: none; border-radius: 50px; font-size: 0.95rem; font-weight: 500; transition: all 0.2s;}
.sidebar a:hover, .sidebar a.active { color: var(--primary-text); background: var(--primary); }

.doc-content { padding: 50px; max-width: 900px; position: relative; }
.doc-content h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 30px; letter-spacing: -0.5px;}
.doc-content h2 { margin-top: 40px; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 8px; font-weight: 700; }
.doc-content h3 { margin-top: 24px; margin-bottom: 12px; font-weight: 600; }
.doc-content a { color: var(--text-main); text-decoration: underline; font-weight: 500; text-underline-offset: 3px; }
.doc-content a:hover { color: var(--text-muted); }
.doc-content p, .doc-content li { margin-bottom: 16px; font-size: 1.1rem; color: var(--text-main); }
.doc-content p  img { max-width: 100%; }
.doc-content code { background: var(--bg-main); padding: 3px 6px; border-radius: 4px; border: 1px solid var(--border); font-family: monospace; font-size: 0.9em; }
.doc-content pre code { display: block; padding: 20px; overflow-x: auto; border-radius: 8px; }

/* Markdown Tables */
.doc-content table { width: 100%; border-collapse: collapse; margin-bottom: 30px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); }
.doc-content th, .doc-content td { padding: 14px 20px; border-bottom: 1px solid var(--border); text-align: left; }
.doc-content th { background: var(--bg-main); font-weight: 600; }
.doc-content tr:last-child td { border-bottom: none; }

.doc-content .copyright { position: absolute; bottom: 0; display: flex; justify-content: center; align-items: center; background: var(--bg-surface); height: 40px; width: 100%; border-top: 1px solid var(--border); letter-spacing: 1px;}

/* Material Alerts */
.alert { padding: 20px; border-radius: 8px; margin: 24px 0; border-left: 4px solid; display: flex; flex-direction: column; gap: 8px; font-weight: 500; }
.alert.danger { background: var(--danger-bg); border-color: var(--danger-text); color: var(--danger-text); }
.alert h4 {margin-bottom: 0;color: inherit;font-weight: 900;font-size: 5rem;text-align: center;}

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; margin-block: 5px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 50px; cursor: grab; width: 20px; }
::-webkit-scrollbar-thumb:active { background: var(--primary-hover); cursor: grabbing; }