/* GitBook-style theme for StackSleuth Documentation */

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #2c3e50;
    background: #ffffff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin: 1.5rem 0 1rem 0;
    color: #2c3e50;
    font-weight: 600;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
}

h2 {
    font-size: 2rem;
    margin-top: 2rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #e9ecef;
}

h3 {
    font-size: 1.5rem;
    color: #34495e;
}

h4 {
    font-size: 1.25rem;
    color: #34495e;
}

p {
    margin: 1rem 0;
    color: #5a6c7d;
    line-height: 1.7;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Layout Structure */
.gitbook-container {
    display: flex;
    min-height: 100vh;
}

.gitbook-sidebar {
    width: 300px;
    background: #fafbfc;
    border-right: 1px solid #e6e8eb;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.gitbook-content {
    margin-left: 300px;
    flex: 1;
    padding: 0;
    background: white;
}

/* Header */
.gitbook-header {
    background: white;
    border-bottom: 1px solid #e6e8eb;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gitbook-header .breadcrumb {
    color: #8892a4;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.gitbook-header .actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.header-search {
    position: relative;
    max-width: 300px;
}

.header-search input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    background: #f8f9fa;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.header-search input:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.header-search .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #8892a4;
    font-size: 0.9rem;
}

/* Sidebar */
.sidebar-header {
    padding: 2rem 1.5rem 1rem;
    border-bottom: 1px solid #e6e8eb;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #2c3e50;
}

.sidebar-logo img {
    width: 32px;
    height: 32px;
}

.sidebar-logo span {
    font-size: 1.5rem;
    font-weight: 700;
}

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

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

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #8892a4;
    letter-spacing: 0.5px;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #5a6c7d;
    text-decoration: none;
    transition: all 0.3s ease;
    border-right: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: #f0f4f7;
    color: #3498db;
    text-decoration: none;
}

.nav-link.active {
    background: #e8f4f8;
    color: #3498db;
    border-right-color: #3498db;
    font-weight: 500;
}

.nav-link .icon {
    margin-right: 0.75rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.nav-submenu {
    padding-left: 1rem;
}

.nav-submenu .nav-link {
    padding-left: 3rem;
    font-size: 0.9rem;
}

/* Main Content */
.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.content-header {
    margin-bottom: 3rem;
}

.content-title {
    margin-bottom: 0.5rem;
}

.content-subtitle {
    color: #8892a4;
    font-size: 1.1rem;
    margin: 0;
}

/* Code Blocks */
pre {
    background: #f8f9fa;
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    position: relative;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.9rem;
    line-height: 1.4;
}

pre.language-bash {
    background: #2d3748;
    color: #e2e8f0;
    border-color: #4a5568;
}

pre.language-javascript,
pre.language-typescript {
    background: #1e1e1e;
    color: #d4d4d4;
    border-color: #3e3e3e;
}

code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
    font-size: 0.85rem;
    color: #e74c3c;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
    border-radius: 0;
}

/* Copy Button */
.code-copy {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #fff;
    border: 1px solid #e6e8eb;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 0.8rem;
    color: #5a6c7d;
}

pre:hover .code-copy {
    opacity: 1;
}

.code-copy:hover {
    background: #f8f9fa;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: white;
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    overflow: hidden;
}

thead {
    background: #f8f9fa;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e6e8eb;
}

th {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

td {
    color: #5a6c7d;
    font-size: 0.9rem;
}

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

/* Callouts & Alerts */
.callout, .alert {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    border-left: 4px solid;
    background: #f8f9fa;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.callout.info, .alert.alert-info {
    border-left-color: #3498db;
    background: #e8f4f8;
}

.callout.warning, .alert.alert-warning {
    border-left-color: #f39c12;
    background: #fdf6e3;
}

.callout.success, .alert.alert-success {
    border-left-color: #27ae60;
    background: #d5f4e6;
}

.callout.danger, .alert.alert-danger {
    border-left-color: #e74c3c;
    background: #fdf2f2;
}

.callout-title, .alert strong {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    display: block;
}

.alert > i {
    font-size: 1.2rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.alert.alert-info > i { color: #3498db; }
.alert.alert-warning > i { color: #f39c12; }
.alert.alert-success > i { color: #27ae60; }
.alert.alert-danger > i { color: #e74c3c; }

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

.feature-card {
    background: white;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-color: #3498db;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-icon i {
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.feature-card p {
    font-size: 0.9rem;
    color: #5a6c7d;
    line-height: 1.5;
    margin: 0;
}

/* Navigation Footer */
.content-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e6e8eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-nav {
    display: flex;
    align-items: center;
    color: #5a6c7d;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.footer-nav:hover {
    background: #f8f9fa;
    color: #3498db;
    text-decoration: none;
}

.footer-nav .icon {
    margin: 0 0.5rem;
}

/* Mobile Responsive */
.mobile-header {
    display: none;
    background: white;
    border-bottom: 1px solid #e6e8eb;
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 110;
}

.mobile-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #5a6c7d;
    cursor: pointer;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

@media (max-width: 768px) {
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    
    .gitbook-sidebar {
        transform: translateX(-100%);
        z-index: 101;
    }
    
    .gitbook-sidebar.open {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .gitbook-content {
        margin-left: 0;
    }
    
    .gitbook-header {
        display: none;
    }
    
    .content-wrapper {
        padding: 2rem 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Package Cards */
.package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.package-card {
    background: white;
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
}

.package-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.package-icon {
    width: 40px;
    height: 40px;
    background: #3498db;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.package-name {
    font-family: 'SFMono-Regular', Consolas, monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.package-description {
    color: #5a6c7d;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.package-actions {
    display: flex;
    gap: 0.75rem;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #3498db;
    color: white;
    border: 1px solid #3498db;
}

.btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    text-decoration: none;
}

.btn-secondary {
    background: white;
    color: #5a6c7d;
    border: 1px solid #e6e8eb;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: #d1d5db;
    text-decoration: none;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e6e8eb;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-result {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result:hover {
    background: #f8f9fa;
}

.search-result-title {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.search-result-excerpt {
    font-size: 0.85rem;
    color: #8892a4;
    line-height: 1.4;
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 300px;
    right: 0;
    height: 3px;
    background: #f1f3f4;
    z-index: 1000;
}

.scroll-progress {
    height: 100%;
    background: #3498db;
    width: 0%;
    transition: width 0.3s ease;
}

@media (max-width: 768px) {
    .scroll-indicator {
        left: 0;
    }
}

/* Print Styles */
@media print {
    .gitbook-sidebar,
    .mobile-header,
    .gitbook-header,
    .content-footer {
        display: none;
    }
    
    .gitbook-content {
        margin-left: 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    pre, blockquote {
        page-break-inside: avoid;
    }
} 