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

:root {
    --primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --primary-solid: #6366F1;
    --primary-light: #818CF8;
    --secondary: #64748B;
    --dark: #0F172A;
    --dark-alt: #1E293B;
    --light: #F8FAFC;
    --border: #E2E8F0;
    --success: #10B981;
    --warning: #F59E0B;
    --text: #334155;
    --text-light: #64748B;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
}

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

/* Header */
.header {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.8);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 0;
}

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

.nav {
    display: flex;
    gap: 2rem;
}

.nav a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

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

.nav a::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav a:hover::after {
    width: 100%;
}

/* Hero */
.hero {
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-opacity="0.05" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.5;
}

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

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

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, #E0E7FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: white;
    color: var(--primary-solid);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Sections */
.section {
    padding: 5rem 0;
}

.section-alt {
    background: white;
}

.section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--dark);
}

/* Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card */
.card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.card p {
    color: var(--text-light);
}

/* Auth Box */
.auth-box {
    max-width: 800px;
    margin: 0 auto;
}

.auth-box h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.auth-box>p {
    margin-bottom: 2rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* Code Block */
.code-block {
    background: var(--dark);
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--dark-alt);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.code-header span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
}

.copy-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

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

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

.code-block code {
    color: #E0E7FF;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.7;
}

/* Endpoint Groups */
.endpoint-group {
    margin-bottom: 4rem;
}

.group-title {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
}

/* Endpoint Card */
.endpoint-card {
    background: white;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s;
}

.endpoint-card:hover {
    box-shadow: var(--shadow);
}

.endpoint-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    cursor: pointer;
    user-select: none;
}

.endpoint-header>div {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.method {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.method-get {
    background: #DBEAFE;
    color: #1E40AF;
}

.method-post {
    background: #D1FAE5;
    color: #065F46;
}

.method-put {
    background: #FEF3C7;
    color: #92400E;
}

.method-delete {
    background: #FEE2E2;
    color: #991B1B;
}

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

.toggle-btn {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    transition: transform 0.3s;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.endpoint-card.open .toggle-btn {
    transform: rotate(180deg);
}

.endpoint-description {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

.endpoint-details {
    display: none;
    padding: 0 1.5rem 1.5rem;
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.endpoint-card.open .endpoint-details {
    display: block;
}

.params-section,
.response-section,
.field-descriptions {
    margin-bottom: 2rem;
}

.params-section h4,
.response-section h4,
.field-descriptions h4 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.field-desc-group {
    margin-bottom: 1.5rem;
}

.field-desc-group:last-child {
    margin-bottom: 0;
}

.field-desc-group h5 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text);
    font-weight: 600;
}

/* Table */
.params-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.params-table th {
    background: var(--light);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    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.875rem;
}

.params-table code {
    background: var(--light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.813rem;
    color: var(--primary-solid);
}

.required {
    color: #DC2626;
    font-weight: 600;
}

.optional {
    color: var(--text-light);
}

/* Endpoint Placeholder */
.endpoint-placeholder {
    background: linear-gradient(135deg, #F0F9FF 0%, #E0F2FE 100%);
    border: 2px dashed #BAE6FD;
    border-radius: 0.75rem;
    padding: 2rem;
    text-align: center;
    color: #0369A1;
    font-weight: 500;
}

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0;
    text-align: center;
    margin-top: 5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .nav {
        gap: 1rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .endpoint-header>div {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}