/* ===================================================================
       DOCUMENTAÇÃO DA API - CSS MELHORADO v2.0
       ===================================================================
       Estilos para as funcionalidades melhoradas do HTML e JavaScript
       Mantém compatibilidade com o design original
       ================================================================= */

    /* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #10b981;
    --background-color: #ffffff;
    --surface-color: #f8fafc;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --radius: 8px;
    --transition: all 0.2s ease-in-out;

    /* HTTP Method Colors */
    --get-color: #10b981;
    --post-color: #3b82f6;
    --put-color: #f59e0b;
    --patch-color: #8b5cf6;
    --delete-color: #ef4444;

    /* Status Colors */
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
}

[data-theme="dark"] {
    /* Dark Theme Colors */
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #10b981;
    --background-color: #0f172a;
    --surface-color: #1e293b;
    --border-color: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

/* Container */
.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================================================
   HEADER MELHORADO
   ================================================================= */

/* Header */
.header {
    background: var(--surface-color);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}


/* ===================================================================
   HEADER MELHORADO
   ================================================================= */



.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Version Badge */
.version-badge {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Search Container Melhorado */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 300px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Clear Search Button */
.clear-search {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.clear-search:hover {
    background: var(--surface-color);
    color: var(--text-primary);
}



.export-btn,
.theme-toggle {
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.export-btn:hover,
.theme-toggle:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Loading Progress Bar */
.loading-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}



/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ===================================================================
   SIDEBAR MELHORADA
   ================================================================= */

.sidebar {
    width: 380px;
    background: var(--surface-color);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    overflow-y: auto;
    height: calc(100vh - 100px);
    position: sticky;
    top: 100px;
}

.sidebar-header {
    margin-bottom: 1.5rem;
}

.sidebar-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Stats Melhoradas */
.stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.filter-section {
    margin-bottom: 1.5rem;
}

.filter-section h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Method Filters Melhorados */
.method-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.method-filter {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    background: var(--background-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.method-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.method-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Method Count */
.method-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

.method-filter:not(.active) .method-count {
    background: var(--border-color);
    color: var(--text-muted);
}

/* Method-specific colors */
.method-filter.get.active {
    background: var(--get-color);
    border-color: var(--get-color);
}

.method-filter.post.active {
    background: var(--post-color);
    border-color: var(--post-color);
}

.method-filter.put.active {
    background: var(--put-color);
    border-color: var(--put-color);
}

.method-filter.patch.active {
    background: var(--patch-color);
    border-color: var(--patch-color);
}

.method-filter.delete.active {
    background: var(--delete-color);
    border-color: var(--delete-color);
}

/* Sort Select */
.sort-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.sort-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Categories Navigation Melhorada */
.categories-nav {
    max-height: calc(100vh - 400px);
    overflow-y: auto;
}

.no-categories {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

.category-item {
    display: block;
    padding: 0.75rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
}

.category-item:hover {
    background: var(--background-color);
    color: var(--primary-color);
    border-color: var(--border-color);
    transform: translateX(2px);
}

.category-item.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Category Header */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 500;
    font-size: 0.875rem;
}

.category-count {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.count-number {
    font-size: 0.875rem;
    font-weight: 600;
}

.count-label {
    font-size: 0.7rem;
    opacity: 0.8;
}

.category-description {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

/* Category Methods */
.category-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.method-tag {
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.method-tag.get {
    background: rgba(16, 185, 129, 0.1);
    color: var(--get-color);
}

.method-tag.post {
    background: rgba(59, 130, 246, 0.1);
    color: var(--post-color);
}

.method-tag.put {
    background: rgba(245, 158, 11, 0.1);
    color: var(--put-color);
}

.method-tag.patch {
    background: rgba(139, 92, 246, 0.1);
    color: var(--patch-color);
}

.method-tag.delete {
    background: rgba(239, 68, 68, 0.1);
    color: var(--delete-color);
}

/* Help Section */
.help-section {
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.help-toggle {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.help-toggle:hover {
    background: var(--surface-color);
    color: var(--primary-color);
}

.help-content {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.help-content h5 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.help-content ul {
    list-style: none;
    padding: 0;
}

.help-content li {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    padding-left: 1rem;
    position: relative;
}

.help-content li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===================================================================
   CONTEÚDO PRINCIPAL MELHORADO
   ================================================================= */

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Welcome Section Melhorada */
.welcome-section {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.welcome-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.welcome-header {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Quick Stats Melhoradas */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    background: rgba(37, 99, 235, 0.1);
    padding: 0.75rem;
    border-radius: var(--radius);
    color: var(--primary-color);
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.stat-content p {
    color: var(--text-primary);
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-content small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Quick Guide */
.quick-guide {
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
}

.quick-guide h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-steps {
    display: grid;
    gap: 1rem;
}

.guide-step {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ===================================================================
   ENDPOINTS SECTION MELHORADA
   ================================================================= */

.endpoints-section {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Section Header Melhorado */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.section-title h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Breadcrumb */
.section-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Section Actions */
.section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* View Options */
.view-options {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.view-toggle {
    padding: 0.5rem 0.75rem;
    border: none;
    background: var(--background-color);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-right: 1px solid var(--border-color);
}

.view-toggle:last-child {
    border-right: none;
}

.view-toggle:hover {
    background: var(--surface-color);
    color: var(--primary-color);
}

.view-toggle.active {
    background: var(--primary-color);
    color: white;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-secondary,
.btn-primary {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-secondary:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Category Info */
.category-info {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.category-description h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-description p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.category-stats h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.method-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.method-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--background-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.method-stats .stat-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ===================================================================
   ENDPOINT CARDS MELHORADOS
   ================================================================= */

.endpoints-list {
    display: grid;
    gap: 1rem;
}

/* View Modes */
.endpoints-list.view-list {
    display: flex;
    flex-direction: column;
}

.endpoints-list.view-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
}

.no-endpoints {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 3rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.endpoint-card {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
}

.endpoint-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.endpoint-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    background: var(--surface-color);
}

.endpoint-header:hover {
    background: var(--background-color);
}

.endpoint-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.endpoint-path {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
}

.endpoint-function {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Endpoint Actions */
.endpoint-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.has-params-indicator,
.auth-required-indicator {
    color: var(--warning-color);
    font-size: 0.8rem;
}

.auth-required-indicator {
    color: var(--error-color);
}

.expand-icon {
    color: var(--text-muted);
    transition: var(--transition);
    font-size: 0.875rem;
}

.endpoint-card.expanded .expand-icon {
    transform: rotate(180deg);
}

/* Method Badges Melhorados */
.method-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid transparent;
}

.method-badge.get {
    background: var(--get-color);
    color: white;
}

.method-badge.post {
    background: var(--post-color);
    color: white;
}

.method-badge.put {
    background: var(--put-color);
    color: white;
}

.method-badge.patch {
    background: var(--patch-color);
    color: white;
}

.method-badge.delete {
    background: var(--delete-color);
    color: white;
}

/* Endpoint Details */
.endpoint-details {
    display: none;
    border-top: 1px solid var(--border-color);
    background: var(--background-color);
}

.endpoint-card.expanded .endpoint-details {
    display: block;
    animation: expandDetails 0.3s ease-in-out;
}

@keyframes expandDetails {
    from { opacity: 0; max-height: 0; }
    to { opacity: 1; max-height: 1000px; }
}

.endpoint-description {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.endpoint-description h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.endpoint-description p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* Endpoint Metadata */
.endpoint-metadata {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.metadata-item strong {
    color: var(--text-primary);
    min-width: 120px;
}

.metadata-item code {
    background: var(--surface-color);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary-color);
}

.category-link {
    color: var(--primary-color);
    cursor: pointer;
    text-decoration: none;
}

.category-link:hover {
    text-decoration: underline;
}

.auth-warning {
    color: var(--warning-color);
    font-weight: 500;
}

/* ===================================================================
   PARAMETERS SECTION MELHORADA
   ================================================================= */

.parameters-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.parameters-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* No Parameters */
.no-parameters {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--success-color);
    font-size: 0.875rem;
}

/* Parameters Summary */
.parameters-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: var(--surface-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.param-count {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.param-type-count {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--background-color);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* Parameter Groups */
.parameter-group {
    margin-bottom: 1.5rem;
}

.parameter-group-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.parameter-group-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.7rem;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-weight: 600;
}

.parameter-group-description {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Parameters List */
.parameters-list {
    display: grid;
    gap: 0.75rem;
}

.parameter-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.parameter-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Parameter Types */
.parameter-item.path {
    border-left: 4px solid var(--info-color);
}

.parameter-item.query {
    border-left: 4px solid var(--warning-color);
}

.parameter-item.body {
    border-left: 4px solid var(--success-color);
}

.parameter-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.parameter-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-color);
}

.parameter-type {
    font-size: 0.75rem;
    color: var(--text-muted);
    padding: 0.125rem 0.5rem;
    background: var(--border-color);
    border-radius: 12px;
    font-weight: 500;
}

.parameter-location {
    font-size: 0.7rem;
    color: white;
    padding: 0.125rem 0.375rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
}

.parameter-item.path .parameter-location {
    background: var(--info-color);
}

.parameter-item.query .parameter-location {
    background: var(--warning-color);
}

.parameter-item.body .parameter-location {
    background: var(--success-color);
}

.parameter-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.parameter-example {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.parameter-example strong {
    color: var(--text-primary);
}

.parameter-example code {
    background: var(--background-color);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    color: var(--primary-color);
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Body Structure Example */
.body-structure-example {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.body-structure-example h6 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ===================================================================
   EXAMPLE SECTION MELHORADA
   ================================================================= */

.example-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.example-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Example Tabs */
.example-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.example-tab {
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.example-tab:hover {
    color: var(--primary-color);
    background: var(--surface-color);
}

.example-tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: var(--surface-color);
}

/* Example Content */
.example-content {
    position: relative;
}

.example-panel {
    display: none;
}

.example-panel.active {
    display: block;
    animation: fadeInExample 0.3s ease-in-out;
}

@keyframes fadeInExample {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Code Block Melhorado */
.code-block {
    background: #1e293b;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #334155;
    border-bottom: 1px solid #475569;
}

.code-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #e2e8f0;
}

.copy-btn {
    background: none;
    border: 1px solid #475569;
    color: #94a3b8;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.copy-btn:hover {
    background: #475569;
    color: #e2e8f0;
}

.code-block pre {
    padding: 1rem;
    margin: 0;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
}

.code-block code {
    color: #e2e8f0;
}

/* ===================================================================
   RESPONSE SECTION
   ================================================================= */

.response-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.response-section h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.response-info {
    display: grid;
    gap: 1.5rem;
}

/* Status Codes */
.response-codes h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.status-codes {
    display: grid;
    gap: 0.5rem;
}

.status-code {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.status-code.success {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--success-color);
}

.status-code.error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error-color);
}

.status-code .code {
    font-weight: 600;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    min-width: 3rem;
}

.status-code.success .code {
    color: var(--success-color);
}

.status-code.error .code {
    color: var(--error-color);
}

.status-code .description {
    color: var(--text-secondary);
}

/* Response Example */
.response-example h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

/* ===================================================================
   ENDPOINT ACTIONS SECTION
   ================================================================= */

.endpoint-actions-section {
    padding: 1.5rem;
    background: var(--surface-color);
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.copy-code-btn,
.test-endpoint-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.copy-code-btn {
    border: 1px solid var(--border-color);
    background: var(--background-color);
    color: var(--text-secondary);
}

.copy-code-btn:hover {
    background: var(--surface-color);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.test-endpoint-btn {
    border: 1px solid var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.test-endpoint-btn:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* ===================================================================
   MODAL MELHORADO
   ================================================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--background-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-in-out;
}

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.9) translateY(-20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-color);
}

.modal-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 120px);
}

/* Test Interface */
.test-interface {
    display: grid;
    gap: 1.5rem;
}

.test-info {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.test-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.endpoint-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.endpoint-url {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    background: var(--background-color);
    padding: 0.5rem;
    border-radius: 4px;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

/* Test Form */
.test-form {
    background: var(--surface-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.test-form h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.param-group {
    margin-bottom: 1.5rem;
}

.param-group h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.form-field {
    margin-bottom: 1rem;
}

.form-field label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-field input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--background-color);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-field small {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Test Actions */
.test-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Test Results */
.test-results {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.test-results h4 {
    padding: 1rem;
    margin: 0;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.result-content {
    padding: 1rem;
}

.loading-result {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.loading-result i {
    animation: spin 1s linear infinite;
}

.result-status {
    padding: 0.75rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.result-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

.result-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.result-headers,
.result-body {
    margin-bottom: 1rem;
}

.result-headers strong,
.result-body strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.curl-result {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.curl-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border-bottom: 1px solid var(--border-color);
}

.curl-header strong {
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* ===================================================================
   LOADING MELHORADO
   ================================================================= */

.loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-content {
    text-align: center;
    max-width: 400px;
}

.loading-content .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1.5rem;
}

.loading-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.loading-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Loading Steps */
.loading-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.loading-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.3;
    transition: var(--transition);
}

.loading-step.active {
    opacity: 1;
    color: var(--primary-color);
}

.loading-step i {
    font-size: 1.5rem;
}

.loading-step span {
    font-size: 0.8rem;
    font-weight: 500;
}

/* ===================================================================
   TOAST NOTIFICATIONS
   ================================================================= */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1100;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    animation: toastSlideIn 0.3s ease-in-out;
}

@keyframes toastSlideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-warning {
    border-left: 4px solid var(--warning-color);
}

.toast-info {
    border-left: 4px solid var(--info-color);
}

.toast i {
    font-size: 1.25rem;
}

.toast-success i {
    color: var(--success-color);
}

.toast-error i {
    color: var(--error-color);
}

.toast-warning i {
    color: var(--warning-color);
}

.toast-info i {
    color: var(--info-color);
}

.toast span {
    flex: 1;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: var(--transition);
}

.toast-close:hover {
    background: var(--background-color);
    color: var(--text-primary);
}

/* ===================================================================
   NO RESULTS MELHORADO
   ================================================================= */

.no-results {
    text-align: center;
    padding: 3rem;
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin: 2rem 0;
}

.no-results-content {
    max-width: 400px;
    margin: 0 auto;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
    color: var(--text-muted);
}

.no-results h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.no-results p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.no-results-suggestions {
    text-align: left;
    margin-bottom: 1.5rem;
}

.no-results-suggestions h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.no-results-suggestions ul {
    list-style: none;
    padding: 0;
}

.no-results-suggestions li {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.no-results-suggestions li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* ===================================================================
   ERROR PAGE
   ================================================================= */

.error-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--background-color);
    padding: 2rem;
}

.error-content {
    text-align: center;
    max-width: 500px;
}

.error-icon {
    font-size: 4rem;
    color: var(--error-color);
    margin-bottom: 1.5rem;
}

.error-content h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.error-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* ===================================================================
   RESPONSIVE DESIGN MELHORADO
   ================================================================= */

@media (max-width: 1200px) {
    .sidebar {
        width: 280px;
    }
    
    .endpoints-list.view-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .search-input {
        width: 250px;
    }
    
    .quick-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .section-actions {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: none;
    }
    
    .header-content {
        padding: 0 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .content {
        padding: 1rem;
    }
    
    .quick-stats {
        grid-template-columns: 1fr;
    }
    
    .guide-steps {
        gap: 0.75rem;
    }
    
    .guide-step {
        flex-direction: column;
        text-align: center;
    }
    
    .endpoint-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .method-filters {
        justify-content: center;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .view-options {
        order: -1;
        align-self: center;
    }
    
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .toast-container {
        left: 1rem;
        right: 1rem;
    }
    
    .toast {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 0.5rem;
    }
    
    .content {
        padding: 0.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .endpoint-card {
        margin-bottom: 0.75rem;
    }
    
    .endpoint-header {
        padding: 0.75rem;
    }
    
    .endpoint-details {
        padding: 1rem;
    }
    
    .parameters-section,
    .example-section,
    .response-section {
        padding: 1rem;
    }
    
    .example-tabs {
        flex-wrap: wrap;
    }
    
    .example-tab {
        flex: 1;
        min-width: 80px;
        justify-content: center;
    }
    
    .test-actions {
        flex-direction: column;
    }
    
    .endpoint-actions-section {
        flex-direction: column;
    }
}

/* ===================================================================
   UTILITIES
   ================================================================= */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* ===================================================================
   ANIMATIONS
   ================================================================= */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% { transform: translate3d(0, 0, 0); }
    40%, 43% { transform: translate3d(0, -30px, 0); }
    70% { transform: translate3d(0, -15px, 0); }
    90% { transform: translate3d(0, -4px, 0); }
}

/* ===================================================================
   PRINT STYLES
   ================================================================= */

@media print {
    .header,
    .sidebar,
    .loading,
    .modal-overlay,
    .toast-container {
        display: none !important;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .content {
        padding: 0;
    }
    
    .endpoint-card {
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .endpoint-details {
        display: block !important;
    }
    
    .code-block {
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #dee2e6 !important;
    }
}

