:root {
    --ios-background: #f2f2f7;
    --ios-card: #ffffff;
    --ios-primary: #007aff;
    --ios-text: #000000;
    --ios-text-secondary: #8e8e93;
    --ios-border: #c6c6c8;
    --ios-green: #34c759;
    --ios-orange: #ff9500;
    --ios-red: #ff3b30;
    --ios-purple: #af52de;
}

body {
    background-color: var(--ios-background);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ios-text);
    padding-top: 20px;
}

a {
    text-decoration: none;
}

.ios-card {
    background-color: var(--ios-card);
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ios-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ios-navbar {
    background-color: var(--ios-card);
    backdrop-filter: blur(20px);
    border-bottom: 0.5px solid var(--ios-border);
}

.ios-btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 8px 16px;
}

.ios-btn-primary {
    background-color: var(--ios-primary);
    border: none;
    color: white;
}

.ios-btn-outline {
    background-color: transparent;
    border: 1px solid var(--ios-primary);
    color: var(--ios-primary);
}

.hero-section {
    padding: 40px 0;
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--ios-text-secondary);
    margin-bottom: 24px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.feature-card {
    padding: 20px;
    text-align: center;
}

.feature-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-description {
    font-size: 0.875rem;
    color: var(--ios-text-secondary);
}

.publication-card {
    padding: 16px;
    cursor: pointer;
}

.publication-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.publication-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.publication-excerpt {
    font-size: 0.875rem;
    color: var(--ios-text-secondary);
    line-height: 1.4;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--ios-text-secondary);
}

.publication-author {
    display: flex;
    align-items: center;
    gap: 6px;
}

.author-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: var(--ios-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
}

.status-tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-published {
    background-color: rgba(52, 199, 89, 0.1);
    color: var(--ios-green);
}

.tab-bar {
    background-color: var(--ios-card);
    border-top: 0.5px solid var(--ios-border);
    padding: 12px 0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ios-text-secondary);
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--ios-primary);
}

.tab-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 0.7rem;
}

.search-bar {
    background-color: rgba(118, 118, 128, 0.12);
    border-radius: 10px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.search-input {
    background: transparent;
    border: none;
    width: 100%;
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
}

.section-header {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-btn {
    background: none;
    border: none;
    color: var(--ios-primary);
    font-size: 0.875rem;
    font-weight: 500;
}

.category-card {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.category-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.125rem;
}

.category-info {
    flex: 1;
}

.category-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.category-count {
    font-size: 0.75rem;
    color: var(--ios-text-secondary);
}

.stats-card {
    padding: 16px;
    text-align: center;
}

.stats-value {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stats-label {
    font-size: 0.75rem;
    color: var(--ios-text-secondary);
}

.cta-section {
    padding: 40px 0;
    text-align: center;
}

.cta-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.cta-description {
    font-size: 1rem;
    color: var(--ios-text-secondary);
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer {
    padding: 40px 0;
    text-align: center;
    color: var(--ios-text-secondary);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}

.footer-link {
    color: var(--ios-text-secondary);
    text-decoration: none;
}

.footer-link:hover {
    color: var(--ios-primary);
}

.bg-random {
    transition: background-color 0.3s ease;
    color: white;
}

.text-random {
    transition: color 0.3s ease;
    padding: 10px;
    margin: 5px 0;
}

.publication-header {
    padding: 24px 0;
    border-bottom: 0.5px solid var(--ios-border);
    margin-bottom: 24px;
}

.publication-category {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: var(--ios-green);
}

.publication-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.publication-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--ios-text-secondary);
    margin-bottom: 20px;
}

.publication-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--ios-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.publication-stats {
    display: flex;
    gap: 16px;
    font-size: 0.875rem;
    color: var(--ios-text-secondary);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.publication-content {
    font-size: 1.0625rem;
    line-height: 1.7;
}

.publication-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 32px 0 16px;
}

.publication-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 24px 0 12px;
}

.publication-content p {
    margin-bottom: 16px;
}

.publication-content blockquote {
    border-left: 4px solid var(--ios-primary);
    padding-left: 16px;
    margin: 24px 0;
    font-style: italic;
    color: var(--ios-text-secondary);
}

.publication-content ul, .publication-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.publication-content li {
    margin-bottom: 8px;
}

.code-block {
    background-color: var(--ios-background);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-top: 0.5px solid var(--ios-border);
    margin-top: 32px;
}

.action-buttons {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--ios-text-secondary);
    font-size: 0.875rem;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.action-btn.active {
    color: var(--ios-primary);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0;
    color: transparent;
}

.tags-container a,
.tag {
    background-color: rgba(0, 122, 255, 0.1);
    color: var(--ios-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.related-publications {
    margin-top: 40px;
}

.related-card {
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s;
}

.related-card:hover {
    transform: translateY(-2px);
}

.related-category {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    color: var(--ios-orange);
}

.related-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 8px;
}

.tab-bar {
    background-color: var(--ios-card);
    border-top: 0.5px solid var(--ios-border);
    padding: 12px 0;
}

.tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--ios-text-secondary);
    transition: color 0.2s;
}

.tab-item.active {
    color: var(--ios-primary);
}

.tab-icon {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.tab-label {
    font-size: 0.7rem;
}

.share-modal {
    background-color: var(--ios-card);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.share-options {
    display: flex;
    justify-content: space-around;
    margin: 20px 0;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--ios-text);
}

.share-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background-color: var(--ios-background);
}

/* =============================== */
/* Обрезка слайдов под один размер */
/* =============================== */
.crop-box-h200 {
    position: relative;
    overflow:hidden;
    min-height: 200px;
}
.crop-box-h200 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.crop-box-h240 {
    position: relative;
    overflow:hidden;
    min-height: 240px;
}
.crop-box-h240 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.crop-box-h360 {
    position: relative;
    overflow:hidden;
    min-height: 360px;
}
.crop-box-h360 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.fullstory img {
    margin-bottom: 1rem;
    max-width: 100%;
}


/* Дополнительные стили для DLE пагинации */
.btn-ios-primary {
    background-color: var(--ios-primary);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    padding: 12px 16px;
    width: 100%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

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

/* Стили для активной страницы в DLE */
.pagination .active span {
    background-color: var(--ios-primary);
    border-color: var(--ios-primary);
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-block;
}

/* Стили для ссылок страниц в DLE */
.pagination a {
    color: var(--ios-primary);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--ios-border);
    margin: 0 2px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background-color: rgba(0, 122, 255, 0.1);
    border-color: var(--ios-primary);
    transform: translateY(-1px);
}

.pagination span {
    padding: 8px 0 0 0;
    border-radius: 8px;
    border: 0px solid var(--ios-border);
    display: inline-block;
    min-width: 40px;
    text-align: center;
}

/*--- Цитаты, Спойлеры, Код  ---*/

.scriptcode,
.title_quote,
.title_spoiler,
.text_spoiler {
    padding: 2% 4%;
    background: #fff;
    border: 1px solid #dde4ea;
}

.title_quote {
    margin-top: 2px;
    font-weight: bold;
}

.quote,
blockquote {
    padding: 1% 4%;
    margin: 1em 0;
    border-left: 2px solid #e85319;
    font-style: italic;
}

.title_spoiler {
    margin-top: 2px;
}

.text_spoiler {
    margin-bottom: 2px;
}

.title_spoiler img {
    vertical-align: middle;
    margin: -1px 0 0 !important
}

.scriptcode {
    color: #4c6d0f;
    text-align: left;
    font-family: "Courier New"
}

.title_spoiler {
    font-weight: normal;
}

.text_spoiler {
    border-top: 0;
    text-align: justify;
}


.fullstory hr {display: none;}
.full-news table.table {
    display: block;
    overflow-x: auto;
    max-width: 100%;

    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ================================= */
/* Стили для блоков опросов (DLE Poll) */
/* ================================= */

/* Основной контейнер опроса */
#pollbox.gr-box {
    background-color: var(--ios-card);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 0.5px solid var(--ios-border);
}

/* Заголовок опроса */
#pollbox .vtitle {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--ios-text);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 0.5px solid var(--ios-border);
}

/* Контейнер со списком вариантов ответов */
#pollbox .vlist {
    margin-bottom: 24px;
}

/* Стиль для каждого отдельного варианта ответа */
#pollbox .pollanswer {
    margin-bottom: 16px;
}

/* Стилизация label, чтобы сделать область клика удобнее */
#pollbox .pollanswer .form-check-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    line-height: 1.4;
    color: var(--ios-text);
    cursor: pointer;
    padding: 4px 0;
}

/* Кастомный стиль для чекбоксов (iOS-подобный) */
#pollbox .form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--ios-border);
    background-color: var(--ios-card);
    margin: 0;
    position: relative;
    cursor: pointer;
    transition: all 0.1s ease;
    flex-shrink: 0;
}

/* Стиль для выбранного чекбокса */
#pollbox .form-check-input:checked {
    background-color: var(--ios-primary);
    border-color: var(--ios-primary);
}

/* "Галочка" внутри чекбокса */
#pollbox .form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 6L9 17L4 12' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Акцент при касании/фокусе для лучшей доступности */
#pollbox .form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

/* Текст варианта ответа */
#pollbox .pollanswer span {
    flex: 1;
}

/* Нижняя часть опроса с кнопками */
#pollbox .vfoot {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Стили для кнопок опроса (переопределяем существующий .btn или добавляем новый) */
#pollbox .vfoot .btn {
    flex: 1;
    background-color: var(--ios-card);
    border: 0.5px solid var(--ios-primary);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ios-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

/* Стиль для активной кнопки "Голосовать" */
#pollbox .vfoot .btn:first-child {
    background-color: var(--ios-primary);
    color: white;
    border: none;
}

/* Эффект нажатия для кнопок */
#pollbox .vfoot .btn:active {
    transform: scale(0.97);
    opacity: 0.8;
}

/* Эффект при наведении (для десктопов) */
@media (hover: hover) {
    #pollbox .vfoot .btn:hover {
        opacity: 0.9;
    }
    
    .ios-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
}

/* Адаптивность для небольших экранов */
@media (max-width: 480px) {
    #pollbox .vfoot {
        flex-direction: column;
        gap: 8px;
    }
    
    #pollbox .vfoot .btn {
        padding: 12px;
    }
    
    #pollbox .vtitle {
        font-size: 1.125rem;
    }
    
    #pollbox .pollanswer .form-check-label {
        font-size: 0.95rem;
        gap: 10px;
    }
}

/* ================================= */
/* Стили для ленты комментариев DLE (iOS style) */
/* ================================= */

/* Основной контейнер списка комментариев */
#dle-comments-list {
    margin-bottom: 32px;
}

/* Древовидный список комментариев */
.comments-tree-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Отдельный элемент комментария */
.comments-tree-item {
    margin-bottom: 16px;
    list-style: none;
}

/* Карточка комментария */
.comment.vcard {
    background-color: var(--ios-card);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 0.5px solid var(--ios-border);
    transition: all 0.2s ease;
    position: relative;
}

/* Эффект при наведении на комментарий (для десктопов) */
@media (hover: hover) {
    .comment.vcard:hover {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }
}

/* Блок с чекбоксом массового выделения */
.mass-check {
    float: right;
    margin-left: 12px;
    margin-bottom: 12px;
}

/* Стилизация чекбокса массового выделения (iOS-подобный) */
.mass-check .form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--ios-border);
    background-color: var(--ios-card);
    cursor: pointer;
    transition: all 0.1s ease;
    position: relative;
}

/* Выбранный чекбокс */
.mass-check .form-check-input:checked {
    background-color: var(--ios-primary);
    border-color: var(--ios-primary);
}

/* Галочка для чекбокса */
.mass-check .form-check-input:checked::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 10px;
    height: 10px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M20 6L9 17L4 12' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Фокус для чекбокса */
.mass-check .form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.3);
}

/* Содержимое комментария */
.com-cont {
    clear: both;
    margin-bottom: 12px;
}

/* Текст комментария */
#comm-id-79, #comm-id-142, #comm-id-143, #comm-id-171,
#comm-id-541, #comm-id-542, #comm-id-544, #comm-id-545,
#comm-id-653, #comm-id-654 {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ios-text);
    word-wrap: break-word;
}

/* Общий стиль для любых ID комментариев */
[id^="comm-id-"] {
    font-size: 1rem;
    line-height: 1.5;
    color: var(--ios-text);
    word-wrap: break-word;
}

/* Информационная панель комментатора */
.com-inf {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 12px;
    border-top: 0.5px solid var(--ios-border);
    margin-top: 8px;
}

/* Аватар комментатора */
.com-inf .photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    background-color: var(--ios-background);
    order: 1;
}

/* Имя комментатора */
.com-inf .arg.fn {
    font-weight: 600;
    color: var(--ios-primary);
    font-size: 0.9375rem;
    order: 2;
}

/* Ссылка в имени (если авторизован) */
.com-inf .arg.fn a {
    color: var(--ios-primary);
    text-decoration: none;
}

.com-inf .arg.fn a:hover {
    text-decoration: underline;
}

/* Дата комментария */
.com-inf .arg:not(.fn) {
    font-size: 0.8125rem;
    color: var(--ios-text-secondary);
    order: 3;
}

/* Блок быстрых действий (цитировать и т.д.) */
.com-inf .fast {
    order: 4;
    margin-left: auto;
}

/* Стили для кнопок быстрых действий (цитата, ответ) */
.com-inf .fast a {
    color: var(--ios-primary);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: rgba(0, 122, 255, 0.1);
    transition: all 0.2s ease;
    display: inline-block;
}

.com-inf .fast a:hover {
    background-color: rgba(0, 122, 255, 0.2);
}

/* Блок удаления комментария */
.com-inf .del {
    order: 5;
}

.com-inf .del .thd {
    color: var(--ios-red);
    text-decoration: none;
    font-size: 0.875rem;
    padding: 6px 12px;
    border-radius: 8px;
    background-color: rgba(255, 59, 48, 0.1);
    transition: all 0.2s ease;
    display: inline-block;
    cursor: pointer;
}

.com-inf .del .thd:hover {
    background-color: rgba(255, 59, 48, 0.2);
}

/* Стили для цитат внутри комментариев */
.com-cont .title_quote {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--ios-text-secondary);
    padding: 8px 12px;
    background-color: var(--ios-background);
    border-radius: 8px 8px 0 0;
    border: 0.5px solid var(--ios-border);
    border-bottom: none;
    margin-top: 0;
}

.com-cont .quote {
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 12px;
    background-color: var(--ios-background);
    border-radius: 0 0 8px 8px;
    border: 0.5px solid var(--ios-border);
    border-top: none;
    margin: 0 0 12px 0;
    color: var(--ios-text-secondary);
    font-style: italic;
}

/* Блок массовых действий с комментариями */
.mass_comments_action {
    background-color: var(--ios-card);
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
    border: 0.5px solid var(--ios-border);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.mass_comments_action select {
    background-color: var(--ios-background);
    border: 0.5px solid var(--ios-border);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 0.9375rem;
    color: var(--ios-text);
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.mass_comments_action select:focus {
    border-color: var(--ios-primary);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.mass_comments_action .bbcodes {
    background-color: var(--ios-primary);
    border: none;
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mass_comments_action .bbcodes:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .mass_comments_action .bbcodes:hover {
        background-color: #0056cc;
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 480px) {
    .comment.vcard {
        padding: 12px;
    }
    
    .com-inf {
        gap: 6px 10px;
    }
    
    .com-inf .arg.fn {
        font-size: 0.875rem;
    }
    
    .com-inf .arg:not(.fn) {
        font-size: 0.75rem;
    }
    
    .com-inf .fast a,
    .com-inf .del .thd {
        padding: 4px 8px;
        font-size: 0.8125rem;
    }
    
    .mass_comments_action {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mass_comments_action select,
    .mass_comments_action .bbcodes {
        width: 100%;
    }
    
    [id^="comm-id-"] {
        font-size: 0.9375rem;
    }
    
    .com-cont .quote {
        font-size: 0.8125rem;
        padding: 10px;
    }
}

/* Стили для вложенных комментариев (если есть) */
.comments-tree-list .comments-tree-list {
    margin-left: 20px;
    padding-left: 16px;
    border-left: 2px solid var(--ios-border);
}

@media (max-width: 480px) {
    .comments-tree-list .comments-tree-list {
        margin-left: 12px;
        padding-left: 12px;
    }
}

/* Анимация появления новых комментариев */
@keyframes commentFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comments-tree-item {
    animation: commentFadeIn 0.3s ease;
}

/* Стиль для ссылок внутри комментариев */
[id^="comm-id-"] a {
    color: var(--ios-primary);
    text-decoration: none;
}

[id^="comm-id-"] a:hover {
    text-decoration: underline;
}

/* Стиль для кода внутри комментариев */
[id^="comm-id-"] .scriptcode {
    background-color: var(--ios-background);
    border: 0.5px solid var(--ios-border);
    border-radius: 8px;
    padding: 12px;
    font-family: 'Monaco', 'Menlo', monospace;
    font-size: 0.8125rem;
    overflow-x: auto;
    margin: 12px 0;
}

/* Стиль для изображений в комментариях */
[id^="comm-id-"] img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Стиль для эмодзи/смайлов */
.com-cont img[alt] {
    max-width: 20px;
    height: auto;
    vertical-align: middle;
}
/* ================================= */
/* SEO-микроразметка (скрытые элементы для поисковых систем) */
/* ================================= */

/* Структурированные данные (видимы только для поисковых роботов) */
.schema-only {
    display: none;
}

/* Дата в машинно-читаемом формате (скрыта от пользователей, но видна для поисковиков) */
.com-inf .arg[itemprop="datePublished"] {
    display: inline-block;
}

/* Улучшение индексации длинных комментариев */
.comment.vcard[itemprop="comment"] {
    /* Базовая разметка уже есть, этот селектор для ясности */
}