:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --dark: #0f172a;
    --sidebar-bg: #1e293b;
    --light: #f8fafc;
    --border: #e2e8f0;
    --code-bg: #1e293b;
    --gradient: #1e293b;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: #f8fafc;
    min-height: 100vh;
}

/* Layout Wrapper */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: #e2e8f0;
    border-right: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform 0.3s ease;
    z-index: 100;
}

.sidebar-header {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version {
    font-size: 0.75rem;
    color: #94a3b8;
    background: rgba(255,255,255,0.1);
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    display: inline-block;
}

.nav-section {
    padding: 1.5rem 0;
}

.nav-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    padding: 0 1.5rem;
    margin-bottom: 0.75rem;
}

.nav-link {
    display: block;
    padding: 0.6rem 1.5rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    font-size: 0.95rem;
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-link.active {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary);
    color: var(--primary);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    width: calc(100% - 280px);
}

.content-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1000;
    background: white;
    border: 1px solid var(--border);
    padding: 0.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Hero Section */
.hero {
    background: var(--gradient);
    color: white;
    padding: 4rem 3rem;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(30, 41, 59, 0.3);
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 1;
    color: #cbd5e1;
    margin-bottom: 2rem;
    max-width: 600px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    color: var(--primary-dark);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
}

.card h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.025em;
}

/* Typography */
h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

p {
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

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

.step {
    position: relative;
    padding-left: 1rem;
    border-left: 2px solid var(--border);
}

.step h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Code Blocks */
.code-block {
    background: var(--code-bg);
    border-radius: 0.75rem;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.code-header {
    background: #0f172a;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.code-lang {
    color: #94a3b8;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.copy-btn {
    background: rgba(255,255,255,0.1);
    color: #cbd5e1;
    border: none;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.copy-btn.copied {
    background: var(--success);
    color: white;
}

pre {
    padding: 1.25rem;
    overflow-x: auto;
    margin: 0;
}

code {
    font-family: 'JetBrains Mono', 'SF Mono', 'Monaco', monospace;
    font-size: 0.9rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* Inline Code */
p code, td code {
    background: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    color: var(--primary-dark);
    border: 1px solid #e2e8f0;
}

/* Endpoints */
.endpoint {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.endpoint:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.endpoint::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--border);
    transition: background 0.3s;
}

.endpoint:hover::before {
    background: var(--primary);
}

.endpoint-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.endpoint-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.endpoint-title h2 {
    margin: 0;
    font-size: 1.5rem;
}

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

.method-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.method-badge.get { background: #dcfce7; color: #15803d; }
.method-badge.post { background: #dbeafe; color: #1d4ed8; }
.method-badge.put { background: #fef9c3; color: #a16207; }
.method-badge.delete { background: #fee2e2; color: #b91c1c; }

.endpoint-url {
    font-family: 'JetBrains Mono', monospace;
    background: #f8fafc;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--secondary);
    font-size: 0.9rem;
    border: 1px solid var(--border);
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #f8fafc;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--secondary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--dark);
    font-size: 0.95rem;
}

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

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    font-size: 0.95rem;
}

.alert.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert.warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.alert.danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* Footer */
.footer {
    text-align: center;
    padding: 3rem 0;
    color: var(--secondary);
    border-top: 1px solid var(--border);
    margin-top: 4rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .content-container {
        padding: 4rem 1rem 2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .endpoint-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .endpoint-meta {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}