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

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --bg-color: #ffffff;
    --text-color: #333333;
    --border-color: #dee2e6;
    --code-bg: #f5f7fa;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 6px rgba(0,0,0,0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-dark);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background-color: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.nav-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-brand i {
    margin-right: 0.5rem;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-menu a {
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-title i {
    font-size: 3.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.8;
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

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

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Section Styles */
section {
    padding: 4rem 0;
}

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

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-card {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Code Examples */
.code-example {
    background-color: var(--light-color);
    padding: 4rem 0;
}

.code-tabs {
    background: var(--bg-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tab-buttons {
    display: flex;
    background-color: var(--code-bg);
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 1rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tab-button:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom: 3px solid var(--primary-color);
    background-color: var(--bg-color);
}

.tab-content {
    padding: 2rem;
}

.tab-pane {
    display: none;
}

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

/* Code Blocks */
.code-block {
    margin: 1rem 0;
}

pre {
    margin: 0;
    border-radius: 5px;
    overflow-x: auto;
}

pre code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Installation Section */
.installation {
    background-color: var(--bg-color);
}

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

.install-option {
    background: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.install-option h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Comparison Section */
.comparison {
    background-color: var(--light-color);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.comparison-item {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.comparison-item h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Documentation Layout */
.docs-container {
    display: flex;
    min-height: calc(100vh - 80px);
}

.docs-sidebar {
    width: 280px;
    background-color: var(--light-color);
    padding: 2rem;
    border-right: 1px solid var(--border-color);
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.docs-sidebar h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.docs-sidebar ul {
    list-style: none;
}

.docs-sidebar ul li {
    margin-bottom: 0.5rem;
}

.docs-sidebar a {
    color: var(--text-color);
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.docs-sidebar a:hover {
    background-color: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
}

.docs-content {
    flex: 1;
    padding: 3rem;
    max-width: 900px;
}

.docs-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.docs-content h2 {
    font-size: 2rem;
    margin: 3rem 0 1.5rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.docs-content h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--dark-color);
}

.docs-content h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 1rem;
    color: var(--dark-color);
}

/* Info Boxes */
.info-box,
.warning-box {
    padding: 1.5rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.info-box {
    background-color: #e3f2fd;
    border-left: 4px solid var(--info-color);
}

.warning-box {
    background-color: #fff3cd;
    border-left: 4px solid var(--warning-color);
}

.info-box i,
.warning-box i {
    margin-right: 0.5rem;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    gap: 1rem;
}

/* Feature List */
.feature-list {
    list-style: none;
    margin: 1rem 0;
}

.feature-list li {
    padding: 0.5rem 0;
    padding-left: 2rem;
    position: relative;
}

.feature-list li i {
    position: absolute;
    left: 0;
    color: var(--success-color);
}

/* API Documentation Styles */
.api-method,
.api-attribute,
.api-class,
.api-interface {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.api-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.api-table th,
.api-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.api-table th {
    background-color: var(--light-color);
    font-weight: 600;
}

.api-table code {
    background-color: var(--code-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9rem;
}

/* Benchmark Table */
.benchmark-table {
    overflow-x: auto;
    margin: 1rem 0;
}

.benchmark-table table {
    width: 100%;
    border-collapse: collapse;
}

.benchmark-table th,
.benchmark-table td {
    padding: 0.75rem;
    text-align: left;
    border: 1px solid var(--border-color);
}

.benchmark-table th {
    background-color: var(--primary-color);
    color: white;
}

.benchmark-table tr:nth-child(even) {
    background-color: var(--light-color);
}

/* Lifetime Grid */
.lifetime-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.lifetime-card {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: 5px;
    text-align: center;
}

.lifetime-card h4 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.lifetime-card code {
    display: block;
    margin-top: 0.5rem;
    background-color: var(--code-bg);
    padding: 0.5rem;
    border-radius: 3px;
}

/* Compatibility List */
.compatibility-list {
    list-style: none;
    margin: 1rem 0;
}

.compatibility-list li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compatibility-list i {
    color: var(--success-color);
}

/* Migration Examples */
.migration-example {
    margin: 2rem 0;
}

.migration-example h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.migration-steps {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.migration-steps li {
    margin-bottom: 1rem;
}

/* Quick Reference */
.api-summary {
    background-color: var(--light-color);
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
}

.quick-ref-section {
    margin-bottom: 2rem;
}

.method-list {
    list-style: none;
    margin: 1rem 0;
}

.method-list li {
    padding: 0.5rem 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-color);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .docs-container {
        flex-direction: column;
    }

    .docs-sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .docs-content {
        padding: 2rem;
    }

    .feature-grid,
    .install-options,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

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

    .api-table {
        font-size: 0.9rem;
    }

    .api-table th,
    .api-table td {
        padding: 0.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .nav-buttons,
    .docs-sidebar {
        display: none;
    }

    .docs-content {
        max-width: 100%;
        padding: 0;
    }

    pre {
        overflow: visible;
        white-space: pre-wrap;
    }
}