/* Documentation Pages Styles */

/* Documentation Header */
.docs-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--text-inverse);
    padding: calc(var(--nav-height) + 2rem) 0 2rem;
    position: relative;
    overflow: hidden;
}

.docs-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: grid-move 20s linear infinite;
    opacity: 0.3;
}

.docs-header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.docs-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.docs-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-inverse);
}

.docs-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.6;
}

.docs-version {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--text-inverse);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Documentation Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    min-height: calc(100vh - var(--nav-height));
    background-color: var(--bg-primary);
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
    overflow-y: auto;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
}

.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.sidebar-search {
    padding: 0 1.5rem 1.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0 1.5rem;
}

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

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

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
}

.sidebar-link:hover {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar-link.active {
    background-color: var(--primary-10);
    color: var(--primary);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary);
    border-radius: 0 3px 3px 0;
}

/* Main Content */
.docs-content {
    background-color: var(--bg-card);
    padding: 2rem 3rem;
    overflow-x: auto;
}

.docs-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.docs-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--text-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-light);
}

.docs-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--primary);
}

.docs-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
}

.docs-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.docs-content ul,
.docs-content ol {
    margin: 1rem 0 1rem 1.5rem;
    color: var(--text-secondary);
}

.docs-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Code Blocks */
.docs-content pre {
    background-color: var(--bg-code);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.docs-content code {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.6;
    color: #e2e8f0;
}

.docs-content pre code {
    display: block;
    color: #e2e8f0;
    background: none;
    padding: 0;
    border-radius: 0;
}

.docs-content :not(pre) > code {
    background-color: var(--bg-secondary);
    color: var(--primary);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Copy Button */
.copy-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.5rem;
    color: #e2e8f0;
    cursor: pointer;
    opacity: 0;
    transition: all var(--transition-fast);
    font-size: 0.875rem;
}

.docs-content pre:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Section Dividers */
.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, transparent 0%, var(--border-color) 50%, transparent 100%);
    margin: 3rem 0;
    border: none;
}

/* Example Output */
.example-output {
    background-color: var(--bg-secondary);
    border-left: 4px solid var(--accent);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Installation Steps */
.installation-step {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1rem 0;
}

.installation-step h3 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background-color: var(--primary);
    color: var(--text-inverse);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
}

/* API Method Cards */
.api-method {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    transition: all var(--transition-normal);
}

.api-method:hover {
    border-color: var(--primary-20);
    box-shadow: var(--shadow-md);
}

.api-method h3 {
    margin-top: 0;
    color: var(--primary);
    font-family: var(--font-mono);
    font-size: 1.125rem;
}

.api-method .method-signature {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* License */
.license {
    text-align: center;
    padding: 2rem;
    margin-top: 3rem;
    background-color: var(--bg-secondary);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* Breadcrumb */
.breadcrumb {
    background-color: var(--bg-secondary);
    padding: 1rem 3rem;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }
    
    .docs-sidebar {
        position: static;
        height: auto;
        max-height: 300px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .docs-content {
        padding: 1.5rem 2rem;
    }
}

@media (max-width: 768px) {
    .docs-header-content {
        padding: 0 1rem;
    }
    
    .docs-title {
        font-size: 2rem;
    }
    
    .docs-content {
        padding: 1rem;
    }
    
    .docs-content h2 {
        font-size: 1.25rem;
    }
    
    .docs-content h3 {
        font-size: 1.125rem;
    }
    
    .sidebar-nav {
        padding: 0 1rem;
    }
    
    .breadcrumb {
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .docs-content pre {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .copy-btn {
        display: none;
    }
    
    .api-method {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}
