/* documentation.css */

/* Layout */
.doc-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 3rem;
    position: relative;
    margin-top: 80px; /* Offset for fixed header */
    min-height: calc(100vh - 80px);
}

/* Sidebar */
.doc-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px; /* Below header */
    height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.doc-sidebar::-webkit-scrollbar {
    width: 4px;
}
.doc-sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.doc-sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

/* Search */
.doc-search-wrapper {
    position: sticky;
    top: 0;
    background: var(--bg);
    padding-bottom: 1.5rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.doc-search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fcfcfc;
    color: #111111;
    font-family: inherit;
    font-size: 16px;
    transition: all 0.2s ease;
}

.doc-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.doc-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--muted-fg);
    pointer-events: none;
}

/* Sidebar Navigation */
.doc-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.doc-nav-item {
    margin-bottom: 0.25rem;
}

.doc-nav-link {
    display: block;
    padding: 8px 12px;
    color: #666666;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.doc-nav-link:hover {
    color: #111111;
    background: #f8f9fa;
}

.doc-nav-link.active {
    color: #111111;
    background: #f0f0f0;
    font-weight: 700;
}

.doc-nav-sublist {
    list-style: none;
    padding-left: 1rem;
    margin-top: 0.25rem;
    border-left: 1px solid var(--border);
    margin-left: 0.75rem;
}

.doc-nav-sublink {
    display: block;
    padding: 0.35rem 0.75rem;
    color: var(--muted-fg);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.doc-nav-sublink:hover, .doc-nav-sublink.active {
    color: #111111;
}

.doc-content {
    flex-grow: 1;
    min-width: 0; 0; */
    max-width: 850px;
    padding-bottom: 4rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.doc-content section {
    margin-bottom: 4rem;
    scroll-margin-top: 120px;
}

/* Typography in Content */
.doc-content h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    line-height: 1.1;
    color: #111111;
}

.doc-content h2 {
    font-size: 38px;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-top: 48px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    color: #161616;
}

.doc-content h3 {
    font-size: 28px;
    font-weight: 600;
    margin-top: 32px;
    margin-bottom: 16px;
    color: #222222;
}

.doc-content h4 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 12px;
    color: #222222;
}

.doc-content p {
    color: #444444;
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: 18px;
}

.doc-content ul, .doc-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
    color: #444444;
    line-height: 1.7;
    font-size: 18px;
}

.doc-content li {
    margin-bottom: 8px;
}

.doc-content a {
    color: var(--fg);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 500;
}

.doc-content strong {
    font-weight: 700;
    color:black;
}

/* Breadcrumbs */
.doc-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666666;
    margin-bottom: 32px;
}

.doc-breadcrumbs a {
    color: #666666;
    text-decoration: none;
}

.doc-breadcrumbs a:hover {
    color: var(--fg);
}

.doc-breadcrumbs svg {
    width: 14px;
    height: 14px;
}

/* Code Blocks */
.doc-code-block {
    position: relative;
    background: #111111;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
}

.doc-code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: #1a1a1a;
    border-bottom: 1px solid #333;
}

.doc-code-lang {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.doc-copy-btn {
    background: none;
    border: 1px solid #333;
    color: #888;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.doc-copy-btn:hover {
    background: #333;
    color: #fff;
}

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

.doc-code-content pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #e5e5e5;
}

/* Callouts */
.doc-callout {
    padding: 24px;
    border-radius: 12px;
    border-left: 4px solid var(--accent);
    background: #f8f9fa;
    margin: 24px 0;
    display: flex;
    gap: 16px;
}

.doc-callout-icon {
    flex-shrink: 0;
    margin-top: 4px;
    color: #444444;
}

.doc-callout-content p {
    margin-bottom: 0;
    font-size: 1rem;
}

.doc-callout-content p:not(:last-child) {
    margin-bottom: 0.75rem;
}

.doc-callout.warning {
    border-left-color: #555555;
    background: #f5f5f5;
}

.doc-callout.info {
    border-left-color: #333333;
    background: #f8f9fa;
}

.doc-callout.success {
    border-left-color: #111111;
    background: #f0f0f0;
}

/* Tables */
.doc-table-wrapper {
    overflow-x: auto;
    margin: 24px -24px;
    padding: 0 24px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.doc-table th, .doc-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    color: #444444;
}

.doc-table th {
    background: #f8f9fa;
    font-weight: 700;
    color: #222222;
    position: sticky;
    top: 0;
}

.doc-table tr:hover td {
    background: #fafafa;
}

.doc-table tr:nth-child(even) td {
    background: #fcfcfc;
}

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

/* Badges */
.doc-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    background: var(--muted);
    border: 1px solid var(--border);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.doc-badge.windows { background: rgba(0, 120, 212, 0.1); border-color: rgba(0, 120, 212, 0.2); color: #0078D4; }
.doc-badge.android { background: rgba(61, 220, 132, 0.1); border-color: rgba(61, 220, 132, 0.2); color: #00A34A; }

/* Accordions / FAQ */
.doc-accordion {
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.doc-accordion-header {
    width: 100%;
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg);
    border: none;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--fg);
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.doc-accordion-header:hover {
    background: var(--muted);
}

.doc-accordion-icon {
    transition: transform 0.3s ease;
}

.doc-accordion.active .doc-accordion-icon {
    transform: rotate(180deg);
}

.doc-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: var(--muted);
}

.doc-accordion.active .doc-accordion-content {
    max-height: 1000px;
}

.doc-accordion-inner {
    padding: 1.25rem;
    border-top: 1px solid var(--border);
}

/* Timeline / Changelog */
.doc-timeline {
    position: relative;
    padding-left: 2rem;
    margin: 2rem 0;
}

.doc-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 6px;
    width: 2px;
    background: var(--border);
}

.doc-timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.doc-timeline-item::before {
    content: '';
    position: absolute;
    top: 0.4rem;
    left: -2rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent);
    border: 3px solid var(--bg);
}

.doc-timeline-date {
    font-size: 0.85rem;
    color: var(--muted-fg);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.doc-timeline-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Feature Grid */
.doc-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.doc-feature-card {
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.doc-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.05);
}

.doc-feature-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 1rem;
    color: var(--fg);
}

.doc-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .doc-container {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .doc-sidebar {
        display: none;
    }
    
    .hero-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-left {
        width: 100%;
        align-items: center;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .hero-features {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .doc-container {
        padding: 1rem;
    }
    
    .hero-inner {
        padding: 2rem 1rem;
    }
    
    .hero-headline {
        font-size: clamp(2.5rem, 8vw, 4rem) !important;
    }
    
    .hero-actions .btn-primary {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .doc-tabs {
        display: flex;
        width: 100%;
    }
    
    .doc-tab {
        flex: 1;
        text-align: center;
    }
    
    .doc-content h1 {
        font-size: clamp(32px, 8vw, 40px);
    }
    
    .doc-content h2 {
        font-size: clamp(24px, 6vw, 32px);
    }
    
    .doc-content h3 {
        font-size: clamp(20px, 5vw, 24px);
    }
}

/* Tabs */
.doc-tabs-container {
    margin-bottom: 32px;
}
.doc-tabs {
    display: inline-flex;
    background: #f0f0f0;
    padding: 4px;
    border-radius: 8px;
    gap: 4px;
}
.doc-tab {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #666666;
    cursor: pointer;
    background: transparent;
    border: none;
    transition: all 0.2s ease;
}
.doc-tab:hover {
    color: #111111;
}
.doc-tab.active {
    background: #ffffff;
    color: #111111;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.doc-tab-content {
    display: none;
}
.doc-tab-content.active {
    display: block;
}
