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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --glass: rgba(255, 255, 255, 0.1);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, #1a202c 100%);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
}

.container {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "header header"
        "sidebar main";
    min-height: 100vh;
}

/* Header */
.header {
    grid-area: header;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

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

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

.logo-icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
}

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

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--text-muted);
}

/* Sidebar */
.sidebar {
    grid-area: sidebar;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    overflow-y: auto;
    height: calc(100vh - 80px);
    position: sticky;
    top: 80px;
}


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

.nav-section h3 {
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-section ul {
    list-style: none;
}

.nav-section li {
    margin-bottom: 0.25rem;
}

.nav-section a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    display: block;
    transition: all 0.3s ease;
    position: relative;
}

.nav-section a:hover,
.nav-section a.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateX(4px);
}

/* Main Content */
.main {
    grid-area: main;
    padding: 2rem 3rem;
    overflow-y: auto;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.3) 0%, rgba(30, 41, 59, 0.1) 100%);
}

.content {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.page-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.page-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    position: relative;
    padding-left: 1rem;
}

.content-section h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25rem;
    width: 4px;
    height: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 2px;
}

.content-section h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent);
    margin: 2rem 0 1rem 0;
}

.content-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 1.5rem 0 0.75rem 0;
}

.content-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.content-section ul,
.content-section ol {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-section li {
    margin-bottom: 0.5rem;
}

.content a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.content a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.code-block {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    overflow-x: auto;
    position: relative;
    backdrop-filter: blur(10px);
}

.code-block::before {
    content: attr(data-lang);
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 500;
}

.code-block code {
    color: var(--accent);
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre;
}

.demo-frame {
    display: block;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    margin: 1.5rem 0;
}

a.demo-live-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
    text-decoration: none;
    margin: 0.5rem 0 1.5rem 0;
    transition: transform 0.2s ease;
}

a.demo-live-link:hover {
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.inline-code {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.9em;
}

.api-method {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    backdrop-filter: blur(10px);
}

.method-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.method-type {
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

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

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

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

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

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

.parameter-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 8px;
    overflow: hidden;
}

.parameter-table th {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
}

.parameter-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

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

.type-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--secondary);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.note-box {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    position: relative;
}

.note-box::before {
    content: '💡';
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.note-box p {
    margin-left: 2rem;
    margin-bottom: 0;
    color: var(--accent);
}

.note-box a {
    color: var(--accent);
    font-weight: 600;
}

.note-box a:hover {
    text-decoration: underline;
}

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 1rem;
    margin: 1.5rem 0;
    position: relative;
}

.warning-box::before {
    content: '⚠️';
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.warning-box p {
    margin-left: 2rem;
    margin-bottom: 0;
    color: var(--warning);
}

.warning-box a {
    color: var(--warning);
    font-weight: 600;
}

.warning-box a:hover {
    text-decoration: underline;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.pagination a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.pagination a:hover {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main";
    }

    .sidebar {
        display: none;
    }

    .main {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 2rem;
    }
}

.btn-clicker {
    margin: .2em;
    padding: .2em;
}

.btn-clicker-active {
    background-color: var(--primary) !important;
}

.row-clicker {
    display: flex;
    /* border-bottom: 1px solid #ddd; */
    padding: .2em 0;
}

.row-clicker:nth-child(even) {
    /* background-color: #f9f9f9; */
}

.column-clicker {
    /* padding: 0 15px; */
}

.column-clicker:first-child {
    width: 180px;
}