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

:root {
    --primary-color: #29845A;
    --primary-dark: #1F6B47;
    --secondary-color: #10B981;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F9FAFB;
    --bg-tertiary: #F3F4F6;
    --border-color: #E5E7EB;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    --sidebar-width: 280px;
    --header-height: 60px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.6;
}

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

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-header .subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    font-weight: 300;
}

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

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

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: white;
    font-weight: 600;
}

.nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    font-size: 0.875rem;
    opacity: 0.8;
}

.sidebar-footer .date {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
    max-width: 1200px;
}

.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Search Bar */
.search-container {
    position: relative;
    margin-bottom: 2rem;
}

.search-container i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

#searchInput {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#searchInput:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 132, 90, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background 0.2s;
}

.search-result-item:hover {
    background: var(--bg-secondary);
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Content Sections */
.content-section {
    background: white;
    padding: 2.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    display: none;
}

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

.content-section h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

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

.content-section ul, .content-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

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

/* Intro Card */
.intro-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    margin-bottom: 2rem;
}

.intro-card h2 {
    color: white;
    margin-bottom: 1rem;
}

.intro-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
}

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

.feature-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

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

/* Tech Stack */
.tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.tech-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Quick Links */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link:hover {
    border-color: var(--primary-color);
    background: white;
    transform: translateX(5px);
}

.quick-link i {
    font-size: 2rem;
    color: var(--primary-color);
}

.quick-link h4 {
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.quick-link p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Code Blocks */
.code-block {
    background: #1E293B;
    border-radius: 0.5rem;
    margin: 1rem 0;
    overflow: hidden;
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #0F172A;
    color: #94A3B8;
    font-size: 0.875rem;
}

.copy-btn {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.code-block pre {
    padding: 1.25rem;
    margin: 0;
    overflow-x: auto;
}

.code-block code {
    color: #E2E8F0;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.6;
}

.content-section code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid var(--info-color);
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid var(--danger-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    margin: 1rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
}

table thead {
    background: var(--bg-tertiary);
}

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

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

table tbody tr:hover {
    background: var(--bg-secondary);
}

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

/* Steps */
.steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 1.5rem 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-item i {
    font-size: 2rem;
    color: var(--primary-color);
    flex-shrink: 0;
}

.feature-item h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.feature-item p {
    margin: 0;
    color: var(--text-secondary);
}

/* Endpoints */
.endpoint-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.endpoint-method {
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    min-width: 80px;
    text-align: center;
}

.endpoint-method.get {
    background: #D1FAE5;
    color: #065F46;
}

.endpoint-method.post {
    background: #DBEAFE;
    color: #1E40AF;
}

.endpoint-method.put {
    background: #FEF3C7;
    color: #92400E;
}

.endpoint-method.delete {
    background: #FEE2E2;
    color: #991B1B;
}

.endpoint-details {
    flex: 1;
}

.endpoint-details code {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-color);
}

.endpoint-details p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Troubleshooting */
.troubleshoot-item {
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--warning-color);
}

.troubleshoot-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--warning-color);
}

.troubleshoot-item p {
    margin-bottom: 0.5rem;
}

.troubleshoot-item ul {
    margin-top: 0.5rem;
}

/* Footer */
.doc-footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-color);
    margin-top: 3rem;
}

.doc-footer p {
    margin: 0.5rem 0;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

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

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

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

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

    .mobile-menu-toggle {
        display: block;
    }

    .content-section {
        padding: 1.5rem;
    }

    .content-section h1 {
        font-size: 2rem;
    }

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

    .quick-links {
        grid-template-columns: 1fr;
    }

    .tech-stack {
        justify-content: center;
    }

    .step-item {
        flex-direction: column;
    }

    .step-number {
        align-self: flex-start;
    }
}

/* Scrollbar Styles */
.sidebar::-webkit-scrollbar,
.search-results::-webkit-scrollbar,
.code-block pre::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.search-results::-webkit-scrollbar-track,
.code-block pre::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb,
.search-results::-webkit-scrollbar-thumb,
.code-block pre::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.search-results::-webkit-scrollbar-thumb:hover,
.code-block pre::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section.active {
    animation: fadeIn 0.3s ease;
}

