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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
}

.sidebar {
    width: 280px;
    min-width: 220px;
    max-width: 400px;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    background-color: #2c3e50 !important;
}

.sidebar h3 {
    font-weight: 600;
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.sidebar h5 {
    font-weight: 600;
    opacity: 0.9;
}

.doc-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doc-list .btn-doc {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    word-break: break-word;
}

.doc-list .btn-doc:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(5px);
}

.doc-list .btn-doc.active {
    background: #3498db;
    border-color: #2980b9;
    font-weight: 600;
}

.download-item {
    margin-bottom: 0.6rem;
}

.download-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-radius: 3px;
    font-size: 0.85rem;
    word-break: break-word;
    transition: all 0.2s ease;
}

.download-item a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
}

.download-item i {
    flex-shrink: 0;
}

main {
    background: white;
}

.content-area {
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.content-area h1 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

.content-area h2 {
    margin-top: 1.3rem;
    margin-bottom: 0.8rem;
    color: #34495e;
    border-left: 4px solid #3498db;
    padding-left: 1rem;
}

.content-area h3,
.content-area h4,
.content-area h5,
.content-area h6 {
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    color: #34495e;
}

.content-area p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-area pre {
    background: #f5f5f5;
    border-left: 4px solid #3498db;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.content-area code {
    background: #f5f5f5;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    color: #c0392b;
}

.content-area pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.content-area ul,
.content-area ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-area li {
    margin-bottom: 0.5rem;
}

.content-area blockquote {
    border-left: 4px solid #3498db;
    padding-left: 1rem;
    margin-left: 0;
    margin-right: 0;
    margin-bottom: 1rem;
    color: #7f8c8d;
    font-style: italic;
}

.content-area table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
}

.content-area th {
    background: #f5f5f5;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-right: 1px solid #ddd;
}

.content-area td {
    padding: 0.75rem;
    border-right: 1px solid #ddd;
}

.content-area tr:nth-child(even) {
    background: #f9f9f9;
}

.content-area a {
    color: #3498db;
    text-decoration: none;
    border-bottom: 1px dotted #3498db;
    transition: color 0.2s ease;
}

.content-area a:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

mark {
    background-color: #fff3cd;
    padding: 0.2rem 0.4rem;
    border-radius: 2px;
    font-weight: 500;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #888;
}

.alert {
    border-radius: 5px;
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        max-height: 40vh;
    }

    body > .d-flex {
        flex-direction: column;
    }
}
