/* Documentation Page Styles */

/* Documentation Hero */
.docs-hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Search Box */
.search-box {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.search-box input {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1f2937;
}

.search-box input::placeholder {
    color: #9ca3af;
}

.search-btn {
    padding: 1rem 1.5rem;
    background: #5850EC;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.125rem;
    transition: background 0.3s ease;
}

.search-btn:hover {
    background: #4338ca;
}

/* Documentation Layout */
.docs-content {
    padding: 80px 0;
    background: #f8fafc;
    min-height: 80vh;
}

.docs-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* Sidebar */
.docs-sidebar {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.docs-nav .nav-section {
    margin-bottom: 2rem;
}

.docs-nav .nav-section:last-child {
    margin-bottom: 0;
}

.docs-nav h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

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

.docs-nav li {
    margin-bottom: 0.25rem;
}

.docs-nav .nav-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.docs-nav .nav-link:hover {
    background: #f3f4f6;
    color: #374151;
}

.docs-nav .nav-link.active {
    background: #5850EC;
    color: white;
}

/* Main Content */
.docs-main {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.doc-section {
    margin-bottom: 4rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #e5e7eb;
}

.doc-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.doc-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.doc-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin: 2rem 0 1rem 0;
    line-height: 1.3;
}

.doc-section h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 1.5rem 0 0.75rem 0;
}

.doc-section p {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.doc-section ol,
.doc-section ul {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.doc-section li {
    margin-bottom: 0.5rem;
}

/* Code Blocks */
pre {
    background: #1f2937;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

pre code {
    color: #e5e7eb;
    background: none;
    padding: 0;
    border-radius: 0;
}

code {
    background: #f3f4f6;
    color: #5850EC;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 0.875rem;
}

/* Step Cards */
.step-card {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #5850EC;
}

.step-number {
    background: #5850EC;
    color: white;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.step-content h3 {
    margin: 0 0 0.75rem 0;
    color: #1f2937;
    font-size: 1.25rem;
}

.step-content p {
    margin-bottom: 1rem;
    color: #6b7280;
}

.step-content pre {
    margin: 1rem 0 0 0;
}

/* Info Boxes */
.info-box,
.warning-box {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    border-left: 4px solid;
}

.info-box {
    background: #eff6ff;
    border-color: #3b82f6;
}

.info-box h4 {
    color: #1e40af;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.info-box p {
    color: #1e40af;
    margin: 0;
}

.warning-box {
    background: #fef3c7;
    border-color: #f59e0b;
}

.warning-box h4 {
    color: #92400e;
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
}

.warning-box p {
    color: #92400e;
    margin: 0;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.docs-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.docs-table th {
    background: #f9fafb;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.docs-table td {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #6b7280;
}

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

.docs-table code {
    background: #f3f4f6;
    color: #5850EC;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* FAQ Section */
.faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background: #f9fafb;
    padding: 1.5rem;
    margin: 0;
    cursor: pointer;
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    transition: background 0.2s ease;
    position: relative;
    border: none;
    width: 100%;
    text-align: left;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: #5850EC;
    transition: transform 0.2s ease;
}

.faq-question.active::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-answer.active {
    padding: 1.5rem;
    max-height: 200px;
}

.faq-answer p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

/* Search Results */
.search-results {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    display: none;
}

.search-result {
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: #f9fafb;
}

.search-result:last-child {
    border-bottom: none;
}

.search-result h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #1f2937;
}

.search-result p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .docs-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
    
    .docs-sidebar {
        padding: 1.5rem;
    }
    
    .docs-main {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .search-box input {
        border-bottom: 1px solid #e5e7eb;
    }
    
    .search-btn {
        border-radius: 0 0 8px 8px;
    }
    
    .docs-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .docs-sidebar {
        position: static;
        max-height: none;
        order: 2;
    }
    
    .docs-main {
        order: 1;
        padding: 1.5rem;
    }
    
    .doc-section h2 {
        font-size: 1.875rem;
    }
    
    .step-card {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .docs-hero {
        padding: 80px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .docs-sidebar {
        padding: 1rem;
    }
    
    .docs-main {
        padding: 1rem;
    }
    
    .step-card {
        padding: 1.5rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .faq-question::after {
        right: 1rem;
    }
    
    .faq-answer.active {
        padding: 1rem;
    }
    
    pre {
        padding: 1rem;
        font-size: 0.8rem;
    }
    
    .docs-table th,
    .docs-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Syntax Highlighting Overrides */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
    color: #6b7280;
}

.token.punctuation {
    color: #e5e7eb;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
    color: #f87171;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
    color: #34d399;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
    color: #60a5fa;
}

.token.atrule,
.token.attr-value,
.token.keyword {
    color: #a78bfa;
}

.token.function,
.token.class-name {
    color: #fbbf24;
}

.token.regex,
.token.important,
.token.variable {
    color: #f472b6;
}

/* Scrollbar Styling */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}