/* Custom Styles for API Documentation */

.gradient-title {
    background: linear-gradient(90deg, #0f172a 0%, #0ea5e9 35%, #2563eb 60%, #0f172a 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 220% 100%;
    animation: shimmer 6s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: 0% 50% }
    100% { background-position: 100% 50% }
}

.section-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.api-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.75rem;
}

.badge-post {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-get {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.param-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.param-table th {
    background: #f1f5f9;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
}

.param-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #e2e8f0;
}

.param-table tr:hover {
    background: #f8fafc;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.copy-btn:hover {
    background: white;
    border-color: #cbd5e1;
}

.code-block-wrapper {
    position: relative;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 1000;
}

.toast.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

pre[class*="language-"] {
    padding: 1.5rem !important;
    margin: 0 !important;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

html {
    scroll-behavior: smooth;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-queued {
    background: rgba(251, 191, 36, 0.15);
    color: #92400e;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.status-processing {
    background: rgba(59, 130, 246, 0.15);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-completed {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-failed {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Sidebar styles */
#sidebar {
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.nav-link.active {
    background: #eff6ff;
    color: #2563eb;
    font-weight: 600;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: rgba(15, 23, 42, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    z-index: 100;
}

.back-to-top:hover {
    background: rgba(15, 23, 42, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    display: flex;
}

/* Scroll margin for anchor links */
.scroll-mt-20 {
    scroll-margin-top: 5rem;
}

/* Responsive sidebar */
@media (max-width: 1024px) {
    #sidebar {
        transform: translateX(-100%);
    }
    
    #sidebar.show {
        transform: translateX(0);
    }
    
    .flex-1.ml-64 {
        margin-left: 0;
    }
}

/* Smooth transitions */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Code block improvements */
.code-block-wrapper pre {
    max-height: 600px;
    overflow-y: auto;
}

.code-block-wrapper pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.code-block-wrapper pre::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 4px;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.code-block-wrapper pre::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Section spacing */
section {
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Link hover effects */
a {
    position: relative;
}

a:not(.nav-link)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: currentColor;
    transition: width 0.3s ease;
}

a:not(.nav-link):hover::after {
    width: 100%;
}

/* Print styles */
@media print {
    #sidebar,
    .back-to-top,
    header nav,
    .copy-btn {
        display: none !important;
    }
    
    .flex-1.ml-64 {
        margin-left: 0 !important;
    }
    
    body {
        background: white;
    }
}