* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --text: #334155;
    --text-light: #64748b;

    /* Announcement bar */
    --announcement-height: 34px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: #ffffff;
}

/* Navbar */
.announcement-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--announcement-height);
    z-index: 1001;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.announcement-bar.hidden {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.announcement-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.announcement-text {
    font-size: 13px;
    line-height: 1.2;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    display: flex;
    align-items: center;
    gap: 8px;
}

.announcement-text strong {
    color: #ffffff;
    font-weight: 600;
}

.announcement-close {
    position: absolute;
    right: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    line-height: 1;
    padding: 0;
}

.announcement-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: scale(1.1);
}

.announcement-close:active {
    transform: scale(0.95);
}

.docs-navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    top: var(--announcement-height);
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-navbar.announcement-hidden {
    top: 0;
}

.navbar-container {
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar-logo img {
    display: block;
}

.navbar-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.navbar-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.navbar-links a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.navbar-links a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.btn-login {
    background: white !important;
    color: var(--primary) !important;
    padding: 0.5rem 1.5rem !important;
    font-weight: 600 !important;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Sidebar */
.docs-sidebar {
    position: fixed;
    left: 0;
    top: calc(var(--announcement-height) + 64px);
    width: 280px;
    height: calc(100vh - 64px - var(--announcement-height));
    background: var(--light);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    padding: 2rem 0;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-sidebar.announcement-hidden {
    top: 64px;
    height: calc(100vh - 64px);
}

.sidebar-content {
    padding: 0 1.5rem;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.sidebar-link {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.sidebar-link:hover {
    background: white;
    color: var(--primary);
}

.sidebar-link.active {
    background: white;
    color: var(--primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Main Content */
.docs-main {
    margin-left: 280px;
    margin-top: calc(64px + var(--announcement-height));
    min-height: calc(100vh - 64px - var(--announcement-height));
    transition: margin-top 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.docs-main.announcement-hidden {
    margin-top: 64px;
    min-height: calc(100vh - 64px);
}

.docs-content {
    max-width: 900px;
    padding: 3rem;
}

.docs-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}

.docs-section:first-child {
    padding-top: 1rem;
}

.docs-section:last-child {
    border-bottom: none;
}

.docs-section h1 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.docs-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
    scroll-margin-top: 80px;
}

.docs-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin: 2rem 0 1rem;
}

.docs-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 1.5rem 0 0.75rem;
}

.lead {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.docs-section p {
    margin-bottom: 1rem;
    color: var(--text);
}

.inline-code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.feature-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.feature-card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: var(--dark);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

/* Info/Warning Boxes */
.info-box,
.warning-box {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.info-box i {
    color: #2563eb;
    font-size: 1.5rem;
}

.warning-box {
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.warning-box i {
    color: #f59e0b;
    font-size: 1.5rem;
}

.info-box strong,
.warning-box strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.info-box p,
.warning-box p {
    margin: 0;
    color: var(--text);
}

.info-box a {
    color: #2563eb;
    font-weight: 600;
}

/* Code Blocks */
.code-block {
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
}

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

.code-header span {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.copy-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.copy-btn i {
    font-size: 0.85rem;
}

.code-block pre {
    margin: 0;
    padding: 1.5rem;
    background: #1e293b;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #e2e8f0;
}

/* Tabs */
.tabs {
    margin: 2rem 0;
}

.tab-buttons {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid var(--border);
    margin-bottom: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

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

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Endpoint Box */
.endpoint-box {
    background: var(--light);
    padding: 1.25rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--border);
}

.endpoint-url {
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
    font-size: 1rem;
    color: var(--dark);
    font-weight: 600;
}

.method {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.method.get {
    background: #10b981;
    color: white;
}

.method.post {
    background: #3b82f6;
    color: white;
}

.method.put {
    background: #f59e0b;
    color: white;
}

.method.delete {
    background: #ef4444;
    color: white;
}

/* Tables */
.params-table {
    margin: 1.5rem 0;
}

.params-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.params-table thead {
    background: var(--light);
}

.params-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    border-bottom: 2px solid var(--border);
}

.params-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.params-table tbody tr:last-child td {
    border-bottom: none;
}

.params-table tbody tr:hover {
    background: var(--light);
}

.params-table code {
    background: #f1f5f9;
    color: #e11d48;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', monospace;
    font-size: 0.9em;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.required {
    background: #fecaca;
    color: #991b1b;
}

.badge.optional {
    background: #d1fae5;
    color: #065f46;
}

/* Rate Limit Grid */
.rate-limit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.rate-limit-card {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.rate-limit-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.rate-limit-card.featured {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: var(--primary);
    color: white;
}

.rate-limit-card h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 1rem;
}

.rate-limit-card.featured h4 {
    color: white;
}

.limit-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0.5rem 0;
}

.rate-limit-card.featured .limit-value {
    color: white;
}

.rate-limit-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.rate-limit-card.featured p {
    color: rgba(255, 255, 255, 0.9);
}

/* Footer */
.docs-footer {
    background: var(--light);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    padding: 3rem;
    border-radius: 12px;
}

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

.footer-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

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

.footer-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-footer {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.btn-footer:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-footer.secondary {
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-footer.secondary:hover {
    background: var(--primary);
    color: white;
}

/* Scrollbar */
.docs-sidebar::-webkit-scrollbar {
    width: 6px;
}

.docs-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.docs-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive */
@media (max-width: 1024px) {
    .docs-sidebar {
        display: none;
    }
    
    .docs-main {
        margin-left: 0;
    }
    
    .navbar-links {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .docs-content {
        padding: 2rem 1.5rem;
    }
    
    .docs-section h1 {
        font-size: 2rem;
    }
    
    .docs-section h2 {
        font-size: 1.5rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
    }
    
    .rate-limit-grid {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .navbar-links {
        display: none;
    }
}
