/* Glassmorphism Effects */
.glass-effect {
    background: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-card {
    background: rgba(31, 41, 55, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(17, 24, 39, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(139, 92, 246, 0.5);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.7);
}

/* Code Tab Buttons */
.code-tab-btn {
    padding: 0.5rem 1rem;
    background: rgba(55, 65, 81, 0.5);
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-radius: 0.5rem;
    color: rgba(156, 163, 175, 1);
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-right: 0.5rem;
}

.code-tab-btn:hover {
    background: rgba(75, 85, 99, 0.6);
    border-color: rgba(139, 92, 246, 0.5);
}

.code-tab-btn.active {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.6);
    color: rgba(196, 181, 253, 1);
}

/* Code Examples */
.code-example {
    transition: all 0.3s ease;
}

.code-example.hidden {
    display: none;
}

/* Try It Button */
.try-it-btn {
    transition: all 0.3s ease;
}

.try-it-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}

/* Try It Section */
.try-it-section {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Syntax Highlighting Colors */
pre code {
    font-family: 'Courier New', Courier, monospace;
}

/* Sticky Header */
header {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    .code-tab-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
        margin-bottom: 0.5rem;
    }

    pre {
        font-size: 0.75rem;
    }

    /* Stack endpoint sections */
    section .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .try-it-btn {
        width: 100%;
        justify-content: center;
    }

    /* Grid adjustments */
    .grid.grid-cols-1.md\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.125rem;
    }

    h3 {
        font-size: 1rem;
    }

    .glass-effect {
        padding: 1rem !important;
    }

    .code-tab-btn {
        padding: 0.3rem 0.625rem;
        font-size: 0.75rem;
    }

    pre {
        font-size: 0.6875rem;
        padding: 0.75rem !important;
    }

    /* Header */
    header .flex.items-center.gap-4 {
        gap: 0.5rem !important;
    }

    header .w-12.h-12 {
        width: 2.5rem !important;
        height: 2.5rem !important;
    }

    header .w-12.h-12 i {
        font-size: 1rem !important;
    }

    header h1 {
        font-size: 1.125rem !important;
    }

    header .text-xs {
        font-size: 0.625rem !important;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(139, 92, 246, 0.3);
    border-radius: 50%;
    border-top-color: rgba(139, 92, 246, 1);
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Success/Error Response Highlighting */
.response-success {
    border-left: 4px solid rgba(34, 197, 94, 0.6);
}

.response-error {
    border-left: 4px solid rgba(239, 68, 68, 0.6);
}

/* Smooth Transitions */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Focus States */
input:focus,
button:focus {
    outline: 2px solid rgba(139, 92, 246, 0.5);
    outline-offset: 2px;
}

/* Method Badge Styles */
.bg-green-500\/20 {
    background-color: rgba(34, 197, 94, 0.2);
}

.bg-blue-500\/20 {
    background-color: rgba(59, 130, 246, 0.2);
}

.bg-red-500\/20 {
    background-color: rgba(239, 68, 68, 0.2);
}

.bg-yellow-500\/20 {
    background-color: rgba(234, 179, 8, 0.2);
}
