/* aeklink API Viewer Styles */

/* Import site variables */
:root {
    /* Primary Colors - Apple-inspired */
    --primary-color: #007AFF;
    --primary-hover: #0056CC;
    --primary-active: #004499;
    --secondary-color: #8E8E93;
    --accent-color: #AF52DE;
    
    /* OLED Black Backgrounds */
    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #111111;
    --bg-quaternary: #1a1a1a;
    
    /* Text Colors */
    --text-primary: #ffffff;
    --text-secondary: #d1d1d6;
    --text-tertiary: #8e8e93;
    --text-muted: #636366;
    
    /* Border Colors */
    --border-color: #2c2c2e;
    --border-light: #3a3a3c;
    --border-subtle: #1c1c1e;
    
    /* Enhanced Shadows for OLED */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.8);
    --shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.9), 0 1px 4px 0 rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 8px 25px 0 rgba(0, 0, 0, 0.95), 0 4px 12px 0 rgba(0, 0, 0, 0.9);
    
    /* Status Colors */
    --success-color: #34C759;
    --warning-color: #FF9500;
    --error-color: #FF3B30;
    --info-color: #5AC8FA;
    
    /* API Viewer specific */
    --sidebar-width: 320px;
    --sidebar-width-mobile: 280px;
    --header-height: 64px;
    --code-bg: #1c1c1e;
    --code-border: #2c2c2e;
    --rss-color: #FF6600;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    background: var(--code-bg);
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.875rem;
    border: 1px solid var(--code-border);
}

/* Header */
.api-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    z-index: 1000;
    backdrop-filter: blur(20px);
}

.api-nav {
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: none;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.brand-link:hover {
    color: var(--primary-color);
}

.brand-logo {
    font-size: 1.25rem;
}

.nav-separator {
    color: var(--text-tertiary);
    margin: 0 0.25rem;
}

.nav-link-breadcrumb {
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-current {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    color: var(--text-primary);
    font-size: 0.875rem;
    width: 240px;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--text-tertiary);
    pointer-events: none;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.nav-link:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

/* RSS Link Styling */
.nav-link.rss-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--rss-color);
    border: 1px solid var(--rss-color);
    background: rgba(255, 102, 0, 0.1);
}

.nav-link.rss-link:hover {
    color: #ffffff;
    background: var(--rss-color);
    border-color: var(--rss-color);
}

.nav-link.rss-link svg {
    width: 14px;
    height: 14px;
}

/* Language Selector */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-toggle {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.language-toggle:hover {
    color: var(--text-primary);
    border-color: var(--primary-color);
    background: var(--bg-quaternary);
}

.language-toggle.active {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.current-lang {
    font-weight: 600;
    min-width: 20px;
}

.dropdown-arrow {
    transition: transform 0.2s ease;
}

.language-toggle.active .dropdown-arrow {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    min-width: 140px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.language-option:hover {
    color: var(--text-primary);
    background: var(--bg-quaternary);
}

.language-option.active {
    color: var(--primary-color);
    background: rgba(0, 122, 255, 0.1);
}

.language-option .flag {
    font-size: 1rem;
}

.language-option span:last-child {
    flex: 1;
}

/* Main Layout */
.api-layout {
    display: flex;
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
}

/* Sidebar */
.api-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-subtle);
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 900;
}

.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    color: var(--primary-color);
    background: var(--bg-tertiary);
}

.sidebar-content {
    height: calc(100vh - var(--header-height) - 73px);
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.nav-category {
    margin-bottom: 1rem;
}

.category-header {
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

.category-header:hover {
    background: var(--bg-quaternary);
}

.category-icon {
    font-size: 1.125rem;
}

.category-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.category-badge {
    background: var(--warning-color);
    color: #000;
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.category-endpoints {
    display: none;
    padding: 0.5rem 0;
}

.category-endpoints.active {
    display: block;
}

.endpoint-item {
    padding: 0.5rem 1rem 0.5rem 3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.endpoint-item:hover {
    background: var(--bg-tertiary);
    border-left-color: var(--primary-color);
}

.endpoint-item.active {
    background: var(--bg-quaternary);
    border-left-color: var(--primary-color);
}

.endpoint-info {
    flex: 1;
}

.endpoint-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.endpoint-path {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-family: 'SF Mono', Monaco, monospace;
}

.method-badge {
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method-get { background: var(--success-color); color: #000; }
.method-post { background: var(--primary-color); color: #fff; }
.method-put { background: var(--warning-color); color: #000; }
.method-delete { background: var(--error-color); color: #fff; }

.sidebar-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 1rem;
    background: var(--bg-tertiary);
}

.api-info {
    font-size: 0.75rem;
}

.api-info h4 {
    font-size: 0.8rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.info-item .label {
    color: var(--text-tertiary);
}

.info-item .value {
    color: var(--text-secondary);
    font-weight: 500;
}

.info-item code {
    background: var(--bg-quaternary);
    border: none;
    padding: 0.125rem 0.25rem;
    font-size: 0.7rem;
}

/* Main Content */
.api-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--header-height));
    background: var(--bg-primary);
}

/* Welcome Section */
.api-welcome {
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.welcome-content {
    max-width: 1200px;
    width: 100%;
}

.welcome-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.api-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    max-width: none;
}

@media (max-width: 1400px) {
    .api-overview {
        grid-template-columns: repeat(2, 1fr);
    }
}

.overview-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all 0.2s ease;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.overview-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.overview-card .card-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.overview-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.overview-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.endpoint-count {
    background: var(--bg-quaternary);
    color: var(--text-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    display: inline-block;
}

.endpoint-count.admin-only {
    background: var(--warning-color);
    color: #000;
}

.quick-start {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1rem;
}

.quick-start h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.quick-start-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .quick-start-steps {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content h4 {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.step-content p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Search Results Section */
.search-results {
    padding: 3rem 2rem;
    background: var(--bg-primary);
    min-height: calc(100vh - var(--header-height));
}

.search-results-content {
    max-width: 1200px;
    width: 100%;
}

.search-results-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.search-results-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-results-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin: 0;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-secondary);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.no-results p {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.6;
}

.search-result-category {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 1rem;
    overflow: hidden;
}

.search-result-category-header {
    padding: 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-subtle);
}

.category-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.category-icon {
    font-size: 1.5rem;
}

.category-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.category-count {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: auto;
}

.search-result-endpoints {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-result-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.search-result-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.search-result-header {
    margin-bottom: 1rem;
}

.endpoint-title-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.endpoint-method-badge {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.endpoint-path {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border-color);
}

.search-result-card .endpoint-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.search-result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.endpoint-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.endpoint-parameters-preview {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 0.5rem;
    border: 1px solid var(--border-subtle);
}

.parameters-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    display: block;
}

.parameters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.parameter-tag {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.parameter-tag.required {
    border-color: var(--error-color);
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.parameter-tag.optional {
    border-color: var(--border-light);
    color: var(--text-secondary);
}

.param-type {
    color: var(--text-tertiary);
    font-style: italic;
}

.more-params {
    color: var(--text-tertiary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background: var(--bg-quaternary);
    border-radius: 0.375rem;
}

.endpoint-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.view-details-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.view-details-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.view-details-btn svg {
    flex-shrink: 0;
}

/* Highlight matching text in search results */
mark {
    background: rgba(0, 122, 255, 0.2);
    color: var(--primary-color);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* API Content */
.api-content {
    padding: 2rem;
}

.endpoint-section {
    margin-bottom: 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
}

.endpoint-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.endpoint-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.endpoint-method {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.endpoint-path-display {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.endpoint-auth {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-left: auto;
}

.auth-none { background: var(--success-color); color: #000; }
.auth-admin { background: var(--warning-color); color: #000; }
.auth-admin-user { background: var(--primary-color); color: #fff; }
.auth-user { background: var(--info-color); color: #000; }

.endpoint-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
}

.endpoint-body {
    padding: 1.5rem;
}

.endpoint-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: var(--text-primary);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.parameters-list {
    display: grid;
    gap: 1rem;
}

.parameter-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.parameter-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.parameter-name {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.parameter-type {
    background: var(--bg-quaternary);
    color: var(--text-tertiary);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.parameter-required {
    background: var(--error-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.parameter-description {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.4;
}

.code-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.code-header {
    background: var(--bg-quaternary);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--code-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
}

.copy-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-button:hover {
    background: var(--primary-hover);
}

.code-content {
    padding: 1rem;
    overflow-x: auto;
}

.code-content pre {
    margin: 0;
    color: var(--text-primary);
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Tablet Styles */
@media (max-width: 1024px) {
    .welcome-content {
        max-width: 900px;
    }
    
    .api-overview {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 1.25rem;
    }
    
    .quick-start-steps {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .api-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width-mobile);
    }
    
    .api-sidebar.open {
        transform: translateX(0);
    }
    
    .api-main {
        margin-left: 0;
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .nav-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .search-input {
        width: 180px;
    }
    
    .language-dropdown {
        right: auto;
        left: 0;
    }
    
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .api-welcome {
        padding: 2rem 1.5rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .api-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .overview-card {
        min-height: 140px;
        padding: 1.5rem;
    }
    
    .api-content {
        padding: 1rem;
    }
    
    .search-results {
        padding: 2rem 1.5rem;
    }
    
    .search-results-title {
        font-size: 1.5rem;
    }
    
    .search-results-list {
        gap: 1.5rem;
    }
    
    .search-result-card {
        padding: 1rem;
    }
    
    .endpoint-method-badge {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .endpoint-path {
        font-size: 0.8rem;
        padding: 0.375rem 0.5rem;
    }
    
    .parameters-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .endpoint-actions {
        flex-direction: column;
    }
    
    .view-details-btn {
        width: 100%;
        justify-content: center;
    }
    
    .endpoint-header,
    .endpoint-body {
        padding: 1rem;
    }
    
    .endpoint-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .endpoint-tabs {
        flex-wrap: wrap;
    }
    
    .quick-start-steps {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 850;
}

.mobile-overlay.active {
    display: block;
}

/* Copy Notification */
.copy-notification {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--success-color);
    color: #000;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 2000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
}

.copy-notification.show {
    transform: translateY(0);
    opacity: 1;
}

/* Loading Spinner */
.loading-spinner {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    z-index: 2000;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.endpoint-section {
    animation: fadeInUp 0.4s ease-out;
}

/* Focus States */
.search-input:focus,
.copy-button:focus,
.tab-button:focus,
.endpoint-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .api-header,
    .api-sidebar,
    .mobile-overlay,
    .copy-notification,
    .loading-spinner {
        display: none;
    }
    
    .api-main {
        margin-left: 0;
    }
    
    .endpoint-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .code-block {
        break-inside: avoid;
    }
}