/* Apple-style CSS for API Documentation with Chinese support */

:root {
    --primary-color: #0071e3;
    --text-color: #1d1d1f;
    --secondary-text-color: #86868b;
    --border-color: #d2d2d7;
    --bg-color: #ffffff;
    --secondary-bg-color: #f5f5f7;
    --code-bg-color: #f6f8fa;
    --success-color: #28cd41;
    --warning-color: #ff9f0a;
    --error-color: #ff3b30;
    --header-height: 64px;
    --sidebar-width: 260px;
    --content-max-width: 980px;
    --transition-speed: 0.3s;
}

/* Site Header and Navigation */
/* Edge Browser Compatibility */
@supports (-ms-ime-align: auto) {
    .site-header {
        background-color: rgba(255, 255, 255, 0.98);
        position: -ms-sticky;
        position: sticky;
    }
    
    .logo a {
        gap: 0;
        display: -ms-flexbox;
        display: flex;
        -ms-flex-align: center;
        align-items: center;
    }
    
    .logo a > * + * {
        margin-left: 8px;
    }
    
    .hero {
        background: #667eea;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        height: 185px;
    }
    
    .main-nav ul {
        display: -ms-flexbox;
        display: flex;
    }
    
    .main-nav a {
        display: inline-block;
        white-space: nowrap;
    }
    
    .nav-buttons {
        display: -ms-flexbox;
        display: flex;
    }
}
.site-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    -ms-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(210, 210, 215, 0.4);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.logo a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 8px;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
}

.logo a > * + * {
    margin-left: 8px;
}

.logo .relative {
    position: relative;
    width: 32px;
    height: 32px;
}

.logo .absolute {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.logo a:hover .absolute {
    transform: scale(1.05);
}

.main-nav ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    margin: 0 5px;
}

.logo .nav-logo-text {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-color);
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 6px;
    position: relative;
    transition: all 0.3s ease;
}

.main-nav a:hover {
    color: #0c63e4;
    background-color: rgba(12, 99, 228, 0.08);
}

.main-nav li.active a {
    color: #0c63e4;
    font-weight: 600;
}

.nav-buttons {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.login-btn, .signup-btn {
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.login-btn {
    color: #0c63e4;
    margin-right: 10px;
}

.login-btn:hover {
    background-color: rgba(12, 99, 228, 0.08);
}

.signup-btn {
    background-color: #0c63e4;
    color: white;
}

.signup-btn:hover {
    background-color: #0a51c0;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(12, 99, 228, 0.2);
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .header-container {
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .nav-buttons .login-btn {
        display: none;
    }
    
    .logo span {
        display: none;
    }
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'SF Pro Display', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: opacity var(--transition-speed) ease;
}

a:hover {
    opacity: 0.8;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 0 20px;
    height: 185px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -webkit-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -moz-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: -ms-linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    box-sizing: border-box;
}

.hero:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0) 60%);
    z-index: 1;
}

.hero h1, .hero p {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: white;
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Content Layout */
.content {
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - var(--header-height) - 185px);
    padding-bottom: 50px;
}

.sidebar {
    width: var(--sidebar-width);
    border-right: 1px solid var(--border-color);
    padding: 30px 20px;
    position: sticky;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    overflow-y: auto;
    background-color: rgba(249, 250, 251, 0.8);
    transition: all 0.3s ease;
}

.main-content {
    flex: 1;
    padding: 40px;
    max-width: var(--content-max-width);
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.03);
    background-color: white;
    border-radius: 0 0 12px 12px;
}

/* Sidebar Navigation */
.side-nav ul {
    list-style: none;
}

.nav-category {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--secondary-text-color);
    margin: 24px 0 8px 0;
}

.side-nav ul li:first-child.nav-category {
    margin-top: 0;
}

.side-nav a {
    display: block;
    padding: 8px 12px;
    margin: 4px 0;
    color: var(--text-color);
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all var(--transition-speed) ease;
    border-left: 2px solid transparent;
}

.side-nav a:hover {
    color: var(--primary-color);
    background-color: rgba(12, 99, 228, 0.05);
    transform: translateX(2px);
}

.side-nav a.active {
    color: var(--primary-color);
    font-weight: 500;
    background-color: rgba(12, 99, 228, 0.08);
    border-left: 2px solid var(--primary-color);
}

/* Content Sections */
section {
    margin-bottom: 60px;
    position: relative;
    transition: all 0.3s ease;
}

h2 {
    font-size: 2.2rem;
    font-weight: 600;
    margin-bottom: 24px;
    letter-spacing: -0.015em;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.3;
    color: #0c63e4;
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    margin: 36px 0 18px;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #333;
    position: relative;
    padding-left: 14px;
}

h3::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: linear-gradient(to bottom, #0c63e4, #0c8aff);
    border-radius: 4px;
}

h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 28px 0 14px;
    line-height: 1.3;
}

/* Typography improvements */
p {
    margin-bottom: 18px;
    font-size: 1rem;
    line-height: 1.7;
    color: #333;
}

ul, ol {
    margin: 18px 0 18px 24px;
}

li {
    margin-bottom: 10px;
    line-height: 1.6;
    position: relative;
}

ul li::marker {
    color: var(--primary-color);
}

/* Code Examples */
.code-example {
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--code-bg-color);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.code-example:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background-color: var(--secondary-bg-color);
    border-bottom: 1px solid var(--border-color);
}

.code-header span {
    font-size: 0.9rem;
    font-weight: 500;
}

.copy-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    padding: 5px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: 'SF Pro Display', 'Noto Sans SC', -apple-system, sans-serif;
    position: relative;
    overflow: hidden;
}

.copy-btn:hover {
    background-color: rgba(0, 113, 227, 0.08);
    transform: translateY(-1px);
}

.copy-btn:active {
    transform: translateY(0);
}

pre {
    padding: 18px;
    overflow-x: auto;
    background-color: var(--code-bg-color);
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.7;
}

code {
    font-family: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    background-color: var(--code-bg-color);
    padding: 3px 6px;
    border-radius: 4px;
}

pre code {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

/* Info Boxes */
.info-box {
    background-color: rgba(0, 113, 227, 0.06);
    border-left: 4px solid var(--primary-color);
    padding: 20px;
    margin: 28px 0;
    border-radius: 0 12px 12px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.info-box:hover {
    transform: translateX(3px);
}

.info-box h4 {
    margin-top: 0;
    color: var(--primary-color);
    margin-bottom: 12px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.info-box h4::before {
    content: "ℹ️";
    margin-right: 8px;
    font-size: 1.4rem;
}

.info-box p {
    margin-bottom: 0;
    color: #444;
}

/* HTTP Methods */
.method-list {
    list-style: none;
    margin-left: 0;
}

.method-list li {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.method {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-right: 14px;
    min-width: 62px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.method:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.method.get {
    background-color: rgba(40, 205, 65, 0.15);
    color: var(--success-color);
}

.method.post {
    background-color: rgba(0, 113, 227, 0.15);
    color: var(--primary-color);
}

.method.put {
    background-color: rgba(255, 159, 10, 0.15);
    color: var(--warning-color);
}

.method.delete {
    background-color: rgba(255, 59, 48, 0.15);
    color: var(--error-color);
}

/* Endpoint */
.endpoint {
    display: flex;
    align-items: center;
    margin: 22px 0;
    padding: 16px;
    background-color: rgba(249, 250, 251, 0.9);
    border-radius: 10px;
    border-left: 4px solid #0c63e4;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease;
}

.endpoint:hover {
    transform: translateX(3px);
}

.endpoint code {
    font-size: 1.05rem;
    background-color: transparent;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border-color), 0 2px 10px rgba(0, 0, 0, 0.05);
}

thead {
    background-color: rgba(12, 99, 228, 0.06);
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    line-height: 1.5;
}

th {
    font-weight: 600;
    color: #0c63e4;
}

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

tbody tr {
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(249, 250, 251, 0.7);
}

/* Add smooth scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

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

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(12, 99, 228, 0.1);
    border-radius: 20px;
    border: 2px solid transparent;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(12, 99, 228, 0.2);
}

/* Mobile menu toggle for smaller screens */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #0c63e4;
        color: white;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        text-align: center;
        line-height: 50px;
        font-size: 24px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
        z-index: 999;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle:hover {
        transform: scale(1.1);
    }
}

/* Dark mode detection support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f7;
        --secondary-text-color: #a1a1a6;
        --border-color: #38383c;
        --bg-color: #1d1d1f;
        --secondary-bg-color: #2c2c2e;
        --code-bg-color: #2c2c30;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .site-header {
        background-color: rgba(29, 29, 31, 0.85);
        border-bottom: 1px solid rgba(56, 56, 60, 0.6);
    }
    
    .logo a, .main-nav a {
        color: var(--text-color);
    }
    
    .sidebar {
        background-color: rgba(44, 44, 46, 0.7);
    }
    
    .main-content {
        background-color: #1d1d1f;
    }
    
    .code-example, pre, code {
        background-color: #2c2c30;
    }
    
    table {
        box-shadow: 0 0 0 1px var(--border-color), 0 2px 10px rgba(0, 0, 0, 0.2);
    }
    
    thead {
        background-color: rgba(12, 99, 228, 0.1);
    }
    
    tbody tr:hover {
        background-color: rgba(44, 44, 46, 0.8);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
    }

    .side-nav ul {
        display: flex;
        flex-wrap: wrap;
    }

    .nav-category {
        width: 100%;
        margin-top: 16px;
    }

    .side-nav a {
        padding: 8px 14px;
        margin: 4px;
        border-left: none;
        border-bottom: 2px solid transparent;
    }
    
    .side-nav a.active {
        border-left: none;
        border-bottom: 2px solid var(--primary-color);
    }
    
    .side-nav a:hover {
        transform: translateY(-2px);
    }

    .main-content {
        padding: 25px;
        box-shadow: none;
        border-radius: 0;
    }
}

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

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

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 16px;
    }
    
    .endpoint {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .method {
        margin-bottom: 8px;
    }
    
    .info-box {
        padding: 15px;
    }
    
    .side-nav a {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 15px;
        height: 185px;
    }

    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .hero p {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.5rem;
        padding-bottom: 10px;
    }
    
    h3 {
        font-size: 1.3rem;
        padding-left: 10px;
    }
    
    h3::before {
        width: 3px;
    }

    .endpoint {
        flex-direction: column;
        align-items: flex-start;
        padding: 12px;
    }

    .method {
        margin-bottom: 8px;
    }
    
    .code-example {
        margin: 16px 0;
        border-radius: 8px;
    }
    
    .code-header {
        padding: 8px 12px;
    }
    
    pre {
        padding: 12px;
        font-size: 0.85rem;
    }
    
    table {
        display: block;
        overflow-x: auto;
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 10px 12px;
    }
    
    .info-box {
        padding: 12px;
        margin: 20px 0;
    }
    
    .info-box h4 {
        font-size: 1.1rem;
    }
    
    ul, ol {
        margin-left: 18px;
    }
}