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

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --secondary-color: #64748b;
    --background-color: #f8fafc;
    --sidebar-bg: #1e293b;
    --sidebar-text: #e2e8f0;
    --text-color: #334155;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --card-bg: #ffffff;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --inspector-color: #3b82f6;
    --studio-color: #8b5cf6;
    --predictor-color: #10b981;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* Sidebar Navigation */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

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

.sidebar-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.sidebar-header p {
    font-size: 0.875rem;
    color: var(--secondary-color);
}

.sidebar-search {
    padding: 16px 24px;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.875rem;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-search input:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.15);
}

.nav-menu {
    list-style: none;
    padding: 16px 0;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: block;
    padding: 12px 24px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.nav-link.active {
    background-color: rgba(37, 99, 235, 0.2);
    color: #fff;
    border-left-color: var(--primary-color);
}

.submenu {
    list-style: none;
    display: none;
    padding-left: 24px;
}

.has-submenu.open .submenu {
    display: block;
}

.submenu a {
    display: block;
    padding: 8px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.submenu a:hover {
    color: #fff;
}

/* Main Content */
.content {
    margin-left: 280px;
    min-height: 100vh;
}

.content-header {
    position: sticky;
    top: 0;
    background-color: var(--card-bg);
    padding: 16px 32px;
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    transition: all 0.3s ease;
}

.breadcrumb {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Documentation Content */
.documentation {
    max-width: 900px;
    margin: 0 auto;
    padding: 48px 32px;
}

.doc-section {
    margin-bottom: 64px;
}

.doc-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.lead {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.subsection {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.subsection h2 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 16px;
}

.subsection h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 32px;
    margin-bottom: 12px;
}

.subsection h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 24px;
    margin-bottom: 8px;
}

.subsection p {
    margin-bottom: 16px;
}

/* Product Cards */
.product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin: 32px 0;
}

.product-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.product-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.product-icon svg {
    width: 24px;
    height: 24px;
}

.inspector-icon {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--inspector-color);
}

.studio-icon {
    background-color: rgba(139, 92, 246, 0.1);
    color: var(--studio-color);
}

.predictor-icon {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--predictor-color);
}

.product-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.product-card p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.feature-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    margin-top: 0;
}

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

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

.feature-list li {
    padding: 8px 0 8px 24px;
    position: relative;
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
}

/* Workflow Steps */
.workflow-steps {
    counter-reset: step;
    list-style: none;
    margin: 24px 0;
}

.workflow-steps li {
    padding: 16px 16px 16px 64px;
    position: relative;
    margin-bottom: 8px;
    background-color: var(--card-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.workflow-steps li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Tables */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.info-table th,
.info-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.info-table th {
    background-color: var(--background-color);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color);
}

.info-table td {
    font-size: 0.875rem;
}

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

/* Screenshots */
.screenshot-container {
    margin: 24px 0;
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.screenshot {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.screenshot:hover {
    transform: scale(1.02);
}

.screenshot-caption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 12px;
    margin-bottom: 0;
}

/* Info Box */
.info-box {
    background-color: rgba(16, 185, 129, 0.08);
    border-left: 4px solid var(--success-color);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
}

.info-box h4 {
    color: var(--success-color);
    margin-top: 0;
    margin-bottom: 8px;
}

.info-box p {
    margin: 0;
    font-size: 0.9375rem;
}

.info-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.info-box li {
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

/* Tip Box */
.tip-box {
    background-color: rgba(37, 99, 235, 0.05);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
}

.tip-box h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 8px;
}

.tip-box p {
    margin: 0;
    font-size: 0.9375rem;
}

.tip-box ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.tip-box li {
    font-size: 0.9375rem;
    margin-bottom: 4px;
}

/* Warning Box */
.warning-box {
    background-color: rgba(239, 68, 68, 0.05);
    border-left: 4px solid var(--error-color);
    border-radius: 0 8px 8px 0;
    padding: 16px 20px;
    margin: 24px 0;
}

.warning-box h4 {
    color: var(--error-color);
    margin-top: 0;
    margin-bottom: 8px;
}

.warning-box p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Ordered Lists */
ol {
    margin: 16px 0;
    padding-left: 24px;
}

ol li {
    margin-bottom: 8px;
}

/* Keyboard Shortcuts */
kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: #24292e;
    background-color: #fafbfc;
    border: 1px solid #d1d5da;
    border-radius: 6px;
    box-shadow: inset 0 -1px 0 #d1d5da;
    vertical-align: middle;
    white-space: nowrap;
}

.info-table kbd {
    font-size: 0.75rem;
    padding: 2px 6px;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    .content {
        margin-left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .documentation {
        padding: 32px 20px;
    }
}

@media (max-width: 768px) {
    .doc-section h1 {
        font-size: 2rem;
    }

    .subsection h2 {
        font-size: 1.5rem;
    }

    .product-cards {
        grid-template-columns: 1fr;
    }

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

    .info-table {
        display: block;
        overflow-x: auto;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* Print Styles */
@media print {
    .sidebar,
    .content-header,
    .menu-toggle {
        display: none;
    }

    .content {
        margin-left: 0;
    }

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

    .screenshot-container {
        break-inside: avoid;
    }
}
