:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --button-hover-color: #1a365d;
    --text-color: #1f2937;
    --light-text: #6b7280;
    --background-color: #ffffff;
    --sidebar-bg: #fffff5;
    --border-color: #e5e7eb;
    --hover-color: #f3f4f6;
    --warning-bg: #fff7ed;
    --warning-border: #fdba74;
    --warning-text: #c2410c;
    --sidebar-link-color: #8D8D88;
    --sidebar-link-hover-color: #1f2937;
    --sidebar-link-active-color: #2556BB;
}

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

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

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

/* Sidebar Styles */
.sidebar {
    width: 300px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    left: 0;
    top: 0;
    display: block;
    flex-direction: column;
}

.logo-container {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.logo {
    max-width: 100%;
    height: auto;
}

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

.search-input-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    overflow: hidden;
}

#search-input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: none;
    outline: none;
    font-size: 0.875rem;
}

#search-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#search-button:hover {
    background-color: var(--secondary-color);
}

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

#search-results.active {
    display: block;
}

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

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

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

.search-result-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--primary-color);
}

.search-result-snippet {
    font-size: 0.875rem;
    color: var(--light-text);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.search-result-snippet mark {
    background-color: rgba(255, 220, 0, 0.4);
    padding: 0.1rem 0.2rem;
    border-radius: 0.125rem;
    font-weight: 500;
    color: var(--text-color);
}

.no-results {
    padding: 1rem;
    text-align: center;
    color: var(--light-text);
}

.nav ul {
    list-style: none;
}

.nav li {
    margin-bottom: 0.5rem;
}

.nav a {
    display: block;
    padding: 0.5rem;
    color: var(--sidebar-link-color);
    text-decoration: none;
    border-radius: 0.25rem;
    transition: color 0.2s;
}

.nav a:hover {
    color: var(--sidebar-link-hover-color);
}

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

.nav-section span {
    display: block;
    padding: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.2s;
}

.sub-nav {
    margin-left: 1rem;
    margin-top: 0.5rem;
    display: block;
}

.sub-sub-nav {
    margin-left: 1rem;
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
}

.sub-sub-nav a {
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    color: var(--light-text);
}

/* Main Content Styles */
.content {
    flex: 1;
    margin-left: 300px;
    padding: 2rem;
    max-width: 800px;
}

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

.content-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.content-header p {
    font-size: 1.125rem;
    color: var(--light-text);
}

/* Section styles - for HTML elements */
section {
    margin-bottom: 3rem;
}

section h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

section h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

section p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

section ul, section ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--light-text);
}

section li {
    margin-bottom: 0.5rem;
}

/* Markdown-generated content styles - to match section styles */
.content > h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.content > h2 {
    font-size: 1.875rem;
    margin-bottom: 1rem;
    margin-top: 3rem;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.content > h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

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

.content > p {
    color: var(--light-text);
    margin-bottom: 1.5rem;
}

.content > ul, .content > ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--light-text);
}

.content > ul li, .content > ol li {
    margin-bottom: 0.5rem;
}

/* Nested markdown elements */
.content > ul ul, .content > ol ol, .content > ul ol, .content > ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* Blockquotes in markdown */
.content > blockquote {
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-left: 4px solid var(--warning-text);
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1.5rem 0;
    color: var(--text-color);
}

.content > blockquote p {
    margin-bottom: 0.5rem;
}

.content > blockquote p:last-child {
    margin-bottom: 0;
}

/* Tables in markdown */
.content > table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
}

.content > table th, .content > table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
}

.content > table th {
    background-color: var(--sidebar-bg);
    font-weight: 600;
}

.content > table tr:nth-child(even) {
    background-color: var(--hover-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(0);
        transition: transform 0.3s ease;
        z-index: 10;
        width: 80%;
        max-width: 300px;
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    }

    .sidebar.active {
        transform: translateX(-100%);
    }

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

    .menu-toggle {
        display: flex !important;
    }
}

/* Code Block Styles */
pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    position: relative;
}

/* Style for both section code blocks and markdown code blocks */
pre code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    display: block;
    width: 100%;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
}

/* Language-specific syntax highlighting */
.language-bash, .language-javascript, .language-php, .language-python, .language-ruby, .language-go, .language-rust, .language-java {
    color: #e2e8f0;
}

.copy-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 0.25rem;
    color: #e2e8f0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.copy-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Button Styles */
.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.button:hover {
    background-color: var(--button-hover-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* CTA Container */
.cta-container {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
}

.cta-container .button {
    background-color: var(--primary-color);
    border: 2px solid transparent;
}

.cta-container .button:hover {

    color: white !important;
}

/* Warning Box */
.warning-box {
    background-color: var(--warning-bg);
    border: 1px solid var(--warning-border);
    border-left: 4px solid var(--warning-text);
    border-radius: 0.375rem;
    padding: 1rem;
    margin: 1.5rem 0;
}

.warning-box h4 {
    color: var(--warning-text);
    margin-top: 0;
}

.warning-box p {
    margin-bottom: 0;
}

/* Inline code */
p code, li code {
    background-color: #f1f5f9;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    color: #0f172a;
}

/* Responsive Images */
.content img {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.responsive-image {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.content img:hover,
.responsive-image:hover {
    opacity: 0.8;
}

/* Different sizes for different screen sizes */
@media (max-width: 480px) {
    .content img,
    .responsive-image {
        max-width: 100%;
        margin: 0.5rem 0;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .content img,
    .responsive-image {
        max-width: 90%;
        margin: 0.75rem auto;
        display: block;
    }
}

@media (min-width: 769px) {
    .content img,
    .responsive-image {
        max-width: 500px;
        margin: 1rem 0;
    }
}

/* Image Modal Styles */
.image-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: #ccc;
}

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

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

/* Quickstart Grid */
.quickstart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.quickstart-card {
    display: block;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.quickstart-card:hover {
    color: white !important;
}

.quickstart-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.quickstart-card p {
    color: var(--light-text);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.quickstart-card .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white !important;
    text-decoration: none;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: background-color 0.2s, transform 0.1s, box-shadow 0.2s;
    margin-top: 0.25rem;
}

.quickstart-card .button:hover {
    color: white !important;
    text-decoration: underline;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.quickstart-card i {
    margin-right: 0.5rem;
}

/* Active navigation link */
.nav a.active {
    font-weight: 500;
    color: var(--sidebar-link-active-color);
}

/* Responsive adjustments for quickstart grid */
@media (max-width: 768px) {
    .quickstart-grid {
        grid-template-columns: 1fr;
    }
}

.menu-toggle {
    display: none;
    position: fixed;
    top: 1rem;
    right: 1rem;
    left: auto;
    z-index: 20;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
} 