/* Основные стили для блога */
.blog-post {
    background: rgba(8, 2, 22, 0.6);
    border: 1px solid rgba(118, 205, 255, 0.2);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.blog-post:hover {
    border-color: rgba(118, 205, 255, 0.4);
    box-shadow: 0 4px 15px rgba(118, 205, 255, 0.2);
}

.post-title-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.post-title-container h2 {
    color: #76cdff;
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
}

.post-date {
    color: #a0a0a0;
    font-size: 0.9rem;
    margin: 0;
}

.post-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid rgba(118, 205, 255, 0.2);
}

.post-divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(118, 205, 255, 0.3), transparent);
    margin: 30px 0;
}

/* Стили для ToastUI Viewer */
.toastui-viewer {
    background: transparent !important;
    font-family: inherit !important;
}

/* Переопределение стилей контента ToastUI */
.toastui-editor-contents {
    background: transparent !important;
    color: #ffffff !important;
    font-family: inherit !important;
    font-size: 1rem !important;
    line-height: 1.6 !important;
}

/* Заголовки */
.toastui-editor-contents h1,
.toastui-editor-contents h2,
.toastui-editor-contents h3,
.toastui-editor-contents h4,
.toastui-editor-contents h5,
.toastui-editor-contents h6 {
    color: #76cdff !important;
    margin: 1.5em 0 0.5em 0 !important;
    font-weight: 600 !important;
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.toastui-editor-contents h1 {
    font-size: 2rem !important;
}

.toastui-editor-contents h2 {
    font-size: 1.7rem !important;
}

.toastui-editor-contents h3 {
    font-size: 1.4rem !important;
}

/* Параграфы */
.toastui-editor-contents p {
    color: #e0e0e0 !important;
    margin: 15px 0 !important;
    line-height: 1.6 !important;
    font-size: 1rem !important;
}

/* Списки */
.toastui-editor-contents ul,
.toastui-editor-contents ol {
    color: #e0e0e0 !important;
    margin: 15px 0 !important;
    padding-left: 2em !important;
}

.toastui-editor-contents li {
    color: #e0e0e0 !important;
    margin: 8px 0 !important;
    line-height: 1.5 !important;
}

.toastui-editor-contents ul li::before {
    background-color: #76cdff !important;
}

/* Таблицы */
.toastui-editor-contents table {
    background: rgba(8, 2, 22, 0.8) !important;
    border: 1px solid rgba(118, 205, 255, 0.3) !important;
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 20px 0 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.toastui-editor-contents th {
    background: rgba(118, 205, 255, 0.2) !important;
    color: #76cdff !important;
    font-weight: 600 !important;
    border: 1px solid rgba(118, 205, 255, 0.3) !important;
    padding: 12px 15px !important;
}

.toastui-editor-contents td {
    color: #e0e0e0 !important;
    border: 1px solid rgba(118, 205, 255, 0.2) !important;
    padding: 10px 15px !important;
}

.toastui-editor-contents tr:nth-child(even) {
    background: rgba(118, 205, 255, 0.05) !important;
}

/* Цитаты */
.toastui-editor-contents blockquote {
    border-left: 4px solid #76cdff !important;
    background: rgba(118, 205, 255, 0.1) !important;
    color: #aad4ff !important;
    padding: 15px 20px !important;
    margin: 20px 0 !important;
    border-radius: 0 8px 8px 0 !important;
}

/* Код */
.toastui-editor-contents code {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    padding: 2px 6px !important;
    border-radius: 4px !important;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
    font-size: 0.9em !important;
}

.toastui-editor-contents pre {
    background: rgba(8, 2, 22, 0.9) !important;
    border: 1px solid rgba(118, 205, 255, 0.3) !important;
    color: #ffffff !important;
    padding: 20px !important;
    border-radius: 8px !important;
    margin: 20px 0 !important;
    overflow: auto !important;
}

.toastui-editor-contents pre code {
    background: transparent !important;
    color: inherit !important;
    padding: 0 !important;
}

/* Ссылки */
.toastui-editor-contents a {
    color: #4fc3f7 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #4fc3f7 !important;
    transition: all 0.3s ease !important;
}

.toastui-editor-contents a:hover {
    color: #29b6f6 !important;
    border-bottom-color: #29b6f6 !important;
}

/* Горизонтальные линии */
.toastui-editor-contents hr {
    border: none !important;
    height: 2px !important;
    background: linear-gradient(90deg, transparent, rgba(118, 205, 255, 0.5), transparent) !important;
    margin: 30px 0 !important;
}

/* Изображения */
.toastui-editor-contents img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    border: 1px solid rgba(118, 205, 255, 0.2) !important;
    margin: 15px 0 !important;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .blog-post {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .post-title-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .post-title-container h2 {
        font-size: 1.5rem;
    }
    
    .toastui-editor-contents {
        font-size: 0.95rem !important;
    }
    
    .toastui-editor-contents h1 {
        font-size: 1.7rem !important;
    }
    
    .toastui-editor-contents h2 {
        font-size: 1.4rem !important;
    }
    
    .toastui-editor-contents h3 {
        font-size: 1.2rem !important;
    }
}

/* Улучшенная читаемость для длинного текста */
.toastui-editor-contents {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Специфичные переопределения для темной темы */
.toastui-editor-viewer .toastui-editor-contents {
    background: transparent !important;
}

.toastui-editor-viewer .toastui-editor-contents * {
    box-sizing: border-box !important;
}