body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212;
    color: #aaa;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#sidebar {
    width: 260px;
    background-color: #1a1a1a;
    border-right: 1px solid #333;
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    text-align: center;
}

.sidebar-logo {
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

.menu-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.menu-group {
    margin-bottom: 5px;
}

.group-header {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bbb;
    transition: background 0.2s;
    user-select: none;
}

.group-header:hover {
    background-color: #252525;
}

.group-title {
    font-size: 0.95rem;
    font-weight: 500;
}

.arrow {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.group-content {
    display: none;
    padding-left: 15px;
}

.file-link {
    display: block;
    padding: 8px 20px;
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.file-link:hover {
    color: #fff;
    background-color: #2a2a2a;
}

.external-links {
    padding: 20px;
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ext-link {
    text-decoration: none;
    color: #bbb;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}

.ext-link:hover {
    color: #fff;
}

.ext-icon {
    width: 20px;
    height: 20px;
}

.footer-sidebar {
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    color: #555;
}

#main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
    background-color: #121212;
    overflow-y: auto; /* Restore vertical scroll */
}

.content-area {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    width: 100%;
}

.page-content {
    flex: 1;
    width: 50%;
    margin: 0 auto;
    padding: 40px 0;
    color: #aaa;
    line-height: 1.6;
    box-sizing: border-box;
}

/* Markdown-specific styles */
.page-content h1 {
    color: #ffcc00 !important;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.page-content h2, .page-content h3 {
    color: #ffcc00 !important;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.page-content p {
    color: #aaa !important;
    margin-bottom: 1rem;
}

.page-content ul, .page-content ol {
    color: #aaa !important;
    margin-bottom: 1rem;
    padding-left: 20px;
}

.page-content li {
    color: #aaa !important;
    margin-bottom: 0.5rem;
}

.page-content a {
    color: #ffcc00 !important;
    text-decoration: none;
    font-weight: bold;
}

.page-content a:hover {
    text-decoration: underline;
}

/* Code blocks and inline code */
.page-content code {
    background-color: #1a1a1a !important;
    color: #fff !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    border: 1px solid #333 !important;
    font-size: 0.9rem;
}

.page-content pre {
    background-color: #1a1a1a !important;
    color: #fff !important;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #333 !important;
    overflow-x: auto !important; /* Allow horizontal scroll for long lines */
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.page-content pre code {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-family: 'Consolas', 'Monaco', monospace;
}

.content-footer {
    padding: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    background-color: #121212;
    border-top: none !important;
    margin-top: auto;
}

.author-kyofa {
    color: #ffb86c !important;
    font-weight: bold;
}

.author-wana {
    color: #8be9fd !important;
    text-decoration: none;
    font-weight: bold;
}

#welcome-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #121212;
    z-index: 10;
    transition: opacity 0.5s ease;
}

.welcome-card {
    text-align: center;
}

.welcome-card h1 {
    font-size: 3rem;
    color: #ffcc00;
    margin-bottom: 10px;
}

.welcome-card p {
    color: #888;
}
