:root {
    --primary: #5DBCC3;
    --primary-dark: #4A9CA2;
    --primary-light: #7FD4DA;
    --accent: #FF8B94;
    --dark: #2C3E50;
    --light: #F8F9FA;
    --gray: #6C757D;
    --border: #DEE2E6;
    --code-bg: #F6F8FA;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
}

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

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

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 200;
    border-radius: 0 0 4px 0;
}

.skip-link:focus {
    top: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
summary:focus,
details:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Navigation */
.navbar {
    background: white;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--dark);
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-icon {
    width: 36px;
    height: 36px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
}

/* Layout */
.layout {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
}

/* Sidebar */
.sidebar {
    width: 260px;
    padding: 2rem 1rem;
    border-right: 1px solid var(--border);
    height: calc(100vh - 65px);
    overflow-y: auto;
    position: sticky;
    top: 65px;
}

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

.sidebar-section h3 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray);
    margin-bottom: 0.75rem;
}

.sidebar-section a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--dark);
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 0.25rem;
}

.sidebar-section a:hover {
    background: var(--light);
    color: var(--primary);
}

.sidebar-section a.active {
    background: var(--primary);
    color: white;
}

/* Content */
.content {
    flex: 1;
    padding: 2rem 3rem;
    max-width: 900px;
}

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

.docs-banner {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 1.5rem;
}

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

.hero-docs p {
    font-size: 1.25rem;
    color: var(--gray);
}

/* Documentation Sections */
.doc-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px;
}

.doc-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

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

.doc-section p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.doc-section ul, .doc-section ol {
    margin: 1rem 0 1.5rem 2rem;
}

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

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

.install-card {
    padding: 1.5rem;
    background: var(--light);
    border-radius: 8px;
    border: 1px solid var(--border);
}

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

.install-card code {
    display: block;
    margin: 1rem 0;
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.9rem;
}

.install-card pre {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--code-bg);
    border-radius: 6px;
    overflow-x: auto;
}

.install-card pre code {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

.install-note {
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
    margin: 0.5rem 0 1rem;
}

/* Steps */
.steps {
    margin: 2rem 0;
}

.step {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

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

.step h4 {
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1.5rem 0;
}

.alert-info {
    background: #E3F2FD;
    border-left: 4px solid #2196F3;
    color: #1565C0;
}

/* Feature Demo */
.feature-demo {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1.5rem 0;
}

/* Shortcuts Table */
.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.shortcuts-table th {
    background: var(--light);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

.shortcuts-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.shortcuts-table kbd {
    display: inline-block;
    padding: 3px 6px;
    font-size: 0.875rem;
    line-height: 1;
    color: var(--dark);
    vertical-align: middle;
    background: white;
    border: 1px solid var(--border);
    border-radius: 3px;
    box-shadow: inset 0 -1px 0 var(--border);
}

/* Troubleshooting */
.troubleshoot-item {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 8px;
}

.troubleshoot-item h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--primary-dark);
}

/* Support Section */
.support-section {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 12px;
    color: white;
    margin: 3rem 0;
}

.support-mascot {
    width: 100px;
    margin-bottom: 1rem;
}

.support-section h2 {
    border: none;
    color: white;
    margin-bottom: 0.75rem;
}

.support-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

/* Buttons */
.btn-docs {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-docs:hover {
    background: var(--primary-dark);
}

.btn-docs-outline {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border: 2px solid white;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-docs-outline:hover {
    background: rgba(255,255,255,0.9);
}

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 2rem 2rem 5rem 2rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-logo {
    width: 30px;
    height: 30px;
}

.footer-left p {
    margin: 0;
    color: rgba(255,255,255,0.7);
}

.footer-left a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-center {
    display: flex;
    gap: 2rem;
}

.footer-right {
    display: flex;
    gap: 2rem;
}

.footer-center a, .footer-right a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-center a:hover, .footer-right a:hover {
    color: white;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 5rem;
    right: 2rem;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    z-index: 98;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    align-items: center;
    gap: 0.5rem;
}

.mobile-sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: translateX(-2px);
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        height: 100vh;
        background: white;
        z-index: 101;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    .content {
        padding: 2rem;
        width: 100%;
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal overflow */
    body {
        overflow-x: hidden;
    }
    
    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-container {
        padding: 1rem;
        max-width: 100%;
    }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        gap: 0.5rem;
        z-index: 100;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 0.75rem;
        text-align: center;
        border-radius: 8px;
        transition: background 0.3s;
    }
    
    .nav-links a:hover {
        background: var(--light);
    }
    
    .nav-cta {
        margin-top: 0.5rem;
    }
    
    /* Content Optimizations */
    .layout {
        flex-direction: column;
        max-width: 100%;
        margin: 0;
    }
    
    .content {
        padding: 1rem;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }
    
    .hero-docs {
        padding: 2rem 1rem;
    }
    
    .hero-docs h1 {
        font-size: 1.75rem;
    }
    
    .hero-docs .docs-banner {
        max-width: 200px !important;
    }
    
    .doc-section {
        padding: 1.5rem 0;
    }
    
    .doc-section h2 {
        font-size: 1.5rem;
    }
    
    .doc-section h3 {
        font-size: 1.2rem;
    }
    
    .installation-options {
        grid-template-columns: 1fr;
    }
    
    .install-card {
        padding: 1rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .install-card code {
        font-size: 0.8rem;
        word-break: break-all;
        overflow-wrap: break-word;
    }
    
    .install-card pre {
        max-width: 100%;
        overflow-x: auto;
        margin: 0.75rem -0.5rem;
        padding: 0.75rem 0.5rem;
    }
    
    .install-card pre code {
        display: block;
        max-width: 100%;
        white-space: pre-wrap;
        word-wrap: break-word;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-demo,
    .troubleshoot-item {
        padding: 1rem;
    }
    
    pre {
        padding: 1rem 0.5rem;
        overflow-x: auto;
        max-width: calc(100vw - 2rem);
        margin-left: -0.5rem;
        margin-right: -0.5rem;
    }
    
    pre code {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
    }
    
    /* Fix code blocks in general */
    code {
        word-break: break-word;
        overflow-wrap: break-word;
    }
    
    .shortcuts-table {
        font-size: 0.85rem;
        width: 100%;
        display: block;
        overflow-x: auto;
    }
    
    .shortcuts-table tbody {
        display: block;
        width: 100%;
    }
    
    .shortcuts-table tr {
        display: flex;
        flex-direction: column;
        border-bottom: 1px solid var(--border);
        padding: 0.5rem;
    }
    
    .shortcuts-table th,
    .shortcuts-table td {
        padding: 0.25rem;
        text-align: left;
        display: block;
    }
    
    .shortcuts-table td:first-child {
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    
    /* Fix all tables on mobile */
    table {
        max-width: 100%;
        overflow-x: auto;
        display: block;
    }
    
    /* Footer Mobile */
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1rem;
    }
    
    .footer-left,
    .footer-center,
    .footer-right {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-center,
    .footer-right {
        gap: 0.5rem;
    }
    
    .support-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .support-section {
        padding: 2rem 1rem;
    }
    
    /* Mobile sidebar when active */
    .sidebar.active {
        width: 280px;
        padding: 1rem;
    }
    
    .mobile-sidebar-toggle {
        bottom: 4rem;
        right: 1rem;
        padding: 0.6rem 0.9rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .nav-logo span {
        font-size: 1.1rem;
    }
    
    .nav-icon {
        width: 30px;
        height: 30px;
    }
    
    .hero-docs h1 {
        font-size: 1.5rem;
    }
    
    .doc-section h2 {
        font-size: 1.3rem;
    }
    
    .btn-docs,
    .btn-docs-outline {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Return to Top Button */
#return-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 99;
}

#return-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 188, 195, 0.4);
}

#return-to-top:active {
    transform: translateY(0);
}

#return-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    #return-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    #return-to-top svg {
        width: 20px;
        height: 20px;
    }
}