/* Enhanced Documentation Styles with Sidebar */
:root {
    --sidebar-width: 280px;
    --sidebar-bg: #1a1a1a;
    --sidebar-border: #333;
    --sidebar-hover: #ff6b00;
    --content-padding: 2rem;
}

/* Animation Keyframes */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        transform: translate3d(0, 50px, 0);
        opacity: 0;
    }
    to {
        transform: translate3d(0, 0, 0);
        opacity: 1;
    }
}

/* Documentation Layout */
.docs-layout {
    display: flex;
    min-height: calc(100vh - 200px);
    margin-top: 80px;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    background: linear-gradient(135deg, var(--background-dark) 0%, #0a0a0a 100%);
    position: relative;
    background-attachment: fixed;
}

/* Sidebar Styles */
.docs-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    border-right: 1px solid rgba(255, 107, 0, 0.2);
    padding: 2rem 0;
    position: fixed;
    height: calc(100vh - 80px);
    min-height: calc(100vh - 80px);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

.docs-sidebar.hidden {
    transform: translateX(-100%);
}

.docs-sidebar-toggle {
    display: none;
    position: fixed;
    top: 100px;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    z-index: 101;
}

/* Sidebar Header */
.sidebar-header {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.sidebar-header h3 {
    color: var(--primary-color);
    margin: 0;
}

/* Sidebar Navigation */
.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
    max-height: calc(100% - 100px);
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 3px solid transparent;
    margin: 0.25rem 0.5rem;
    border-radius: 8px;
}

.sidebar-nav a:hover {
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 107, 0, 0.05) 100%);
    color: var(--text-light);
    border-left: 3px solid var(--primary-color);
    transform: translateX(5px);
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.2) 0%, rgba(255, 107, 0, 0.1) 100%);
    color: var(--text-light);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

/* Sidebar Icons */
.sidebar-icon {
    margin-right: 0.75rem;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

/* Documentation Content */
.docs-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    transition: all 0.3s ease;
    opacity: 0;
    animation: slideInUp 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.3s forwards;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, var(--background-dark) 0%, #0a0a0a 100%);
    background-attachment: fixed;
}

.docs-content.full-width {
    margin-left: 0;
}

.docs-content.full-width {
    margin-left: 0;
}

/* Documentation Index Page */
.docs-index {
    padding: 2rem;
    opacity: 0;
    animation: fadeIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.2s forwards;
    background: linear-gradient(135deg, var(--background-dark) 0%, #0a0a0a 100%);
    min-height: calc(100vh - 80px);
    background-attachment: fixed;
}

.docs-index h1 {
    text-align: left;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.docs-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.docs-category {
    background: linear-gradient(145deg, var(--background-light) 0%, var(--background-dark) 100%);
    border-radius: 16px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 107, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255, 107, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: glow 3s ease-in-out infinite alternate;
}

.docs-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--primary-color);
    border-color: var(--primary-color);
    animation: none;
}

.docs-category h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 0.75rem;
}

.docs-category h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff8c00 100%);
    border-radius: 4px;
}

.category-icon {
    margin-right: 0.75rem;
    font-size: 1.5rem;
}

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

.docs-category li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.docs-category li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.docs-category a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    padding: 0.5rem;
    border-radius: 6px;
}

.docs-category a:hover {
    color: var(--primary-color);
    background-color: rgba(255, 107, 0, 0.1);
    transform: translateX(5px);
}

.docs-category a .sidebar-icon {
    margin-right: 0.75rem;
    font-size: 1rem;
    color: var(--primary-color);
}

/* Documentation Page Enhancements */
.doc-page {
    max-width: 1200px;
    margin: 0;
    opacity: 0;
    animation: slideInUp 0.5s ease-out forwards;
    background: linear-gradient(135deg, var(--background-dark) 0%, #0a0a0a 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 107, 0, 0.1);
    background-attachment: fixed;
}

/* Enhanced Documentation Content */
.doc-content-enhanced {
    max-width: 100%;
    margin: 0;
    padding: 1rem;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.7) 0%, rgba(20, 20, 20, 0.9) 100%);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 107, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 2rem;
}

.doc-breadcrumb {
    margin-bottom: 1.5rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(145deg, var(--background-light) 0%, #1a1a1a 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 0, 0.1);
    font-size: 0.9rem;
}

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

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

.doc-breadcrumb span {
    color: var(--text-dark);
}

.doc-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 107, 0, 0.2);
    position: relative;
}

.doc-header h1 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 2.5rem;
    font-weight: 800;
    text-align: left;
}

.doc-header.staggered-animation.animated h1 {
    background: linear-gradient(90deg, var(--primary-color) 0%, #ff8c00 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.doc-intro {
    color: var(--text-dark);
    font-size: 1.2rem;
    line-height: 1.6;
    margin-top: 1rem;
    max-width: 100%;
    text-align: left;
}

.doc-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.doc-toc {
    background: linear-gradient(145deg, var(--background-light) 0%, var(--background-dark) 100%);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid rgba(255, 107, 0, 0.1);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.doc-toc h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.doc-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.doc-toc a {
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s ease;
}

.doc-toc a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Enhanced Content Styles */
.doc-content-enhanced h1 {
    color: var(--text-light);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--primary-color);
    font-weight: 800;
    font-size: 2.2rem;
    text-align: left;
    position: relative;
    padding-left: 0;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.1) 0%, transparent 100%);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-left: -1.5rem;
    margin-right: -1.5rem;
}

.doc-content-enhanced h1::before {
    content: "#";
    color: var(--primary-color);
    margin-right: 0.5rem;
    opacity: 0.7;
}

.doc-content-enhanced h2 {
    color: var(--primary-color);
    margin-top: 2rem;
    margin-bottom: 1.2rem;
    font-weight: 700;
    font-size: 1.8rem;
    text-align: left;
    position: relative;
    padding-left: 0;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.05) 0%, transparent 100%);
    padding: 0.8rem 1.2rem;
    border-radius: 6px;
    margin-left: -1.2rem;
    margin-right: -1.2rem;
}

.doc-content-enhanced h2::before {
    content: "##";
    color: var(--primary-color);
    margin-right: 0.5rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

.doc-content-enhanced h3 {
    color: var(--text-light);
    margin-top: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.5rem;
    text-align: left;
    position: relative;
    padding-left: 0;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.03) 0%, transparent 100%);
    padding: 0.6rem 1rem;
    border-radius: 4px;
    margin-left: -1rem;
    margin-right: -1rem;
}

.doc-content-enhanced h3::before {
    content: "###";
    color: var(--primary-color);
    margin-right: 0.5rem;
    opacity: 0.7;
    font-size: 0.8rem;
}

.doc-content-enhanced p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.2rem;
    font-size: 1.05rem;
    text-align: left;
}

.doc-content-enhanced ul, .doc-content-enhanced ol {
    margin-bottom: 1.8rem;
    padding-left: 2rem;
    text-align: left;
}

.doc-content-enhanced li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    line-height: 1.6;
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.3s ease;
}

.doc-content-enhanced li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
    font-size: 1.2rem;
}

.doc-content-enhanced li:hover {
    transform: translateX(5px);
    color: var(--primary-color);
}

.doc-content-enhanced code {
    background: linear-gradient(145deg, var(--background-light) 0%, #1a1a1a 100%);
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    font-size: 0.95em;
    border: 1px solid rgba(255, 107, 0, 0.1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.doc-content-enhanced code:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.3);
    border-color: var(--primary-color);
}

.doc-content-enhanced pre {
    background: linear-gradient(145deg, var(--background-light) 0%, #1a1a1a 100%);
    padding: 1.8rem;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 1.8rem;
    border: 1px solid rgba(255, 107, 0, 0.1);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.4);
    position: relative;
    transition: all 0.3s ease;
}

.doc-content-enhanced pre:hover {
    transform: translateY(-5px);
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6), 0 10px 30px rgba(255, 107, 0, 0.2);
    border-color: var(--primary-color);
}

/* Documentation Content Body */
.doc-content-body {
    padding: 1rem 0;
    text-align: left;
}

.doc-content-enhanced pre code {
    background-color: transparent;
    padding: 0;
    color: var(--text-light);
    font-size: 0.9em;
}

.doc-content-enhanced a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 1px dotted var(--primary-color);
    transition: all 0.3s ease;
    padding: 0.1rem 0.2rem;
    border-radius: 3px;
}

.doc-content-enhanced a:hover {
    text-decoration: underline;
    border-bottom: 1px solid var(--primary-color);
    background-color: rgba(255, 107, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

.doc-content-enhanced table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    background: linear-gradient(145deg, var(--background-light) 0%, #1a1a1a 100%);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 107, 0, 0.1);
    transition: all 0.3s ease;
}

.doc-content-enhanced table:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--primary-color);
    border-color: var(--primary-color);
}

.doc-content-enhanced table th,
.doc-content-enhanced table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.doc-content-enhanced table th {
    background: linear-gradient(145deg, rgba(255, 107, 0, 0.15) 0%, rgba(255, 107, 0, 0.05) 100%);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

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

.doc-content-enhanced blockquote {
    border-left: 5px solid var(--primary-color);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    background: linear-gradient(90deg, rgba(255, 107, 0, 0.1) 0%, rgba(255, 107, 0, 0.05) 100%);
    border-radius: 0 12px 12px 0;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.doc-content-enhanced blockquote:hover {
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2), 0 0 0 1px var(--primary-color);
    border-left-width: 8px;
}

.doc-content-enhanced blockquote p {
    margin-bottom: 0;
    color: var(--text-dark);
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Search Box */
.docs-search {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(255, 107, 0, 0.2);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.docs-search input {
    width: 100%;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 107, 0, 0.2);
    background: linear-gradient(145deg, #1a1a1a 0%, #0a0a0a 100%);
    color: var(--text-light);
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
}

.docs-search input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.3), inset 0 0 15px rgba(255, 107, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 992px) {
    .docs-sidebar {
        transform: translateX(-100%);
    }
    
    .docs-sidebar.visible {
        transform: translateX(0);
    }
    
    .docs-sidebar-toggle {
        display: block;
    }
    
    .docs-content {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .docs-layout {
        flex-direction: column;
    }
    
    .docs-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        transform: none !important;
    }
    
    .docs-sidebar.visible {
        transform: none !important;
    }
    
    .docs-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .docs-index {
        padding: 1rem;
    }
    
    .docs-categories {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .docs-category {
        padding: 1.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 107, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 107, 0, 0); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 107, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 107, 0, 0.8), 0 0 30px rgba(255, 107, 0, 0.3); }
    100% { box-shadow: 0 0 5px rgba(255, 107, 0, 0.5); }
}

.sidebar-nav a {
    animation: fadeIn 0.3s ease forwards;
    opacity: 0;
}

.sidebar-nav a:nth-child(1) { animation-delay: 0.1s; }
.sidebar-nav a:nth-child(2) { animation-delay: 0.2s; }
.sidebar-nav a:nth-child(3) { animation-delay: 0.3s; }
.sidebar-nav a:nth-child(4) { animation-delay: 0.4s; }
.sidebar-nav a:nth-child(5) { animation-delay: 0.5s; }
.sidebar-nav a:nth-child(6) { animation-delay: 0.6s; }
.sidebar-nav a:nth-child(7) { animation-delay: 0.7s; }
.sidebar-nav a:nth-child(8) { animation-delay: 0.8s; }
.sidebar-nav a:nth-child(9) { animation-delay: 0.9s; }
.sidebar-nav a:nth-child(10) { animation-delay: 1.0s; }
.sidebar-nav a:nth-child(11) { animation-delay: 1.1s; }
.sidebar-nav a:nth-child(12) { animation-delay: 1.2s; }
.sidebar-nav a:nth-child(13) { animation-delay: 1.3s; }
.sidebar-nav a:nth-child(14) { animation-delay: 1.4s; }
.sidebar-nav a:nth-child(15) { animation-delay: 1.5s; }

.docs-category {
    animation: slideInLeft 0.5s ease forwards;
    opacity: 0;
}

.docs-category:nth-child(1) { animation-delay: 0.2s; }
.docs-category:nth-child(2) { animation-delay: 0.4s; }
.docs-category:nth-child(3) { animation-delay: 0.6s; }
.docs-category:nth-child(4) { animation-delay: 0.8s; }
.docs-category:nth-child(5) { animation-delay: 1.0s; }

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

.docs-sidebar::-webkit-scrollbar-track {
    background: var(--background-dark);
}

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

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