:root {
    --brand: #ffa500;
    --bg: #1a1a1a;
    --text: #e0e0e0;
    --muted: #b5b5b5;
    --border: #2a2a2a;
}

* {
    box-sizing: border-box;
}

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

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

a:hover {
    text-decoration: underline;
}

table {
    margin-top: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.brand img {
    height: 40px;
}

nav a {
    margin-left: 20px;
    font-weight: 600;
}

section {
    padding: 80px 40px;
    max-width: 1100px;
    margin: auto;
}

h2 {
    margin-top: 0;
}

.center {
    text-align: center;
}

.line {
    width: 80px;
    height: 3px;
    background: var(--brand);
    margin: 20px auto;
}

/* Hero */
.hero {
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--brand);
}

.hero p {
    font-size: 1.1rem;
    color: var(--muted);
    max-width: 700px;
    margin: 0 auto 30px;
}

.hero-links a {
    display: inline-block;
    margin: 10px 15px;
    padding: 12px 22px;
    border: 1px solid var(--brand);
    border-radius: 6px;
    font-weight: 600;
}

.hero-links .primary {
    background-color: var(--brand);
    color: #1a1a1a;
}

.hero-links .primary:hover {
    text-decoration: none;
    opacity: 0.9;
}

/* Features */
.features ul {
    list-style: none;
    padding: 0;
    max-width: 900px;
    margin: auto;
}

.features li {
    padding: 15px 0;
    border-bottom: 1px solid var(--border);
}

/* Components */
.components {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.component {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 25px;
}

.component i {
    font-size: 32px;
    color: var(--brand);
    margin-bottom: 15px;
}

.component h3 {
    margin-top: 0;
    color: var(--brand);
}

/* Try */
.try {
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

footer {
    text-align: center;
    padding: 30px;
    color: var(--muted);
    font-size: 0.9rem;
}

/* Social */
.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.social-links a {
    font-weight: 600;
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 6px;
}

/* Support */
.support {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

/* Docs */
.docs-layout {
    display: flex;
    min-height: 100vh;
    background: #1a1a1a;
    color: #e0e0e0;
    font-family: sans-serif;
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 5px;
    font-size: 24px;
    background: none;
    border: none;
    color: var(--brand);
    z-index: 1100;
    cursor: pointer;
}

/* Docs Sidebar */
.docs-sidebar {
    width: 260px;
    padding: 24px;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.docs-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 20px;
    font-weight: bold;
    color: var(--text);
    text-decoration: none;
    margin-bottom: 15px;
}

.docs-brand:hover {
    color: var(--brand);
}

.docs-brand img {
    width: 32px;
}

.docs-search {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: none;
    background: #111;
    color: var(--text);
    margin-bottom: 20px;
}

.docs-search-wrapper {
    position: relative;
}

.docs-search::placeholder {
    color: #888;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 2px;
    background: none;
    border: none;
    cursor: pointer;
    color: #888;
    font-size: 16px;
    padding: 4px;
}

.search-btn:hover {
    color: var(--brand);
}

.docs-nav a {
    display: block;
    padding: 6px 0;
    color: #ccc;
    text-decoration: none;
    font-size: 14px;
}

.docs-nav a:hover {
    color: var(--brand);
}

.nav-group {
    margin-bottom: 8px;
}

.nav-sub {
    margin-left: 12px;
    border-left: 1px solid var(--border);
    padding-left: 10px;
}

.nav-sub a {
    font-size: 13px;
    color: #aaa;
}

.nav-toggle {
    cursor: pointer;
}

/* Docs Content */
.docs-content {
    flex: 1;
    padding: 0px 40px;
    width: 100%;
    max-width: 900px;
}

.docs-content h1 {
    margin-top: 10px;
    margin-bottom: 20px;
}

.docs-content p {
    line-height: 1.7;
    margin-bottom: 16px;
}

/* Docs Code Card */
.code-card {
    position: relative;
    border-radius: 8px;
    overflow-x: auto;
}

.code-card pre {
    min-height: 50px;
    max-height: 700px;
    margin: 0;
    overflow: scroll;
}

.code-card pre code {
    border-radius: 8px;
}

.copy-btn {
    position: absolute;
    top: 15px;
    right: 8px;
    padding: 4px 8px;
    background: var(--brand);
    border: none;
    border-radius: 4px;
    color: var(--bg);
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover {
    opacity: 0.9;
}

/* Docs Version Selector */
.version-selector {
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.version-selector select {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
}

/* Alert Box */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #f5c2c7;
    background-color: #f8d7da;
    color: #842029;
    font-family: system-ui, sans-serif;
    margin: 20px 0;
}

.alert-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.alert::before {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-weight: bold;
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 2px;
}

.alert p {
    margin: 0;
}

.alert-info {
    background-color: #e7f3ff;
    border-color: #b6dcff;
    color: #0b5ed7;
}
.alert-info::before {
    content: "i";
    background: #0b5ed7;
    color: #fff;
}

.alert-success {
    background-color: #e9f9ee;
    border-color: #b7e4c7;
    color: #146c43;
}
.alert-success::before {
    content: "✓";
    background: #198754;
    color: #fff;
}

.alert-warning {
    background-color: #fff8e1;
    border-color: #ffe08a;
    color: #997404;
}
.alert-warning::before {
    content: "!";
    background: #ffc107;
    color: #000;
}

.alert-danger {
    background-color: #fdeaea;
    border-color: #f1aeb5;
    color: #842029;
}
.alert-danger::before {
    content: "✕";
    background: #dc3545;
    color: #fff;
}

/* Back To Top Section */
.back-to-top {
    border-top: 2px solid var(--brand);
    margin-top: 60px;
    padding: 18px 0;
    text-align: center;
    font-family: monospace;
    color: var(--brand);
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.back-to-top .arrow {
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

.back-to-top:hover {
    background: rgba(255, 165, 0, 0.08);
}

.back-to-top:hover .arrow {
    transform: translateY(-3px);
}

/* Table of Content */
.doc-toc {
    position: relative;
    max-width: 500px;
    font-size: 14px;
}

.doc-toc-content {
    position: fixed;
    top: 90px;
}

.doc-toc-title {
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--brand);
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.doc-toc ul {
    list-style: none;
    padding-left: 14px;
    margin: 0;
    border-left: 3px solid var(--brand);
}

.doc-toc li {
    margin: 6px 0;
}

.doc-toc a {
    text-decoration: none;
    color: #ccc;
    transition: color 0.2s ease;
}

.doc-toc a:hover {
    color: var(--brand);
}

/* Responsive */
@media (max-width: 1200px) {
    .doc-toc {
        display: none;
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        height: 100%;
        background: var(--bg);
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .docs-sidebar.open {
        left: 0;
    }

    .menu-toggle {
        display: block;
        z-index: 0;
    }
}
