:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-secondary);
}

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

/* Navigation */
.docs-nav {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.back-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}

/* Layout */
.docs-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar */
.docs-sidebar {
    position: sticky;
    top: 80px;
    height: fit-content;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-section h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

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

.sidebar-section ul li {
    margin-bottom: 0.3rem;
}

.sidebar-section ul li a {
    display: block;
    padding: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.sidebar-section ul li a:hover {
    background: var(--bg-secondary);
    color: var(--primary-color);
}

.sidebar-section ul li a.active {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

/* Main Content */
.docs-content {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    min-height: 80vh;
}

.docs-hero {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
}

.docs-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.lead {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.doc-section {
    margin-bottom: 3rem;
}

.doc-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-section h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
}

.doc-section p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.8;
}

.doc-section ul,
.doc-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.doc-section li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Info Box */
.info-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

.info-box h3 {
    margin-top: 0;
}

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

.feature-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

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

.feature-box h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* Tech Stack */
.tech-category {
    margin-bottom: 2rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Code Block */
.code-block {
    margin: 1.5rem 0;
}

.code-block h4 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.code-block pre {
    background: #1f2937;
    color: #e5e7eb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
}

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

/* Alert */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: flex;
    align-items: start;
    gap: 12px;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert i {
    font-size: 1.3rem;
}

/* Workflow Diagram */
.workflow-diagram {
    margin: 2rem 0;
}

.workflow-step {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1.5rem;
    align-items: start;
}

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

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

.workflow-arrow {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

/* Journey Step */
.journey-step {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.journey-step h3 {
    margin-top: 0;
}

/* Diagram Box */
.diagram-box {
    margin: 2rem 0;
    text-align: center;
}

.diagram-caption {
    margin-top: 1rem;
    font-style: italic;
    color: var(--text-secondary);
}

/* Tables */
.table-doc {
    margin: 2rem 0;
}

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

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

.doc-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-primary);
}

.doc-table code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #dc2626;
}

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

.contact-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

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

.contact-card h4 {
    margin-bottom: 0.5rem;
}

.contact-card p {
    font-size: 0.9rem;
    color: var(--primary-color);
}

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

/* Responsive */
@media (max-width: 968px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: static;
    }

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

@media (max-width: 768px) {
    .docs-content {
        padding: 1.5rem;
    }

    .docs-hero h1 {
        font-size: 2rem;
    }

    .doc-section h2 {
        font-size: 1.5rem;
    }
}
