body {
    font-family: Arial, sans-serif;
    background-color: #F0E0D6;
    color: #800000;
    margin: 0;
    padding: 0;
    padding-top: 25px;
    line-height: 1.4;
    max-width: 800px;
    margin: 0 auto;
}

header {
    margin-top: 30px;
    background-color: #F0E0D6;
    padding: 10px 15px;
    margin-bottom: 0;
}

header h2 {
    margin: 5px 0;
    color: #117743;
    font-size: 1.2em;
}

/* Ссылки в хедере */
header a {
    color: #800000;
    text-decoration: none;
    font-weight: bold;
}

header a:hover {
    text-decoration: underline;
}

 /* Дополнительные стили для мобильной адаптации */
        .header-gallery img {
            max-width: 100%;
            height: auto;
            display: block;
            margin: 3px auto;
        }
        
        .header-gallery {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 5px;
            overflow: hidden;
        }
        
        /* Для очень маленьких экранов */
        @media (max-width: 480px) {
            .header-gallery img {
                max-height: 150px;
                max-width: calc(50% - 10px);
            }
        }
        
        /* Для средних экранов */
        @media (min-width: 481px) and (max-width: 768px) {
            .header-gallery img {
                max-height: 180px;
                max-width: calc(33.333% - 10px);
            }
        }
        
/* Ссылки в заголовках постов */
.post-header a {
    color: inherit;
}

/* Посты */
.post {
    background-color: white;
    border: 1px solid #D9BFB7;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 15px;
    position: relative;
    transition: background-color 0.5s ease;
}


.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9em;
    border-bottom: none;
    padding-bottom: 5px;
}

.post-text {
    margin: 10px 0;
    word-wrap: break-word;
}

.post-text-short {
            max-height: 300px;
            overflow: hidden;
            position: relative;
        }
      
        
.toggle-btn {
    background: none;
    border: none;
    color: #800000;
    cursor: pointer;
    padding: 2px 5px;
    font-size: 0.8em;
    margin-top: 5px;
}

.toggle-btn:hover {
    text-decoration: underline;
}

/* Медиа файлы */
.media-files {
    margin-top: 10px;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 5px;
}

/* Улучшенные стили для плеера Plyr */
.dark-theme .plyr {
    --plyr-color-main: #ff9800;
    --plyr-video-background: #1a1a1a;
    --plyr-control-icon-size: 16px;
    --plyr-control-spacing: 8px;
}

.plyr {
    max-height: 300px;
    max-width: 300px;
    min-width: 100px !important;
    min-height: 100px !important;
    margin: 5px 0;
}

/* Увеличиваем дорожку прогресса */
.plyr__progress {
    flex: 2 !important;
    min-width: 100px !important;
}

.plyr__progress__container {
    flex: 1 !important;
}

/* Уменьшаем контролы громкости, но оставляем их функциональными */
.plyr__control--volume {
    min-width: auto !important;
}

/* Улучшаем отображение контролов */
.plyr__controls {
    gap: 4px !important;
    padding: 8px !important;
}

.plyr__controls button {
    padding: 6px !important;
}

.plyr__volume {
    max-width: 80px !important;
    min-width: 60px !important;
}

/* Делаем ползунок прогресса более заметным */
.plyr__progress__buffer,
.plyr__progress--played,
.plyr__progress--seeking {
    height: 5px !important;
}

/* Увеличиваем зону клика для дорожки прогресса */
.plyr__progress__container {
    padding: 8px 0 !important;
    margin: -8px 0 !important;
}

@media (max-width: 768px) {
    .plyr {
        max-height: 300px;
    }
    
    /* На мобильных устройствах скрываем текстовые метки времени */
    .plyr__time {
        display: none;
    }
    
    .plyr__time--current,
    .plyr__time--duration {
        display: inline-block;
        font-size: 11px;
    }
    
    /* Уменьшаем контролы на мобильных */
    .plyr__controls button {
        padding: 4px !important;
    }
    
    .plyr__volume {
        max-width: 60px !important;
        min-width: 40px !important;
    }
}

    /* Убираем огромное белое пространство для аудиоплееров */
.plyr--audio .plyr__controls {
    padding: 8px !important;
}

.plyr--audio {
    min-height: auto !important;
    height: auto !important;
    max-height: none !important;
    background: transparent !important;
}

/* Уменьшаем размер аудиоплеера */
.media-files audio,
.media-files .plyr--audio {
    width: 100% !important;
    max-width: 400px !important;
    min-width: 250px !important;
    margin: 5px 0;
}

/* Компактный режим для аудио */
.plyr--audio .plyr__controls {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 5px !important;
}

/* Убираем лишние отступы у аудиоплеера */
.plyr__control--overlaid {
    display: none !important;
}

/* Делаем аудиоплеер компактнее */
.plyr--audio {
    border-radius: 8px !important;
    overflow: hidden !important;
}


/* Стиль для постов, ожидающих премодерации */
        .post.premod-post {
            opacity: 0.85;
            border-left: 4px solid #ff9800;
            background-color: rgba(255, 152, 0, 0.05);
        }

        /* Темная тема */
        .dark-theme .post.premod-post {
            background-color: rgba(255, 152, 0, 0.1);
            border-left-color: #ff9800;
        }
        
        
/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0,0,0,0.9);
    text-align: center;
}

.modal-content {
    max-width: 90%;
    max-height: 80%;
}

.modal .prev, .modal .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    padding: 16px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    user-select: none;
    transform: translateY(-50%);
}

.modal .prev { left: 20px; }
.modal .next { right: 20px; }

.modal .prev:hover, .modal .next:hover {
    color: #bbb;
}

/* Форма сообщения */
.message-form {
    background-color: #f0f0f0;
    border: 1px solid #D9BFB7;
    border-radius: 5px;
    padding: 15px;
    margin-top: 0;
    margin-bottom: 15px;
    position: relative;
}

.message-form textarea {
    width: 100%;
    min-height: 100px;
    background-color: white;
    padding: 8px;
    border: 1px solid #D9BFB7;
    border-radius: 3px;
    box-sizing: border-box;
    resize: vertical;
}

/* Контейнер кнопок формы */
.form-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
    position: relative;
}

/* Контейнер для input file */
.file-input-container {
    position: relative;
    display: inline-block;
    flex: 1;
    min-width: 0;
    height: 35px;
}

.file-input-container input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}


/* Кастомная кнопка файла */
.custom-file-button {
    background-color: #EA8;
    color: #800000;
    border: 1px solid #800000;
    padding: 8px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    display: inline-block;
    font-size: 0.9em;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    z-index: 1;
}

/* Кнопка отправки */
.form-buttons button[type="submit"] {
    background-color: #EA8;
    color: #800000;
    border: 1px solid #800000;
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    flex-shrink: 0;
    min-width: 120px;
    white-space: nowrap;
}

.form-buttons button:hover,
.custom-file-button:hover {
    background-color: #F5C396;
}

/* Тулбар форматирования */
.toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.toolbar button {
    background-color: #EA8;
    color: #800000;
    border: 1px solid #800000;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9em;
    flex: 1;
    min-width: auto;
}

.toolbar button:hover {
    background-color: #F5C396;
}

/* Ссылки на посты */
.post-link {
    color: #117743;
    text-decoration: none;
}

/* Стили для всех ссылок внутри постов */
.post-text a,
.post-content a {
    color: #117743;
    text-decoration: none;
    font-weight: normal;
}

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

/* Для темной темы */
.dark-theme .post-text a,
.dark-theme .post-content a {
    color: #a0b3c5;
}

/* Для серой темы */
.gray-theme .post-text a,
.gray-theme .post-content a {
    color: #ff6600;
}

.body a {
    color: #117743;
}

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

/* Превью постов */
.post-preview {
    opacity: 1 !important;
    background-color: #eeeeee;
    border: 1px solid #D9BFB7;
    padding: 10px;
    position: absolute;
    z-index: 100;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}


.date {
   
    color: grey;
}

.number {
    font-weight: bold;
    color: grey;
}

/* Цитаты */
.quote {
    color: #789922;
}

/* Ответы */
.post-replies {
    margin-top: 5px;
    font-size: 0.85em;
    color: gray;
    margin-bottom: 3px;
}

/* Кнопки ответа */
.reply-btn,
.reply-text {
    background: none;
    border: none;
    color: #800000;
    cursor: pointer;
    font-size: 0.85em;
    padding: 0;
    margin: 0;
    text-decoration: none;
    font-family: inherit;
}

.reply-btn:hover,
.reply-text:hover {
    color: #aa0000;
    text-decoration: underline;
}

/* Заголовок */
.header-text.collapsed {
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.header-text.collapsed::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
}

/* Сообщения об ошибках */
.timer-message {
    color: #FF0000;
    background-color: #F5F5F5;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #FF0000;
    border-radius: 3px;
}

/* Спойлеры */
.spoiler.hidden {
    background-color: grey;
    color: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
    padding: 0 2px;
}

.spoiler.hidden:hover {
    background-color: #f0f0f0;
    color: inherit;
    text-shadow: none;
}

.spoiler.visible {
    background-color: transparent;
    color: inherit;
    cursor: default;
    padding: 0;
}

/* Список файлов */
#file-list {
    margin-top: 8px;
    font-size: 0.85em;
    color: #666;
}

/* Капча */
.captcha-container {
    background-color: #f0f0f0;
    padding: 15px;
    
    margin: 10px 0;
    
}

.captcha-container label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.captcha-container strong {
    color: #800000;
}

.captcha-container input[type="text"] {
    width: 100%;
    max-width: 200px;
    padding: 8px 12px;
    border: 1px solid #D9BFB7;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: white;
    color: #000;
}

/* Специальные стили постов */
.post.my-post {
    border-left: 3px solid #0077cc;
}

.post.my-replied-post {
    border-left: 3px #0077cc;
}

.post.reply-to-my-post {
    border-left: 3px orange;
}

/* Плавность для всех скроллов на странице */
html {
  scroll-behavior: smooth;
}

/* Мягкая подсветка поста при переходе */
.highlighted {
  animation: highlightFade 1s ease-out;
}

@keyframes highlightFade {
  0% {
    background-color: rgba(120, 170, 255, 0.3); /* нежно-синяя подсветка */
  }
 
}
/* URL ссылки */
.url-link {
    color: #117743;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s ease;
}

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

/* Эмодзи */
.modern-emoji {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.3em;
    vertical-align: middle;
    display: inline-block;
    margin: 0 2px;
    transition: transform 0.2s ease;
}

.modern-emoji:hover {
    transform: scale(1.2);
}

/* Панель темы */
#theme-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 10px);
    margin-left: 5px;
    height: 25px;
    background-color: #F0E0D6;
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 20px;
    padding: 0 5px;
    font-size: 12px;
    box-sizing: border-box;
    z-index: 1000;
    border-radius: 0 0 5px 5px;
}

#theme-bar .bar-btn {
    background: none;
    padding: 2px 6px;
    font-size: 12px;
    cursor: pointer;
    color: #333;
    border: none;
}

#theme-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
    color: #333;
}

/* Модальное окно формы */
.post-form-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
}

.post-form-content {
    background: #fff;
    margin: auto;
    position: relative;
    top: 50%;
    transform: translateY(-50%);
    max-width: 600px;
    width: 90%;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.close-post-form {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: gray;
    cursor: pointer;
}

.close-post-form:hover {
    color: red; 
}

#form-messages {
    margin-bottom: 10px;
}

.message {
    padding: 10px;
    margin: 5px 0;
    border-radius: 4px;
    font-weight: bold;
}

.message.error {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ef5350;
}

.message.success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.message.warning {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ff9800;
}

/* Убираем стандартные стили input file */
input[type="file"]::file-selector-button {
    display: none;
}

/* ================= ТЕМНАЯ ТЕМА ================= */
body.dark-theme {
    background-color: #333333;
    color: #d4d4d4;
}

body.dark-theme header {
    background-color: #2a2a2a;
}

body.dark-theme .number {
    color: grey;
}

body.dark-theme .date {
    color: grey;
}

body.dark-theme header a {
    color: #a0b3c5;
}

body.dark-theme header a:hover {
    color: #8fa0c8;
}

body.dark-theme .post-header a {
    color: white;
}

body.dark-theme .post-header a:hover {
    color: #ffffaa;
}

body.dark-theme .post.my-post {
    border-left: 3px solid white;
}

body.dark-theme .post.my-replied-post {
    border-left: 3px #0077cc;
}

body.dark-theme .post.reply-to-my-post {
    border-left: 3px orange;
}

body.dark-theme .post {
    background-color: #292929;
    border-color: #444;
}

body.dark-theme .post-replies {
    color:#a0b3c5;
}

body.dark-theme .post-link {
    color: #78858B !important;
}

body.dark-theme .post-link:hover {
    color: #a0b3c5 !important;
    text-decoration: underline;
}

body.dark-theme .message-form {
    background-color: #2b2b2b;
    border-color: #444;
}

body.dark-theme .message-form textarea {
    background-color: #1e1e1e;
    color: #d0d0d9;
    border-color: #1e1e1e;
}

body.dark-theme .message-form textarea::placeholder {
    color: #8a8a9a;
}

body.dark-theme .message-form textarea:focus {
    outline: none;
    border-color: #3f3f50;
    box-shadow: none;
}

body.dark-theme .toolbar button,
body.dark-theme .form-buttons button[type="submit"] {
    background-color: #555;
    color: #eee;
    border-color: #888;
}

body.dark-theme .custom-file-button {
    background-color: #555;
    color: #eee;
    border-color: #888;
}

body.dark-theme .reply-btn,
body.dark-theme .reply-text {
    color: #78858B !important;
}

body.dark-theme .post-toggle {
    color: #78858B;
   
}

body.dark-theme .reply-btn:hover,
body.dark-theme .reply-text:hover {
    color: #8fa0c8 !important;
    text-decoration: underline;
}

body.dark-theme .post-toggle:hover {
     color: #8fa0c8 !important;
    text-decoration: underline;
}


body.dark-theme .toggle-btn {
    color: #aaffaa;
}

body.dark-theme .spoiler.hidden {
    background-color: #555;
}

body.dark-theme #theme-bar {
    background-color: #2a2a2a;
}

body.dark-theme #theme-bar button {
    color: #eee;
}

body.dark-theme .post-preview {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    background-color: #2b2b2b;
    border-color: #444;
}

body.dark-theme .media-files img,
body.dark-theme .media-files video {
    background-color: #2b2b2b;
    border-color: #444;
}

body.dark-theme .url-link {
    color: #a0b3c5;
}

body.dark-theme .a {
    color: #a0b3c5;
}


body.dark-theme .url-link:hover {
    color: #a0b3c5;
    text-decoration: underline;
}

body.dark-theme .captcha-container {
    background-color: #2b2b2b; /* Такой же цвет как у формы */
   
    padding: 15px;
    margin: 10px 0;
}

body.dark-theme .captcha-container strong {
    color: #eeeeee;
}

body.dark-theme .captcha-container input[type="text"] {
    background-color: #2b2b2b;
    color: #eeeeee;
    border-color: #555;
}

body.dark-theme .captcha-container input[type="text"]::placeholder {
    color: #2b2b2b;
}
/* Добавьте эти стили для поля ввода имени в темной теме */
body.dark-theme .name-input-container input {
    background-color: #2b2b2b;
    color: #eeeeee;
    border-color: #555;
}

body.dark-theme .name-input-container input::placeholder {
    color: #8a8a9a;
}

body.dark-theme .name-input-container input:focus {
    border-color: #3f3f50;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.3);
}
/* ================= АДАПТИВНОСТЬ ================= */
@media (max-width: 600px) {
    body {
        padding: 5px;
    }

    .post, .message-form {
        padding: 10px;
    }

    .media-files img {
        max-width: 150px;
        max-height: 150px;
    }

    .post-header {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 5px;
        font-size: 0.8em;
    }

    .post-preview {
        max-width: 300px;
    }
    
    /* Важные исправления для мобильной версии */
    .form-buttons {
        flex-direction: column !important;
        align-items: stretch;
        gap: 10px;
    }
    
    .file-input-container {
        max-width: 100% !important;
        width: 100%;
        height: auto;
    }
    
    .custom-file-button {
        width: 100%;
        text-align: center;
        padding: 12px;
        font-size: 1em;
    }
    
    .form-buttons button[type="submit"] {
        width: 100%;
        padding: 12px;
        font-size: 1em;
        min-width: auto;
    }
    
    .captcha-container {
        margin: 10px 0;
    }
    
    .captcha-container input[type="text"] {
        width: 100% !important;
        max-width: none;
        box-sizing: border-box;
    }
    
    .toolbar {
        flex-wrap: wrap;
        gap: 3px;
    }
    
    .toolbar button {
        padding: 8px;
        font-size: 0.8em;
        flex: 1;
        min-width: auto;
    }
    
    #theme-bar {
        gap: 10px;
        padding: 0 10px;
    }
    
    #theme-bar .bar-btn {
        padding: 2px 4px;
        font-size: 11px;
    }
}

.name-input-container input {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.name-input-container input:focus {
    border-color: #66afe9;
    outline: none;
    box-shadow: 0 0 5px rgba(102, 175, 233, 0.6);
}

    /* Стили для скрытия/раскрытия постов */
        .post-toggle {
            background: none;
            border: none;
            color: #666;
            cursor: pointer;
            font-size: 12px;
            padding: 0;
            text-decoration: underline;
        }

        .post-toggle:hover {
            color: #333;
        }

        .post.hidden .post-content {
            display: none;
        }

        .post.hidden .post-toggle .hide-text {
            display: none;
        }

        .post:not(.hidden) .post-toggle .show-text {
            display: none;
        }

        .post-header {
            display: flex;
            align-items: center;
            gap: 10px;
            flex-wrap: wrap;
        }

        .post-actions {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-left: auto;
        }

        .reply-text, .post-toggle {
            color: #666;
            cursor: pointer;
            font-size: 12px;
            text-decoration: underline;
        }

        .reply-text:hover, .post-toggle:hover {
            color: #333;
        }
        
                /* Стили для кнопки автозагрузки */
#toggleAutoload {
    background-color: #4CAF50;
    color: white;
}

#toggleAutoload.disabled {
    background-color: pink;
}

#toggleAutoload::after {
    content: " Вкл";
}

#toggleAutoload.disabled::after {
    content: " Выкл";
}

/* Стили для цензуры */
.post.censored .media-files img,
.post.censored .media-files video {
    filter: blur(20px) grayscale(100%);
    transition: filter 0.3s ease;
}

.post.censored .media-files img:hover,
.post.censored .media-files video:hover {
    filter: blur(5px) grayscale(50%);
}

.censored-badge {
    background: #ff4444;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    margin-left: 10px;
}

.admin-controls {
    margin-left: 10px;
}

.admin-controls a {
    margin: 0 3px;
    text-decoration: none;
    font-size: 0.9em;
}


.floating-post-button {
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        color: #800000;
        font-size: 24px;
        cursor: pointer;
        z-index: 1000;
        box-shadow: 0 4px 8px rgba(0,0,0,0.3);
        transition: all 0.3s ease;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .floating-post-button:hover {
        background-color: #F5C396;
        transform: scale(1.1);
    }

    body.dark-theme .floating-post-button {
        background-color: #555;
        color: #eeeeee;
        border-color: #888;
    }

    body.dark-theme .floating-post-button:hover {
        background-color: #666;
    }

    @media (max-width: 600px) {
        .floating-post-button {
            width: 50px;
            height: 50px;
            bottom: 15px;
            right: 15px;
            font-size: 20px;
        }
    }

    .post-form-modal {
        display: none;
        position: fixed;
        z-index: 1001;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
    }

    .post-form-content {
        background: #fff;
        margin: auto;
        position: relative;
        top: 50%;
        transform: translateY(-50%);
        max-width: 600px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        padding: 20px;
        border-radius: 12px;
        box-shadow: 0 0 20px rgba(0,0,0,0.5);
        border: 1px solid #D9BFB7;
    }

    .close-post-form {
        position: absolute;
        right: 15px;
        top: 10px;
        font-size: 28px;
        font-weight: bold;
        color: #800000;
        cursor: pointer;
    }

    .close-post-form:hover {
        color: #c62828;
    }

    #form-messages {
        margin-bottom: 15px;
    }

    .message {
        padding: 12px;
        margin: 8px 0;
        border-radius: 6px;
        font-weight: bold;
        font-size: 0.9em;
    }

    .message.error {
        background-color: #ffebee;
        color: #c62828;
        border: 1px solid #ef5350;
    }

    .message.success {
        background-color: #e8f5e9;
        color: #2e7d32;
        border: 1px solid #4caf50;
    }

    .message.warning {
        background-color: #fff3e0;
        color: #ef6c00;
        border: 1px solid #ff9800;
    }

    body.dark-theme .post-form-content {
        background: #2b2b2b;
        color: #eeeeee;
        border-color: #444;
    }

    body.dark-theme .close-post-form {
        color: #eeeeee;
    }

    body.dark-theme .close-post-form:hover {
        color: #ff4444;
    }

    body.dark-theme .message.error {
        background-color: #332;
        color: #ff6b6b;
        border-color: #ff4444;
    }

    body.dark-theme .message.success {
        background-color: #232;
        color: #6bff6b;
        border-color: #44ff44;
    }

    body.dark-theme .message.warning {
        background-color: #332;
        color: #ffa726;
        border-color: #ff9800;
    }

    @media (max-width: 600px) {
        .post-form-content {
            width: 95%;
            padding: 15px;
            max-height: 95vh;
        }
        
        .close-post-form {
            right: 10px;
            top: 8px;
            font-size: 24px;
        }
    }
    
    /* Стили для чекбокса автообновления */
#autoRefreshToggle {
    margin-right: 8px;
    cursor: pointer;
}

/* Стили для состояния отключенного автообновления */
.auto-refresh-disabled {
    color: #888 !important;
}

/* ===== БАЗА ТЕМЫ ===== */
.gray-theme {
    background: #eeeeee;        /* общий фон страницы */
    color: #000;
}
.gray-theme #theme-bar {
    background: #d0d0d0;
}

/* ===== ШАПКА (header) ===== */
.gray-theme header {
    background: #d8d8d8;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    border: 1px solid #c0c0c0;
}

.gray-theme header a {
    color: #ff6600; /* Розово-красный */
}

.gray-theme header a:hover {
    color: #a01830;
}

.gray-theme .number {
    color: gray;
}

.gray-theme .date {
    color: gray;
}

/* ===== ФОРМА ===== */
.gray-theme .message-form {
    background: #dcdcdc;
  
    padding: 15px;
   
    margin: 15px 0;
}

.gray-theme input[type="text"],
.gray-theme textarea {
    background: #f0f0f0;
    border: 1px solid #b8b8b8;
    color: #000;
    padding: 8px;
    border-radius: 3px;
    width: 100%;
    box-sizing: border-box;
}

.gray-theme input[type="text"]:focus,
.gray-theme textarea:focus {
    background: #ffffff;
    border-color: #ff6600; /* Розовый акцент */
    outline: none;
    box-shadow: 0 0 4px rgba(196, 30, 58, 0.3);
}

/* ===== КНОПКА "ВЫБРАТЬ ФАЙЛЫ" ===== */
.gray-theme .file-input-container {
    position: relative;
    display: inline-block;
}

.gray-theme .custom-file-button {
    background: #d0d0d0;
    border: 1px solid #b0b0b0;
    color: #333;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    transition: all 0.2s;
}

.gray-theme .custom-file-button:hover {
    background: #c0c0c0;
    border-color: #a0a0a0;
}

/* ===== КОНТЕЙНЕР КАПЧИ ===== */
.gray-theme .captcha-container {
   background:#dcdcdc;
    padding: 12px;
   
    margin: 10px 0;
}

.gray-theme #captchaImage {
    border: 2px solid #b0b0b0 !important;
  
}

.gray-theme #captchaImage + button:hover {
    background: #c0c0c0;
}

/* ===== КНОПКА ОТПРАВКИ ===== */
.gray-theme button[type="submit"] {
    background: #d0d0d0;
    color: black;
    padding: 10px 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #bdbdbd; /* Устанавливаем серую рамку по умолчанию */
    outline: none; /* Убираем обводку браузера */
}

.gray-theme button[type="submit"]:hover {
    background: #e0e0e0;
    border-color: #ff6600;
}

/* ===== ПАНЕЛЬ ИНСТРУМЕНТОВ (toolbar) ===== */

.gray-theme .toolbar button {
    background: #e0e0e0;
    color: #333;
    padding: 5px 10px;
    margin-right: 4px;
  
}

.gray-theme .toolbar button:hover {
    background: #d0d0d0;
    border-color: #a0a0a0;
}
/* ===== ПОСТ (серый прямоугольник) ===== */
.gray-theme .post {
    background: #dddddd;        /* цвет блока поста */
    border: 1px solid #cfcfcf;
    padding: 10px;
    margin: 6px 0;
}
.gray-theme .post-preview {
    opacity: 1 !important;
 background: #dcdcdc;        /* цвет блока поста */
    border: 1px solid #cfcfcf;
    padding: 10px;
    position: absolute;
    z-index: 100;
    max-width: 400px;
    box-shadow: 0 0 10px rgba(0,0,0,0.2);
}

/* ===== БЛОК ФОРМЫ ===== */
.gray-theme .post-form,
.gray-theme form {
    background: #dcdcdc;
    border: 1px solid #cfcfcf;
    padding: 10px;
    margin: 10px 0;
}

/* ===== ПОДПИСИ ПОЛЕЙ ===== */
.gray-theme label {
    color: #444;
    font-size: 0.9em;
}

/* ===== ПОЛЯ ВВОДА ===== */
.gray-theme input[type="text"],
.gray-theme textarea {
    background: #f0f0f0;
    border: 1px solid #cfcfcf;
    color: #000;
    padding: 6px;
}

/* при фокусе — чуть темнее, но всё ещё серо */
.gray-theme input:focus,
.gray-theme textarea:focus {
    outline: none;
    border-color: #bdbdbd;
    background: #eaeaea;
}

/* ===== КНОПКА ОТПРАВКИ ===== */
.gray-theme button,
.gray-theme input[type="submit"] {
    background: #dcdcdc;
    border: 1px solid #bdbdbd;
    color: #000;
    padding: 6px 10px;
    cursor: pointer;
}

.gray-theme button:hover,
.gray-theme input[type="submit"]:hover {
    background: #cfcfcf;
}

/* ===== ШАПКА ПОСТА (дата/номер) ===== */
.gray-theme .post-header,
.gray-theme .post-meta {
    color: #555;
    font-size: 0.9em;
}

/* ===== ЦИТАТЫ (>>номер) — ОРАНЖЕВЫЕ ===== */
.gray-theme .post-link {
    color: #ff6600;
}

/* если у вас цитаты оформлены иначе — можно так: */

.gray-theme .reply-to {
    color: #ff6600;
}

/* ===== ЗЕЛЁНЫЙ ТЕКСТ (как на скрине) ===== */
.gray-theme .quote {
    color: #789922;
}

/* ===== ССЫЛКИ ===== */
.gray-theme a {
    color: #ff6600;
}

.gray-theme a:hover {
    text-decoration: underline;
}

/* ===== КНОПКИ (в стиле скрина) ===== */
.gray-theme .bar-btn {
    background: #dcdcdc;
    border: 1px solid #bdbdbd;
    color: #000;
}

.gray-theme .bar-btn:hover {
    background: #cfcfcf;
}

/* ===== ФОРМЫ (если есть) ===== */
.gray-theme input,
.gray-theme textarea {
    background: #f0f0f0;
    border: 1px solid #cfcfcf;
}

/* Выпадающее меню темы */
.theme-select-wrapper {
    position: relative;
    display: inline-block;
}

#themeBtn {
    cursor: pointer;
}

#themeMenu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    min-width: 120px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 9999;
}

.theme-option {
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 3px;
    transition: background 0.2s ease;
    white-space: nowrap;
}

.theme-option:hover {
    background: #f0f0f0;
}

/* Темная тема для выпадающего меню */
body.dark-theme #themeMenu {
    background: #2a2a2a;
    border-color: #555;
}

body.dark-theme .theme-option {
    color: #eee;
}

body.dark-theme .theme-option:hover {
    background: #3a3a3a;
}

/* Серая тема для выпадающего меню */
body.gray-theme #themeMenu {
    background: #d0d0d0;
    border-color: #6a6a6a;
}

body.gray-theme .theme-option {
    color: #5a5a5a;
}

body.gray-theme .theme-option:hover {
    background: #e0e0e0;
}