/* Documentation Page Styles */

::view-transition-old(root) {
    animation: vt-fade-out 0.25s ease-out forwards;
}
::view-transition-new(root) {
    animation: vt-fade-in 0.25s ease-in forwards;
}
@keyframes vt-fade-out {
    from { opacity: 1; transform: scale(1); }
    to { opacity: 0; transform: scale(0.98); }
}
@keyframes vt-fade-in {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

:root {
    --bg-primary: rgba(16, 16, 16, 0.97);
    --bg-card: rgba(20, 20, 20, 0.95);
    --text-primary: #ececec;
    --text-secondary: #b4b4b4;
    --text-tertiary: #9b9b9b;
    --text-muted: rgba(255, 255, 255, 0.5);
    --border-xlight: hsla(0,0%,100%,.05);
    --border-light: hsla(0,0%,100%,.1);
    --border-medium: hsla(0,0%,100%,.15);
    --accent-blue: #82B1FF;
    --accent-orange: #FF9500;
    --accent-green: #4ade80;
    --accent-purple: #a78bfa;
}

html.docs-page-html, 
body.docs-page {
    margin: 0 !important;
    padding: 0 !important;
    background: #0d0d0d;
    font-family: "Libre Franklin", -apple-system, system-ui, sans-serif;
    height: 100%;
    width: 100%;
    overflow: hidden;
    scrollbar-width: none;
}

html.docs-page-html::-webkit-scrollbar,
body.docs-page::-webkit-scrollbar {
    display: none;
}

.docs-page-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.docs-header-placeholder {
    flex-shrink: 0;
    z-index: 100;
    background: #0d0d0d;
}

/* Override header styles for full-width docs */
.docs-page .fn2-header {
    padding: 12px 24px;
    border-radius: 0;
    margin: 0;
}

.docs-page .fn2-header-container {
    max-width: none;
    padding: 0 1rem;
}

/* Docs Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    flex: 1;
    width: 100%;
    overflow: hidden;
}

/* Sidebar */
.docs-sidebar {
    height: 100%;
    overflow-y: auto;
    padding: 2rem 1.5rem 2rem 2.5rem;
    border-right: 1px solid var(--border-xlight);
    background: rgba(12, 12, 12, 0.95);
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.docs-sidebar::-webkit-scrollbar {
    display: none;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-nav a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.sidebar-nav a:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.sidebar-nav a.active {
    color: var(--text-primary);
    background: rgba(130,177,255,0.08);
}

/* Main Content Wrapper */
.docs-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    height: 100%;
    overflow-y: auto;
}

/* Main Content */
.docs-content {
    padding: 3rem 4rem 3rem 5rem;
    max-width: 1000px;
    width: 100%;
    flex: 1;
}

.docs-footer {
    margin-top: auto;
    padding: 2rem 4rem;
}

.docs-hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-xlight);
}

/* Documentation Images */
.docs-figure {
    margin: 2rem 0;
    padding: 0;
}

.docs-figure img {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--border-light);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.docs-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    font-style: italic;
}

.docs-hero h1 {
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.docs-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-weight: 300;
}

/* Section Styles */
.docs-section {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

.docs-section h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-xlight);
    letter-spacing: -0.01em;
}

.docs-section h3 {
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 2rem 0 1rem 0;
}

.docs-section p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1.25rem;
    font-weight: 300;
}

.docs-section ul, .docs-section ol {
    margin: 1rem 0 1.5rem 0;
    padding-left: 1.5rem;
}

.docs-section li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

.docs-section li strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* Code Blocks */
.code-block {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 1rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-xlight);
}

.code-lang {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.code-copy {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.code-copy:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.05);
}

.code-content {
    padding: 1rem 1.25rem;
    overflow-x: auto;
}

.code-content code {
    font-family: "SF Mono", "Fira Code", "Monaco", monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.code-content .keyword { color: #c792ea; }
.code-content .string { color: #c3e88d; }
.code-content .number { color: #f78c6c; }
.code-content .comment { color: #546e7a; }
.code-content .function { color: #82aaff; }

/* Inline Code */
code.inline {
    background: rgba(130,177,255,0.1);
    color: var(--accent-blue);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.85em;
}

/* Info Cards */
.info-card {
    background: rgba(130,177,255,0.06);
    border: 1px solid rgba(130,177,255,0.15);
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.info-card.warning {
    background: rgba(251,191,36,0.06);
    border-color: rgba(251,191,36,0.2);
}

.info-card.tip {
    background: rgba(74,222,128,0.06);
    border-color: rgba(74,222,128,0.15);
}

.info-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.info-card-header svg {
    width: 18px;
    height: 18px;
    stroke: var(--accent-blue);
    stroke-width: 2;
    fill: none;
}

.info-card.warning .info-card-header svg {
    stroke: #fbbf24;
}

.info-card.tip .info-card-header svg {
    stroke: var(--accent-green);
}

.info-card-header span {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.info-card.warning .info-card-header span {
    color: #fbbf24;
}

.info-card.tip .info-card-header span {
    color: var(--accent-green);
}

.info-card p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Feature Cards */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin: 1.5rem 0;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 1.5rem;
    transition: all 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-1px);
}

.feature-card-icon {
    width: 40px;
    height: 40px;
    background: rgba(130,177,255,0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-card-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--accent-blue);
    stroke-width: 1.5;
    fill: none;
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    line-height: 1.5;
    margin: 0;
}

/* Steps */
.steps {
    counter-reset: step;
    margin: 1.5rem 0;
}

.step {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background: rgba(130,177,255,0.1);
    border: 1px solid rgba(130,177,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-blue);
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0.25rem 0 0.5rem 0;
}

.step-content p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* Table */
.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.docs-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 500;
}

.docs-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-xlight);
    color: var(--text-secondary);
}

.docs-table tr:last-child td {
    border-bottom: none;
}

/* Keyboard Shortcuts */
kbd {
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-family: "SF Mono", monospace;
    font-size: 0.8em;
    color: var(--text-secondary);
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    html.docs-page-html {
        overflow-y: auto;
    }

    .docs-page-wrapper {
        height: auto;
        min-height: 100vh;
    }

    body.docs-page {
        overflow-y: auto;
    }

    .docs-layout {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .docs-sidebar {
        display: none;
    }

    .docs-main {
        height: auto;
        overflow: visible;
    }

    .docs-content {
        padding: 2rem 1.5rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .docs-hero h1 {
        font-size: 2rem;
    }
}

/* Scrollbar */
html {
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
    scroll-behavior: smooth;
}

html::-webkit-scrollbar,
.docs-main::-webkit-scrollbar {
    width: 8px;
}

.docs-main::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.docs-main::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.docs-main {
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
    scroll-behavior: smooth;
}


