/* API Documentation Styles */
.premium-nav .nav-link {
    border-radius: 12px;
    margin-bottom: 8px;
    color: #636e72;
    padding: 14px 20px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    display: flex;
    align-items: center;
    gap: 12px;
}
.premium-nav .nav-link i { font-size: 1.1rem; }
.premium-nav .nav-link:hover {
    background-color: rgba(139, 92, 246, 0.05);
    color: #8b5cf6;
    transform: translateX(5px);
}
.premium-nav .nav-link.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
    border: none;
}

.api-header {
    background: linear-gradient(to right, #020617, #0f172a);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Auth version of header */
.auth-mode .api-header {
    background: linear-gradient(to right, #ffffff, #f8f9ff) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    color: #0f172a !important;
}
.auth-mode .api-header h3 { color: #0f172a !important; }

.key-badge {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-mode .key-badge {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.doc-section {
    background: #ffffff;
    border-radius: 24px;
    padding: 40px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    color: #1e293b;
}

/* Guest Documentation Wrapper */
.guest-mode {
    background: radial-gradient(circle at 50% 0%, #1e1b4b, #0f172a);
    background-color: #0f172a;
    min-height: calc(100vh - 80px); /* Adjust for navbar */
    width: 100%;
    padding-top: 100px; /* Space for navbar */
}

/* Auth mode padding refinement */
.auth-mode {
    padding-top: 40px !important;
}
.guest-mode .doc-section {
    background: rgba(15, 23, 42, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #f1f5f9 !important;
    backdrop-filter: blur(10px);
}
.guest-mode .doc-section .text-muted { color: #94a3b8 !important; }
.guest-mode .doc-section h3, 
.guest-mode .doc-section h5, 
.guest-mode .doc-section h6 { color: #fff !important; }

/* Table Guest Refinement */
.guest-mode .doc-section .table {
    color: #e2e8f0 !important;
    --bs-table-bg: transparent !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.03) !important;
}
.guest-mode .doc-section .table thead.bg-light {
    background: rgba(255, 255, 255, 0.05) !important;
}
.guest-mode .doc-section .table thead th {
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    font-weight: 700;
}
.guest-mode .doc-section .table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: #cbd5e1 !important;
}
.guest-mode .doc-section code {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #d8b4fe !important;
    padding: 2px 6px;
    border-radius: 4px;
}
.guest-mode .doc-section .badge.bg-info-subtle {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: #93c5fd !important;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.guest-mode .premium-nav .nav-link { color: #94a3b8 !important; }
.guest-mode .premium-nav .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.05) !important;
}
.guest-mode .premium-nav .nav-link.active {
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4) !important;
}

.code-tabs .nav-link {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 16px;
    border-radius: 8px;
    color: #64748b;
    margin-right: 5px;
}
.code-tabs .nav-link.active {
    background: #1e293b !important;
    color: #38bdf8 !important;
}

.tab-pane h3 { font-weight: 800; color: #0f172a; margin-bottom: 1.5rem; }
.tab-pane p { color: #475569; line-height: 1.6; }
.method-badge { font-weight: 700; padding: 4px 12px; border-radius: 8px; font-size: 0.75rem; text-transform: uppercase; }

.copy-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #94a3b8;
    padding: 4px 8px;
    border-radius: 6px;
    transition: 0.2s;
}
.copy-btn:hover { background: rgba(255,255,255,0.2); color: white; }


/* Mobile Desk-Style Refinement (Side-by-side Consistency) */
@media (max-width: 991px) {
    .container { padding-left: 10px !important; padding-right: 10px !important; }
    
    /* Airy Header */
    .api-header { 
        padding: 20px !important; 
        text-align: left !important; 
        border-radius: 15px !important; 
        margin-bottom: 20px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    .api-header h3 { font-size: 1.2rem !important; margin-bottom: 5px !important; }
    .api-header p { font-size: 0.85rem !important; line-height: 1.4 !important; }
    
    .key-badge { width: 100% !important; border-radius: 10px; padding: 12px 15px; justify-content: space-between; margin-top: 0 !important; }
    .key-badge .small { font-size: 0.7rem !important; }
    .key-badge code { font-size: 0.8rem !important; word-break: break-all; }

    /* Balanced Sidebar - Now Horizontal on Mobile */
    .premium-card { padding: 10px !important; border-radius: 15px !important; margin-bottom: 5px !important; background: rgba(15, 23, 42, 0.4) !important; border: 1px solid rgba(255,255,255,0.05) !important; }
    .premium-card h6 { font-size: 0.7rem !important; margin-bottom: 10px !important; text-align: left !important; padding-left: 5px !important; }
    
    .premium-nav {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        padding: 5px 2px 10px !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
        scrollbar-width: none;
    }
    .premium-nav::-webkit-scrollbar { display: none; }

    .premium-nav .nav-link {
        flex: 0 0 auto !important;
        flex-direction: row !important;
        padding: 10px 16px !important;
        font-size: 0.8rem !important;
        gap: 8px !important;
        border-radius: 10px !important;
        margin-bottom: 0 !important;
        text-align: left;
        min-height: auto !important;
        white-space: nowrap !important;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.05);
    }
    .premium-nav .nav-link i { font-size: 1rem !important; margin: 0 !important; }
    .premium-nav .nav-link.active { box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3) !important; }
    
    /* Airy Content Section */
    .doc-section { padding: 25px 15px !important; border-radius: 20px !important; }
    .doc-section h3 { font-size: 1.3rem !important; margin-bottom: 1.2rem !important; }
    .doc-section h5 { font-size: 1.1rem !important; margin-top: 1.5rem !important; }
    .doc-section p { font-size: 0.85rem !important; line-height: 1.6 !important; margin-bottom: 1rem !important; }
    
    /* Table Fixes: Horizontal Scroll is key to prevent squashing */
    .table-responsive {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        border: none !important;
    }
    .doc-section .table { 
        min-width: 500px !important; 
        font-size: 0.85rem !important; 
        margin-bottom: 1rem !important; 
    }
    .doc-section .table th, .doc-section .table td { padding: 15px 12px !important; }
    
    /* URL Overflow Fix - Only for inline code, not in pre */
    .doc-section :not(pre) > code { word-break: break-all !important; white-space: normal !important; }
    .doc-section pre code { white-space: pre !important; word-break: normal !important; }

    /* Code Blocks Optimization */
    .code-window { border-radius: 15px !important; overflow: hidden !important; margin-top: 15px !important; }
    .code-header { padding: 12px 15px !important; border-radius: 15px 15px 0 0 !important; }
    .code-header span { font-size: 0.8rem !important; }
    .code-pane { font-size: 0.75rem !important; padding: 15px !important; line-height: 1.6 !important; }
    pre { padding: 15px !important; font-size: 0.75rem !important; border-radius: 0 0 15px 15px !important; line-height: 1.6 !important; overflow-x: auto !important; }
    
    .sticky-top { position: relative !important; top: 0 !important; }
    .premium-card { position: sticky !important; top: 75px !important; z-index: 1000 !important; background: rgba(15, 23, 42, 0.95) !important; backdrop-filter: blur(15px) !important; }

    .method-badge { padding: 4px 10px !important; font-size: 0.7rem !important; border-radius: 6px !important; }
    .code-tabs .nav-link { padding: 8px 15px !important; font-size: 0.8rem !important; border-radius: 8px !important; }
    
    /* Airy Grid */
    .row.g-3 { --bs-gutter-x: 0.75rem !important; --bs-gutter-y: 0.75rem !important; }
    .gap-4 { gap: 1rem !important; }
}

/* Footer Styles (Consistent with Landing Page) */
.footer { padding: 120px 0 60px; border-top: 1px solid rgba(255, 255, 255, 0.1); background: #070b14; color: #e2e8f0; }
.footer-logo { font-size: 2.2rem; font-weight: 800; margin-bottom: 2rem; }
.footer h6 { color: #fff; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 2rem; font-size: 0.9rem; }
.footer-links a { color: #e2e8f0; text-decoration: none; display: block; margin-bottom: 1.2rem; transition: all 0.3s ease; font-size: 1rem; }
.footer-links a:hover { color: #fff; transform: translateX(5px); text-shadow: 0 0 10px rgba(139, 92, 246, 0.4); }
.footer .text-muted { color: #e2e8f0 !important; font-size: 1rem; line-height: 1.7; opacity: 0.8; }
.footer-contact-item { display: flex; align-items: center; gap: 15px; margin-bottom: 1.5rem; }
.footer-contact-icon { color: #d8b4fe; font-size: 1.4rem; }
