:root {
    --primary: #1a73e8;
    --primary-dark: #185abc;
    --secondary: #202124;
    --success: #34a853;
    --success-bg: rgb(52, 134, 83);
    --warning: #fbbc04;
    --danger: #ea4335;
    --danger-bg:rgb(243, 67, 53);
    --dark: #202124;
    --gray: #5f6368;
    --light: #ffffff;
    --code-bg: #1e1e1e;
    --code-text: #d4d4d4;
    --shadow: 0 2px 6px rgba(60,64,67,.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background: #f8f9fa;
    color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
    font-size: 16px;
}

/* Navigation Overlay */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

/* Hamburger Menu Button */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: white;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    padding: 12px;
    transition: all 0.3s ease;
}

.menu-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.hamburger {
    width: 24px;
    height: 18px;
    position: relative;
    margin: 0 auto;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: var(--secondary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 8px; }
.hamburger span:nth-child(3) { top: 16px; }

/* Hamburger Animation */
.menu-active .hamburger span:nth-child(1) {
    transform: rotate(45deg);
    top: 8px;
}

.menu-active .hamburger span:nth-child(2) {
    opacity: 0;
}

.menu-active .hamburger span:nth-child(3) {
    transform: rotate(-45deg);
    top: 8px;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    background: white;
    padding: 32px;
    border-right: 1px solid rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.nav-logo {
    height: 40px;
}

.nav-title {
    font-size: 24px;
    font-weight: 500;
    color: var(--secondary);
}

.version {
    font-size: 14px;
    color: var(--primary);
    background: rgba(26,115,232,0.1);
    padding: 4px 8px;
    border-radius: 16px;
    margin-left: auto;
}

.nav-section {
    margin-bottom: 32px;
}

.nav-section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-bottom: 16px;
    padding-left: 12px;
    font-weight: 500;
}

.nav-items {
    list-style: none;
}

.nav-item {
    margin-bottom: 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--secondary);
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
}

.nav-link:hover {
    background: rgba(26,115,232,0.08);
    color: var(--primary);
    transform: translateX(4px);
}

.nav-link.active {
    background: rgba(26,115,232,0.08);
    color: var(--primary);
    font-weight: 500;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.main {
    margin-left: 300px;
    padding: 48px;
    max-width: 1200px;
}

.api-intro {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 48px;
    box-shadow: var(--shadow);
}

.api-intro h1 {
    font-size: 36px;
    margin-bottom: 24px;
    color: var(--secondary);
}

.api-intro p {
    font-size: 18px;
    color: var(--gray);
    margin-bottom: 32px;
    line-height: 1.8;
}

.endpoint {
    background: white;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.endpoint-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.method {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    font-family: 'Roboto Mono', monospace;
    white-space: nowrap;
}

.method.post {
    background: var(--success-bg);
    color: var(--success);
}

.method.get {
    background: rgba(26,115,232,0.1);
    color: var(--primary);
}

.endpoint-path {
    font-family: 'Roboto Mono', monospace;
    font-size: 16px;
    color: var(--secondary);
    word-break: break-all;
}

.endpoint-description {
    color: var(--gray);
    margin-bottom: 40px;
    font-size: 18px;
    line-height: 1.8;
}

.section-title {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray);
    margin-bottom: 24px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.section-title::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    opacity: 0.5;
}

.code-block {
    background: var(--code-bg);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
    overflow-x: auto;
    position: relative;
    max-height: 500px;
    border: 1px solid rgba(255,255,255,0.1);
}

.code-block.success {
    background: linear-gradient(to right, var(--success-bg), rgb(52, 220, 83));
    border: 1px solid rgba(52,168,83,0.2);
    border-left: 4px solid var(--success);
    position: relative;
    overflow: hidden;
}

.code-block.error {
    background: linear-gradient(to right, var(--danger-bg), rgba(234,67,53,0.03));
    border: 1px solid rgba(234,67,53,0.2);
    border-left: 4px solid var(--danger);
    position: relative;
    overflow: hidden;
}

.code-block.success::before,
.code-block.error::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border-bottom-left-radius: 8px;
}

.code-block.success::before {
    content: 'SUCCESS';
    background: var(--success-bg);
    /* color: var(--success); */
    color: white;
}

.code-block.error::before {
    content: 'ERROR';
    background: var(--danger-bg);
    color: white;
}

.code-block pre {
    margin: 0;
    font-family: 'Roboto Mono', monospace;
    font-size: 15px;
    line-height: 1.8;
}

.code-block code {
    display: block;
    /* color: var(--code-text); */
    color: white;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Syntax highlighting */
.code-block .string { color: #ce9178; }
.code-block .number { color: #b5cea8; }
.code-block .boolean { color: #569cd6; }
.code-block .null { color: #569cd6; }
.code-block .key { color: #9cdcfe; }

.parameters {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.parameters th,
.parameters td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-size: 15px;
    line-height: 1.6;
}

.parameters th {
    font-weight: 500;
    color: var(--gray);
    background: var(--code-bg);
    color: var(--code-text);
}

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

.parameter-name {
    font-family: 'Roboto Mono', monospace;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
}

.required {
    display: inline-block;
    font-size: 12px;
    /* color: var(--danger); */
    color: white;
    background: var(--danger-bg);
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: 500;
    text-transform: uppercase;
}

.note {
    background: rgba(26,115,232,0.08);
    border-left: 4px solid var(--primary);
    padding: 24px;
    border-radius: 12px;
    margin-bottom: 32px;
    font-size: 16px;
}

.note i {
    color: var(--primary);
    margin-right: 12px;
}

.note strong {
    color: var(--primary);
    margin-right: 8px;
}

.responses {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
    background: white;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
}

.responses th,
.responses td {
    padding: 16px 24px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-size: 15px;
}

.responses th {
    font-weight: 500;
    color: var(--gray);
    background: var(--code-bg);
    color: var(--code-text);
}

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

.responses td:first-child {
    font-family: 'Roboto Mono', monospace;
    font-weight: 500;
    font-size: 14px;
}

.responses tr[data-status="200"] td:first-child,
.responses tr[data-status="201"] td:first-child {
    color: var(--success);
}

.responses tr[data-status^="4"],
.responses tr[data-status^="5"] {
    color: var(--danger);
}

/* Tablet Breakpoint */
@media (max-width: 1024px) {
    body.menu-active {
        overflow: hidden;
    }

    .overlay {
        display: block;
    }

    body.menu-active .overlay {
        opacity: 1;
    }

    .nav {
        transform: translateX(-100%);
    }

    body.menu-active .nav {
        transform: translateX(0);
    }

    .main {
        margin-left: 0;
        padding: 40px;
    }

    .menu-toggle {
        display: block;
    }
}

/* Mobile Breakpoint */
@media (max-width: 768px) {
    .nav {
        width: 85%;
        max-width: 360px;
        padding: 24px;
    }

    .nav-header {
        margin-bottom: 32px;
        padding-bottom: 20px;
    }

    .menu-toggle {
        width: 44px;
        height: 44px;
        padding: 10px;
    }

    .main {
        padding: 24px;
        padding-top: 80px;
    }

    .endpoint {
        padding: 24px;
        margin-bottom: 24px;
        border-radius: 12px;
    }

    .api-intro {
        padding: 24px;
        border-radius: 12px;
    }

    .api-intro h1 {
        font-size: 28px;
    }

    .api-intro p {
        font-size: 16px;
    }

    .endpoint-header {
        gap: 12px;
    }

    .endpoint-path {
        font-size: 14px;
    }

    .endpoint-description {
        font-size: 16px;
    }

    .parameters, .responses {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .parameters td,
    .parameters th,
    .responses td,
    .responses th {
        padding: 12px 16px;
    }

    .note {
        padding: 16px;
    }

    .code-block {
        padding: 20px;
        font-size: 14px;
        border-radius: 8px;
    }

    .code-block pre {
        font-size: 13px;
    }
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
