/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: #2d3748;
    background-color: #ffffff;
    font-size: 15px;
}

/* Layout Container */
.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    padding: 1.5rem 2rem 1.25rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background-color: #FFFFFF;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.5rem;
}

.logo-image {
    width: 42px;
    height: 42px;
    border-radius: 6px;
}

.logo h1 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1a202c;
    letter-spacing: -0.025em;
}

.tagline {
    color: #718096;
    font-size: 0.9rem;
    margin-left: 3.5rem;
    font-weight: 500;
}

/* Main Content Layout */
.main-content {
    display: flex;
    flex: 1;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: #f8fafc;
    border-right: 1px solid #e2e8f0;
    padding: 1.25rem 1rem 1.25rem 1.5rem;
    overflow-y: auto;
    height: calc(100vh - 130px);
    position: sticky;
    top: 0;
}

.search-container {
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 0.875rem;
    background-color: white;
    transition: all 0.2s ease;
    color: #2d3748;
}

.search-input:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    background-color: #ffffff;
}

.search-input::placeholder {
    color: #a0aec0;
}

/* Navigation */
.navigation {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.nav-section {
    margin-bottom: 1rem;
}

.nav-category {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #4a5568;
    margin-bottom: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 0.075em;
}

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

.nav-list li {
    margin-bottom: 0.125rem;
}

.nav-link {
    display: block;
    padding: 0.4375rem 0.6875rem;
    color: #4a5568;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.8125rem;
    transition: all 0.15s ease;
    border: 1px solid transparent;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #edf2f7;
    color: #2d3748;
    border-color: #e2e8f0;
}

.nav-link.active {
    background-color: #3182ce;
    color: white;
    font-weight: 600;
}

/* Main Content Area */
.content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: calc(100% - 380px);
    background-color: #ffffff;
}

/* Welcome Section */
.welcome-section {
    max-width: 800px;
}

.welcome-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.welcome-section>p {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

/* Features Grid */
.features {
    margin-bottom: 3rem;
}

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

.feature-card {
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
}

.feature-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.feature-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: #4b5563;
    line-height: 1.6;
}

/* Getting Started Section */
.getting-started {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background-color: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.getting-started h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.getting-started p {
    color: #4b5563;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.getting-started ul {
    list-style-position: inside;
    color: #4b5563;
    line-height: 1.7;
}

.getting-started li {
    margin-bottom: 0.5rem;
}

.getting-started strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Version Information */
.version-info {
    padding: 1.5rem;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background-color: white;
}

.version-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.version-table {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.version-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.version-number {
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4f46e5;
    background-color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
    min-width: 80px;
    text-align: center;
}

.version-description {
    color: #4b5563;
    flex: 1;
}

/* Function Page Styles */
.function-page {
    max-width: 900px;
}

.function-header {
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.function-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    font-family: 'Monaco', 'Consolas', monospace;
}

.function-description {
    font-size: 1.125rem;
    color: #4b5563;
    line-height: 1.7;
}

.function-section {
    margin-bottom: 2.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 1rem;
    border-bottom: 2px solid #f3f4f6;
    padding-bottom: 0.5rem;
}

/* Code Blocks */
.code-block {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.syntax-highlight {
    background-color: #f1f5f9;
    border-left: 4px solid #4f46e5;
    padding: 1rem;
    margin: 1rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.875rem;
}

/* Definition Code Blocks */
.code-header {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
}

.code-header .language {
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.code-header button {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    color: #4b5563;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.15s ease;
}

.code-header button:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.code-header button:active {
    background-color: #f3f4f6;
}

.code-container {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 6px 6px;
    padding: 0;
    margin: 0;
}

.code-container pre {
    margin: 0;
    padding: 1rem;
    background: transparent;
    border: none;
    border-radius: 0;
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #1f2937;
    overflow-x: auto;
}

.code-container code {
    background: transparent;
    padding: 0;
    border-radius: 0;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.successful-copy-alert {
    position: absolute;
    right: 0;
    top: 0;
    background: #10b981;
    color: white;
    padding: 0.25rem;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: opacity 0.15s ease;
}

.successful-copy-alert.is-transparent {
    opacity: 0;
    pointer-events: none;
}

/* Parameter Tables */
.parameter-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: white;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
}

.parameter-table th {
    background-color: #f8fafc;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e5e5;
    font-size: 0.875rem;
}

.parameter-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
    color: #4b5563;
    vertical-align: top;
    font-size: 0.875rem;
}

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

.parameter-table code {
    background-color: #e5e7eb;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.75rem;
}

/* Example Boxes */
.example-box {
    background-color: #fefce8;
    border: 1px solid #facc15;
    border-radius: 6px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.example-box h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 0.75rem;
}

.example-box p {
    color: #78350f;
    margin-bottom: 0.75rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 320px;
    }

    .content {
        max-width: calc(100% - 320px);
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #e5e5e5;
    }

    .content {
        max-width: 100%;
        padding: 1.5rem;
    }

    .header {
        padding: 1.5rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .tagline {
        margin-left: 3rem;
        font-size: 0.875rem;
    }

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

    .welcome-section h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 1rem;
    }

    .logo {
        gap: 0.75rem;
    }

    .logo-image {
        width: 32px;
        height: 32px;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    .tagline {
        margin-left: 2.5rem;
        font-size: 0.8rem;
    }

    .content {
        padding: 1rem;
    }

    .sidebar {
        padding: 1rem;
    }
}