pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    padding: 1rem;
    background-color: #1a202c;
    border-radius: 0.5rem;
}

.code-block {
    font-family: 'Courier New', Courier, monospace;
    line-height: 1.5;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: bold;
}

.markdown-body h1 {
    font-size: 2em;
}

.markdown-body h2 {
    font-size: 1.75em;
}

.markdown-body h3 {
    font-size: 1.5em;
}

.markdown-body h4 {
    font-size: 1.25em;
}

.markdown-body h5 {
    font-size: 1em;
}

.markdown-body h6 {
    font-size: 0.875em;
}

.markdown-body ul,
.markdown-body ol {
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.markdown-body ul {
    list-style-type: disc;
}

.markdown-body ol {
    list-style-type: decimal;
}

.markdown-body li {
    margin-bottom: 0.5em;
}

.markdown-body a {
    color: blue;
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
}

table th {
    background-color: #f3f4f6;
    text-align: left;
}

table tbody tr:hover {
    background-color: #ebf4ff;
}

.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

body {
    padding-top: 60px; 
}

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

.wiki-sidebar {
    width: 250px;
    background-color: #f6f8fa;
    padding: 20px;
    border-right: 1px solid #e1e4e8;
    margin-right: 20px;
}

.wiki-sidebar h3 {
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 10px;
}

.wiki-sidebar ul {
    list-style-type: none;
    padding: 0;
}

.wiki-sidebar ul li {
    margin-bottom: 10px;
}

.wiki-sidebar ul li a {
    text-decoration: none;
    color: #0366d6;
    transition: color 0.2s ease;
}

.wiki-sidebar ul li a:hover {
    color: #032f62;
}

.wiki-sidebar ul li a.active {
    font-weight: bold;
    color: #032f62;
}

.wiki-content {
    flex-grow: 1;
    max-width: calc(100% - 270px);
}

.markdown-body {
    padding: 20px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.loading, .error {
    text-align: center;
    padding: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    .wiki-container {
        flex-direction: column;
    }

    .wiki-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e4e8;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .wiki-content {
        max-width: 100%;
    }

    .mobile-menu-button {
        display: block;
        padding: 0.5rem;
        color: white;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #2563eb;
        padding: 1rem;
    }

    .nav-links.active {
        display: block;
    }

    .nav-links a {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Adjust section padding */
    section {
        padding: 3rem 1rem !important;
    }

    /* Adjust text sizes */
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }

    /* Adjust grid layouts */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Adjust wiki layout */
    .wiki-container {
        padding: 10px;
    }

    .wiki-sidebar {
        position: relative;
        margin-bottom: 1rem;
    }

    /* Adjust table display */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Improve button spacing */
    .space-x-4 {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .space-x-4 a {
        width: 100%;
        margin: 0;
    }

    /* Enhance release section */
    #download-tidal .max-w-4xl {
        margin: 1rem;
    }

    /* Better table handling */
    .release-file {
        display: grid;
        grid-template-columns: 2fr 1fr auto;
        padding: 1rem 0;
    }

    .release-file td {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Improve spacing */
    section {
        padding: 2rem 1rem !important;
    }

    .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Better text readability */
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Fix download section on mobile */
    #download-tidal .p-6 {
        padding: 1rem !important;
    }

    #download-tidal .text-2xl {
        font-size: 1.25rem !important;
    }

    #download-tidal table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Improve footer on mobile */
    footer .grid {
        gap: 2rem !important;
    }

    /* Fix spacing between sections */
    section + section {
        margin-top: 2rem;
    }

    /* Fix button alignment and spacing */
    .space-x-4 {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        margin: 0 1rem;
    }

    .space-x-4 > * {
        margin: 0 !important;
        text-align: center;
    }

    /* Enhance release section display */
    #download-tidal .max-w-4xl {
        margin: 1rem auto;
    }

    #download-tidal .overflow-x-auto {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    #download-tidal table {
        min-width: 100%;
    }

    .release-file td {
        white-space: normal;
        word-break: break-word;
    }

    /* Add spacing between release info and table */
    #download-tidal .space-y-6 > * + * {
        margin-top: 1.5rem;
    }

    /* Fix mobile navigation */
    .mobile-menu-button {
        display: block;
    }

    .mobile-nav-links {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #2563eb;
        padding: 0;
        z-index: 50;
    }

    .mobile-nav-links.active {
        display: block;
    }

    .mobile-nav-links a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }

    /* Fix download table on mobile */
    #download-tidal table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #download-tidal tbody {
        display: block;
        width: 100%;
    }

    #download-tidal .release-file {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
    }

    #download-tidal .release-file td {
        padding: 0.5rem 0;
        border: none;
    }

    #download-tidal .release-file td:last-child {
        text-align: left;
    }

    #download-tidal .release-file td a {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.5rem 0;
    }

    #download-tidal .release-file td a .sr-only {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
        overflow: visible;
        clip: auto;
        white-space: normal;
    }

    /* Mobile Navigation */
    .mobile-menu-button {
        display: block;
        padding: 0.75rem;
        margin: -0.75rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #2563eb;
        padding: 0.5rem 0;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: block;
    }

    .nav-menu a {
        display: block;
        padding: 0.75rem 1.5rem;
        color: white;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    /* Mobile Download Table */
    #download-tidal table thead,
    #download-tidal table th {
        display: none;
    }

    #download-tidal .release-file {
        display: flex;
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid #e2e8f0;
        gap: 0.5rem;
    }

    #download-tidal .release-file td {
        display: flex;
        align-items: center;
        padding: 0;
        border: none;
    }

    #download-tidal .release-file td a {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.75rem;
        background-color: #f3f4f6;
        border-radius: 0.375rem;
    }

    #download-tidal .release-file td a .sr-only {
        position: static;
        width: auto;
        height: auto;
        clip: auto;
        margin: 0;
    }

    #download-tidal .release-file td i {
        margin-right: 0.5rem;
    }
}

/* Additional styles for code blocks */
.markdown-body pre {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 10px;
    overflow-x: auto;
}

.markdown-body code {
    background-color: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 2px 4px;
    font-family: 'Courier New', Courier, monospace;
}

.markdown-body a {
    color: #0366d6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.markdown-body a:hover {
    color: #032f62;
    text-decoration: underline;
}

/* Mobile Navigation */
.mobile-menu-button {
    display: none;
}

/* Add touch-friendly styles */
@media (hover: none) {
    a, button {
        min-height: 44px;
        min-width: 44px;
    }

    .nav-links a {
        padding: 1rem 0;
    }

    .release-file td a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0.5rem;
    }

    .mobile-nav-links a {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
}
