/* ========================================
   API DOCUMENTATION - STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #1e293b;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #334155;
    background: #f8fafc;
}

/* Layout */
.docs-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    color: white;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 700;
}

.sidebar-header .logo i {
    font-size: 24px;
    color: var(--primary);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 30px;
}

.nav-title {
    padding: 10px 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.5);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item i {
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.nav-item:hover {
    background: rgba(255,255,255,0.05);
    color: white;
    border-left-color: var(--primary);
}

.nav-item.active {
    background: rgba(99, 102, 241, 0.15);
    color: white;
    border-left-color: var(--primary);
    font-weight: 600;
}

.nav-item.active i {
    opacity: 1;
    color: var(--primary);
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.api-version {
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    margin-bottom: 15px;
    color: rgba(255,255,255,0.7);
}

.btn-portal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-portal:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* Main Content */
.docs-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    background: #ffffff;
}

.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 999;
    background: var(--primary);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
}

/* Typography */
h1 {
    font-size: 42px;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    margin-top: 50px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

h3 {
    font-size: 24px;
    font-weight: 600;
    color: var(--dark);
    margin-top: 35px;
    margin-bottom: 15px;
}

h4 {
    font-size: 18px;
    font-weight: 600;
    color: var(--dark);
    margin-top: 25px;
    margin-bottom: 12px;
}

p {
    margin-bottom: 20px;
    color: #475569;
    font-size: 16px;
}

.subtitle {
    font-size: 20px;
    color: var(--gray);
    margin-bottom: 40px;
}

/* Code Blocks */
pre {
    background: #1e293b !important;
    border-radius: 12px;
    padding: 20px !important;
    margin: 25px 0;
    overflow-x: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

code {
    font-family: 'Fira Code', 'Courier New', monospace;
    font-size: 14px;
}

:not(pre) > code {
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 4px;
    color: #e11d48;
    font-size: 14px;
}

/* HTTP Methods */
.http-method {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
}

.http-method.get {
    background: #dbeafe;
    color: #1e40af;
}

.http-method.post {
    background: #d1fae5;
    color: #065f46;
}

.http-method.put {
    background: #fef3c7;
    color: #92400e;
}

.http-method.delete {
    background: #fee2e2;
    color: #991b1b;
}

/* Endpoint Box */
.endpoint-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.endpoint-box h3 {
    color: white;
    margin: 0 0 15px 0;
}

.endpoint-url {
    background: rgba(255,255,255,0.15);
    padding: 15px;
    border-radius: 8px;
    font-family: 'Fira Code', monospace;
    font-size: 16px;
    word-break: break-all;
}

/* Parameter Table */
.param-table {
    width: 100%;
    border-collapse: collapse;
    margin: 25px 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.param-table th {
    background: #f8fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.param-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.param-table tr:last-child td {
    border-bottom: none;
}

.param-name {
    font-family: 'Fira Code', monospace;
    color: var(--primary);
    font-weight: 600;
}

.param-type {
    display: inline-block;
    padding: 4px 10px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.param-required {
    display: inline-block;
    padding: 4px 10px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Alert Boxes */
.alert {
    padding: 18px 20px;
    border-radius: 10px;
    margin: 25px 0;
    border-left: 4px solid;
}

.alert-info {
    background: #dbeafe;
    border-color: #3b82f6;
    color: #1e40af;
}

.alert-success {
    background: #d1fae5;
    border-color: #10b981;
    color: #065f46;
}

.alert-warning {
    background: #fef3c7;
    border-color: #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: #fee2e2;
    border-color: #ef4444;
    color: #991b1b;
}

.alert i {
    margin-right: 10px;
}

/* Response Example */
.response-example {
    background: #f8fafc;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
}

.response-example h4 {
    margin-top: 0;
    color: var(--dark);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-auth {
    background: #fef3c7;
    color: #92400e;
}

.badge-public {
    background: #d1fae5;
    color: #065f46;
}

/* Responsive */
@media (max-width: 768px) {
    .docs-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .docs-sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-close {
        display: block;
    }
    
    .docs-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .content-wrapper {
        padding: 80px 20px 40px;
    }
    
    h1 {
        font-size: 32px;
    }
    
    h2 {
        font-size: 26px;
    }
}

/* Scrollbar */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}
