/* =========================================
   DOCUMENTATION PAGES AESTHETIC
========================================= */

body.doc-page {
    /* Use a rich radial gradient for the documentation background, totally detached from the video */
    background: radial-gradient(circle at top right, rgba(14, 165, 233, 0.15), transparent 40%),
        radial-gradient(circle at bottom left, rgba(20, 184, 166, 0.1), transparent 40%),
        var(--bg-dark);
    background-color: var(--bg-dark);
    background-attachment: fixed;
    padding: 0;
    margin: 0;
    display: block;
    min-height: 100vh;
    color: var(--text);
    overflow-y: auto;
}

/* Persistent Top Navigation Bar */
.top-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    padding: 1.25rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(3, 7, 18, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
}

.btn-back {
    color: var(--primary);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s ease;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.btn-back:hover {
    color: #fff;
    background: rgba(14, 165, 233, 0.25);
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
}

.nav-title {
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-size: 1rem;
}

/* Main Documentation Content Area */
.doc-content {
    max-width: 900px;
    margin: 4rem auto;
    padding: 4rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.doc-content .subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3.5rem;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 2.5rem;
    line-height: 1.6;
}

.doc-section {
    margin-bottom: 4rem;
}

.doc-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--text);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.doc-section h2::before {
    content: "";
    display: block;
    width: 6px;
    height: 1.5rem;
    background: var(--secondary);
    border-radius: 4px;
}

.doc-section p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.doc-section ul {
    margin-left: 2rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.doc-section li {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.doc-section code:not(pre code) {
    background: rgba(14, 165, 233, 0.15);
    padding: 0.2em 0.4em;
    border-radius: 6px;
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    font-size: 0.9em;
    border: 1px solid rgba(14, 165, 233, 0.3);
}

/* Code Blocks & Copy Button Styling */
pre {
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;
    background: #0d1117;
    /* GitHub Dark Base */
}

pre code {
    background: transparent !important;
    padding: 1.5rem 1.5rem 1.5rem 1.5rem !important;
    font-size: 0.95rem;
    line-height: 1.6;
    font-family: 'Fira Code', 'Consolas', monospace;
    color: inherit;
    display: block;
    overflow-x: auto;
}

/* The Copy Button */
.copy-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    z-index: 10;
}

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

.copy-btn.copied {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.doc-content {
    animation: fadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .doc-content {
        padding: 2rem;
        margin: 2rem 1rem;
    }

    .top-nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
}