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

:root {
    --primary-color: #5865F2;
    --secondary-color: #4752C4;
    --background: #0f0f0f;
    --surface: #1a1a1a;
    --surface-light: #242424;
    --text-primary: #e4e4e7;
    --text-secondary: #a1a1aa;
    --border-color: #2f2f2f;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --code-bg: #1e1e1e;
    --sidebar-width: 280px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--surface);
    border-right: 1px solid var(--border-color);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.version {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-container {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(88, 101, 242, 0.1);
}

.nav-menu {
    padding: 1rem 0;
}

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

.nav-menu li {
    margin: 0.25rem 0;
}

.nav-section {
    padding: 0.75rem 1.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
    margin-top: 1rem;
}

.nav-link {
    display: block;
    padding: 0.625rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid transparent;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transition: height 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--surface-light);
    padding-left: 1.75rem;
}

.nav-link:hover::before {
    height: 100%;
}

.nav-link.active {
    color: var(--primary-color);
    background-color: rgba(88, 101, 242, 0.1);
    border-left-color: var(--primary-color);
    padding-left: 1.75rem;
}

.nav-link.active::before {
    height: 100%;
}

.content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 3rem;
    max-width: 1200px;
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    position: relative;
    overflow: hidden;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.6s ease;
}

.section:hover h2::after {
    width: 100%;
}

.section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.info-box {
    background-color: rgba(88, 101, 242, 0.1);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(88, 101, 242, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.info-box:hover::before {
    opacity: 1;
}

.info-box:hover {
    transform: translateX(5px);
    box-shadow: -4px 0 12px rgba(88, 101, 242, 0.2);
}

.info-box strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.warning-box {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.warning-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.warning-box:hover::before {
    opacity: 1;
}

.warning-box:hover {
    transform: translateX(5px);
    box-shadow: -4px 0 12px rgba(245, 158, 11, 0.2);
}

.warning-box h3 {
    color: var(--warning-color);
    margin-top: 0;
    margin-bottom: 1rem;
}

.warning-box ul {
    margin-left: 1.5rem;
    color: var(--text-secondary);
}

.warning-box li {
    margin-bottom: 0.5rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-card {
    background-color: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(88, 101, 242, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(88, 101, 242, 0.3);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.code-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: -1px;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tab-button:hover {
    background-color: var(--surface);
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-button:hover::before {
    width: 80%;
}

.tab-button.active {
    background-color: var(--code-bg);
    color: var(--primary-color);
    border-color: var(--border-color);
    transform: translateY(-2px);
}

.tab-button.active::before {
    width: 100%;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

pre {
    background-color: var(--code-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1rem 0;
    position: relative;
    transition: all 0.3s ease;
}

pre:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.15);
    transform: translateY(-2px);
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

p code, li code, td code {
    background-color: var(--surface-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.methods-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: var(--surface);
    border-radius: 8px;
    overflow: hidden;
}

.methods-table thead {
    background-color: var(--surface-light);
}

.methods-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 2px solid var(--border-color);
}

.methods-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

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

.methods-table tbody tr {
    transition: all 0.2s ease;
}

.methods-table tbody tr:hover {
    background-color: var(--surface-light);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(88, 101, 242, 0.1);
}

.footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-secondary);
}

.footer p {
    margin-bottom: 0.5rem;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--secondary-color);
}

.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-light);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.3;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-10vh) scale(1);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        bottom: 1rem;
        right: 1rem;
    }
}