.article-view-container,
.edit-article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* Заголовок статьи */
.article-header {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.article-meta-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.article-number {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Статусы статей */
.article-status {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-status.status-pending,
.status-pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.article-status.status-under_review,
.status-under_review {
    background: #cff4fc;
    color: #055160;
    border: 1px solid #b8daff;
}

.article-status.status-accepted,
.status-accepted {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.article-status.status-rejected,
.status-rejected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.article-status.status-published,
.status-published {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.article-status.status-submitted,
.article-status.status-under_initial_check,
.article-status.status-under_review,
.article-status.status-under_re_review,
.article-status.status-revision_submitted,
.status-submitted,
.status-under_initial_check,
.status-under_review,
.status-under_re_review,
.status-revision_submitted {
    background: #3B82F6;
    color: #ffffff;
    border: 1px solid #3B82F6;
}

.article-status.status-major_revision,
.article-status.status-minor_revision,
.status-major_revision,
.status-minor_revision {
    background: #EAB308;
    color: #1f2937;
    border: 1px solid #EAB308;
}

.article-status.status-accepted,
.article-status.status-in_production,
.article-status.status-published,
.status-accepted,
.status-in_production,
.status-published {
    background: #22C55E;
    color: #ffffff;
    border: 1px solid #22C55E;
}

.article-status.status-rejected,
.article-status.status-withdrawn_by_author,
.article-status.status-withdrawn_no_response,
.status-rejected,
.status-withdrawn_by_author,
.status-withdrawn_no_response {
    background: #EF4444;
    color: #ffffff;
    border: 1px solid #EF4444;
}

.article-title {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    word-break: break-word;
}

.article-authors h3 {
    color: #495057;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.authors-content {
    color: #6c757d;
    line-height: 1.6;
    word-wrap: break-word;
    white-space: pre-wrap;
}

/* Контент статьи */
.article-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.article-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.article-section h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.abstract-content {
    color: #495057;
    line-height: 1.8;
    font-size: 1.05rem;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
    text-align: justify;
}

.keywords-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.keyword-tag {
    background: #e3f2fd;
    color: #1976d2;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    word-break: keep-all;
}

/* Информация о публикации */
.publication-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.page-range {
    color: #495057;
    font-size: 1.1rem;
    line-height: 1.6;
}

.page-range strong {
    color: #2c3e50;
    margin-right: 0.5rem;
}

/* PDF просмотр */
.pdf-viewer {
    width: 100%;
}

.pdf-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pdf-embed {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
}

.pdf-embed iframe {
    border: none;
    display: block;
    width: 100%;
    min-height: 600px;
}

/* Мета информация */
.article-meta {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
}

.meta-section h4 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.meta-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meta-section li {
    padding: 0.5rem 0;
    color: #495057;
    border-bottom: 1px solid #e9ecef;
    word-wrap: break-word;
    line-height: 1.5;
}

.meta-section li:last-child {
    border-bottom: none;
}

/* DOI стили */
.doi-value {
    font-family: 'Courier New', monospace;
    background: #e9ecef;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    color: #495057;
    font-weight: 600;
    word-break: break-all;
}

/* Действия */
.article-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    font-weight: 500;
    line-height: 1;
}

.btn-primary {
    background-color: #007bff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
}

.btn-outline:hover {
    background-color: #e9ecef;
    color: #495057;
    border-color: #adb5bd;
    transform: translateY(-1px);
}

/* Формы редактирования */
.edit-form-section {
    background: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.current-file {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 1rem;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.file-icon {
    font-size: 1.5rem;
}

.file-name {
    flex: 1;
    color: #495057;
    font-weight: 500;
    min-width: 150px;
}

.view-file {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

.view-file:hover {
    text-decoration: underline;
}

/* Адаптивность */
@media (max-width: 1024px) {
    .article-view-container,
    .edit-article-container {
        padding: 1.5rem 0;
    }
    
    .article-title {
        font-size: 1.75rem;
    }
    
    .pdf-embed iframe {
        min-height: 500px;
    }
}

@media (max-width: 768px) {
    .article-view-container,
    .edit-article-container {
        padding: 1rem 0;
    }
    
    .article-header,
    .article-section,
    .edit-form-section {
        margin: 0 1rem 1.5rem 1rem;
        padding: 1.5rem;
    }
    
    .article-title {
        font-size: 1.5rem;
        line-height: 1.4;
    }
    
    .article-meta-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .publication-info {
        padding: 1rem;
    }
    
    .pdf-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .pdf-controls .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .pdf-embed iframe {
        min-height: 400px;
    }
    
    .article-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .article-actions .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .keywords-content {
        gap: 0.3rem;
    }
    
    .keyword-tag {
        font-size: 0.8rem;
        padding: 0.25rem 0.6rem;
    }
    
    .file-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .file-name {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .article-header,
    .article-section,
    .edit-form-section {
        padding: 1rem;
        margin: 0 0.5rem 1rem 0.5rem;
    }
    
    .article-title {
        font-size: 1.3rem;
    }
    
    .abstract-content {
        font-size: 1rem;
    }
    
    .publication-info {
        padding: 0.75rem;
    }
    
    .page-range {
        font-size: 1rem;
    }
    
    .pdf-embed iframe {
        min-height: 300px;
    }
    
    .article-meta {
        margin: 1.5rem 0.5rem 0 0.5rem;
        padding: 1rem;
    }
    
    .doi-value {
        display: block;
        margin-top: 0.25rem;
        word-break: break-all;
    }
}

.pdf-viewer {
    border: 1px solid #e3e6f0;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fc;
}

.pdf-controls {
    padding: 1rem;
    background: #ffffff;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pdf-embed {
    position: relative;
    background: #ffffff;
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: #f8f9fc;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e3e6f0;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pdf-mobile-only {
    display: none;
    padding: 2rem;
}

.mobile-pdf-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: center;
    justify-content: center;
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 2px dashed #007bff;
}

.pdf-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.pdf-details p {
    margin: 0.5rem 0;
    color: #495057;
}

.pdf-fallback {
    padding: 2rem;
    text-align: center;
    background: #f8f9fc;
}

.fallback-content {
    max-width: 400px;
    margin: 0 auto;
}

.fallback-buttons {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Мобильные устройства */
@media (max-width: 768px) {
    .pdf-desktop-only {
        display: none !important;
    }
    
    .pdf-mobile-only {
        display: block;
    }
    
    .pdf-controls {
        justify-content: center;
    }
    
    .mobile-pdf-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Планшеты и маленькие экраны */
@media (max-width: 1024px) and (min-width: 769px) {
    .pdf-embed iframe {
        height: 500px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
    .pdf-controls {
        flex-direction: column;
    }
    
    .pdf-controls .btn {
        width: 100%;
        text-align: center;
    }
    
    .mobile-pdf-info {
        padding: 1rem;
        margin: 0.5rem;
    }
}

/* Стили для комментариев редакции */
.editorial-comments-section {
    border-left: 4px solid #dc3545 !important;
    background: #fff8f8 !important;
    border: 1px solid #f5c6cb;
}

.editorial-comments-section h3 {
    color: #721c24;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.editorial-icon {
    font-size: 1.2rem;
}

.editorial-badge {
    background: #dc3545;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.editorial-comments-content {
    background: #ffffff;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 1.5rem;
    color: #495057;
    line-height: 1.7;
    font-size: 1rem;
    word-wrap: break-word;
    margin-top: 1rem;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* Адаптивность для комментариев редакции */
@media (max-width: 768px) {
    .editorial-comments-section h3 {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .editorial-badge {
        align-self: flex-start;
    }
    
    .editorial-comments-content {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .editorial-comments-content {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .editorial-badge {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

.char-counter {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 0.25rem;
    text-align: right;
}

.char-counter.warning {
    color: #856404;
}

.char-counter.error {
    color: #dc3545;
}

.char-counter.success {
    color: #155724;
}

.status-indicator {
    margin-left: 0.5rem;
    font-weight: bold;
}

.status-indicator.valid {
    color: #28a745;
}

.status-indicator.invalid {
    color: #dc3545;
}

.status-indicator.warning {
    color: #ffc107;
}

.terms-link {
    color: #007bff;
    text-decoration: none;
    margin-left: 0.5rem;
}

.terms-link:hover {
    text-decoration: underline;
}

.required {
    color: #dc3545;
}
