:root {
    --code-bg: #f6f8fa;
    --code-color: #24292e;
    --code-border: #d0d7de;
}

@media (prefers-color-scheme: dark) {
    :root {
        --code-bg: #f6f8fa;
        --code-color: #24292e;
        --code-border: #d0d7de;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", system-ui, "Ubuntu", "Droid Sans", sans-serif;
    font-size: 14px;
    line-height: 22px;
    color: #333;
    background-color: #f8f9fa;
    height: 100vh;
    overflow: hidden;
    margin: 0;
}

.viewer-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: white;
}

.markdown-content {
    max-width: 100%;
    margin: 0 auto;
}

/* Markdown стили */
.markdown-content h1 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 2.2em;
}

.markdown-content h2 {
    color: #34495e;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 5px;
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8em;
}

.markdown-content h3 {
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.markdown-content h4, .markdown-content h5, .markdown-content h6 {
    color: #34495e;
    margin-top: 20px;
    margin-bottom: 10px;
}

.markdown-content p {
    margin-bottom: 15px;
    font-size: 14px;
    line-height: 22px;
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.markdown-content li {
    margin-bottom: 5px;
}

.markdown-content blockquote {
    border-left: 4px solid #3498db;
    padding-left: 20px;
    margin: 20px 0;
    color: #7f8c8d;
    font-style: italic;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 0 5px 5px 0;
}

.markdown-content code {
    background: var(--code-bg);
    padding: 1px 3px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--code-color);
}

.markdown-content pre {
    background: #f6f8fa;
    color: #24292e;
    padding: 8px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 10px 0;
    position: relative;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: 14px;
}

.markdown-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 20px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.markdown-content th, .markdown-content td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

.markdown-content th {
    background: #f8f9fa;
    font-weight: 600;
}

.markdown-content tr:nth-child(even) {
    background: #f8f9fa;
}

.markdown-content a {
    color: #3498db;
    text-decoration: none;
}

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

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.markdown-content hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #bdc3c7, transparent);
    margin: 30px 0;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content {
        padding: 15px;
    }
}

/* Стили для состояний */
.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.loading.show {
    display: block;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.empty-state h2 {
    margin-bottom: 15px;
    color: #495057;
}

.empty-state p {
    font-size: 14px;
    line-height: 22px;
}
