/* Documentation Page Styles */

/* Layout */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
}

/* Sidebar */
.docs-sidebar {
    width: 300px;
    background: var(--dark-surface);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 70px;
    left: 0;
    height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 30px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    background: var(--dark-card);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(145, 70, 255, 0.1);
}

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

/* Sidebar Navigation */
.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-section h4 {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0 20px 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.nav-item {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--primary-color);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(145, 70, 255, 0.1);
    border-left-color: var(--primary-color);
}

/* Main Content */
.docs-content {
    flex: 1;
    margin-left: 300px;
    padding: 40px;
    max-width: calc(100% - 300px);
}

/* Documentation Sections */
.doc-section {
    margin-bottom: 80px;
    scroll-margin-top: 100px;
}

.doc-section h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.doc-section h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(145, 70, 255, 0.3);
}

.doc-section h3 {
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 600;
    margin: 30px 0 15px;
}

.doc-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 1rem;
}

.doc-section ul, .doc-section ol {
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-left: 30px;
}

.doc-section li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.lead {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 400;
    margin-bottom: 40px;
}

/* Feature Highlights */
.feature-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.highlight-card {
    background: var(--dark-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition);
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-soft);
    border-color: rgba(145, 70, 255, 0.3);
}

.highlight-card i {
    background: var(--gradient-primary);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.5rem;
    color: white;
}

.highlight-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.highlight-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Alerts */
.alert {
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.alert i {
    font-size: 1.2rem;
    margin-top: 2px;
}

.alert-info {
    background: rgba(0, 245, 255, 0.1);
    border: 1px solid rgba(0, 245, 255, 0.3);
    color: var(--secondary-color);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: #ffc107;
}

.alert-danger {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

/* Requirements Grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.requirement-card {
    background: var(--dark-card);
    padding: 25px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.requirement-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.requirement-card ul {
    margin: 0;
    padding-left: 20px;
}

.requirement-card li {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Code Blocks */
.code-block {
    background: #1e1e1e;
    border-radius: var(--border-radius);
    margin: 30px 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

.copy-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}

.copy-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.code-block pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-block code {
    color: #f8f8f2;
}

/* Inline Code */
:not(pre) > code {
    background: var(--dark-card);
    color: var(--secondary-color);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Memory Categories */
.memory-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.category-card {
    background: var(--dark-card);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.category-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.category-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Command List */
.command-list {
    display: grid;
    gap: 20px;
    margin: 30px 0;
}

.command-item {
    background: var(--dark-card);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.command-item code {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    background: transparent;
    padding: 0;
    border: none;
}

.command-item p {
    margin: 10px 0 0;
    color: var(--text-secondary);
}

/* API Documentation */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.api-card {
    background: var(--dark-card);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.api-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.api-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.api-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.api-method {
    background: var(--dark-card);
    padding: 30px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

.api-method h3 {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.api-params {
    margin: 20px 0;
}

.api-params h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 10px;
}

.api-params ul {
    margin: 0;
    padding-left: 20px;
}

.api-params li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.api-params code {
    color: var(--secondary-color);
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .docs-sidebar {
        width: 250px;
    }
    
    .docs-content {
        margin-left: 250px;
        max-width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        position: fixed;
        left: -300px;
        width: 300px;
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .docs-sidebar.open {
        left: 0;
    }
    
    .docs-content {
        margin-left: 0;
        max-width: 100%;
        padding: 20px;
    }
    
    .feature-highlights {
        grid-template-columns: 1fr;
    }
    
    .requirements-grid {
        grid-template-columns: 1fr;
    }
    
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .memory-categories {
        grid-template-columns: 1fr;
    }
    
    /* Mobile menu button */
    .mobile-menu-btn {
        position: fixed;
        top: 85px;
        left: 20px;
        z-index: 1001;
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 12px;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: var(--shadow-soft);
        transition: var(--transition);
    }
    
    .mobile-menu-btn:hover {
        transform: scale(1.1);
    }
}

/* Scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Active section highlighting */
.nav-item.active {
    position: relative;
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-primary);
}

/* Search highlight */
.search-highlight {
    background: rgba(255, 255, 0, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
}

/* Loading states */
.docs-content.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Print styles */
@media print {
    .docs-sidebar {
        display: none;
    }
    
    .docs-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .code-block {
        page-break-inside: avoid;
    }
}