body {
    font-family: 'Century Gothic', sans-serif;
    background-image: url("images/bg.jpg");
    color: #f5f5f5;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    margin-bottom: 30px;
}

.main-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  /* остальное оставить */
}



.container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
}

h1, h2, h3 {
    color: #7ee014;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #84ff00;
    padding-bottom: 10px;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
}

h3 {
    font-size: 1.4rem;
    margin: 10px 0;
}

/* Блоки форума */
#boards-container {
    background-color: #2e2d2d;
    padding: 15px;
    border-radius: 8px;
    height: fit-content;
}

#topic-container {
    background-color: #292929;
    padding: 20px;
    border-radius: 8px;
}

#new-post-form {
    background-color: #2e2d2d;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

/* Списки */
#boards-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#boards-list li {
    margin: 8px 0;
    padding: 8px 0;
    border-bottom: 1px solid #444;
}

#boards-list li:last-child {
    border-bottom: none;
}

#boards-list a {
    color: #f5f5f5;
    text-decoration: none;
    transition: color 0.3s;
    display: block;
    padding: 5px;
    border-radius: 4px;
}

#boards-list a:hover {
    color: #7ee014;
    background-color: #222222;
}

/* Сообщения */
.post {
    background-color: #222222;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #7ee014;
    opacity: 0;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.post-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-weight: bold;
    color: #7ee014;
}

.post-content {
    margin: 15px 0;
    line-height: 1.6;
}

.reply {
    background-color: #720a0a;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border-left: 3px solid #7ee014;
}

#reply-preview {
    color: white !important;
    border-radius: 4px;
    padding: 10px;
    background-color: #4e4e4e !important;
    border-left: 3px solid #747474;
    margin-bottom: 15px;
}

#reply-preview > div {
    font-size: 0.85em;
    color: #ffffff;
    margin-bottom: 5px;
}

#reply-author {
    font-weight: bold;
    color: #7ee014;
}

#reply-content {
    color: #ffffff;
    white-space: pre-wrap;
    word-break: break-word;
}

#cancel-reply {
    color: #ff3e3e !important;
    text-decoration: underline;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.8em;
}

#cancel-reply:hover {
    color: #dc3545;
}

/* Формы */
form div {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #84ff00;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 10px 0px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #131313;
    color: #f5f5f5;
    font-family: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

/* Кнопки */
button {
    font-family: 'Century Gothic', sans-serif;
    background-color: #7ee014;
    color: #131313;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    margin-bottom: 5px;
}

button:hover {
    background-color: #131313;
    color: #7ee014;
    border: 1px solid #7ee014;
    transform: scale(1.05);
}

.btn-reply {
    font-family: 'Century Gothic', sans-serif;
    background-color: #7ee014;
    color: #131313;
    margin-top: 10px;
}

.btn-reply:hover {
    background-color: #131313;
    color: #7ee014;
    border: 1px solid #7ee014;
    transform: scale(1.05);
}

/* Пагинация */
#pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

#pagination a {
    color: #f5f5f5;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    background-color: #4e4e4e;
    transition: all 0.3s;
}

#pagination a:hover {
    background-color: #7ee014;
    color: #131313;
}

/* Ссылки в сообщениях */
a[href^="#post-"] {
    color: #7ee014;
    text-decoration: none;
    transition: color 0.3s;
}

a[href^="#post-"]:hover {
    color: #a0e060;
    text-decoration: underline;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Модальное окно */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
    padding-top: 66px; /* отступ под фиксированной шапкой */
    box-sizing: border-box;
}


.modal-content {
    background-color: #131313;
    margin: 0 auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #7ee014;
}

/* Дополнительные стили */
.board-link.active {
    font-weight: bold;
    background-color: #222222;
    border-left: 3px solid #7ee014;
}

.reply-notice {
    background-color: #131313;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #aaa;
}

.reply-notice a {
    color: #4f8f0b;
    text-decoration: none;
}

.reply-notice a:hover {
    text-decoration: underline;
}

.btn-reply-to-post {
    background-color: #7ee014;
    color: #131313;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9em;
    transition: all 0.3s;
}

.btn-reply-to-post:hover {
    background-color: #131313;
    color: #7ee014;
    border: 1px solid #7ee014;
}

#back-to-topics {
    background-color: #7ee014;
    color: #131313;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 15px;
    transition: all 0.3s;
}

#back-to-topics:hover {
    background-color: #131313;
    color: #7ee014;
    border: 1px solid #7ee014;
}

.post.highlighted {
    background-color: rgba(126, 224, 20, 0.1);
    transition: background-color 0.5s ease;
    border-left: 3px solid #131313;
    padding-left: 10px;
}

.reply-link {
    color: #59e659;
    text-decoration: none;
    cursor: pointer;
}

.reply-link:hover {
    color: #21b942;
    text-decoration: underline;
}

.reply-notice {
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #666;
}

.quote-container {
    margin: 5px 0 10px 0;
    padding: 8px;
    color: #131313;
    background: #131313;
    border-left: 3px solid #ccc;
    border-radius: 3px;
}

.quoted-post {
    font-size: 0.85em;
}

.quoted-header {
    color: #555;
    margin-bottom: 5px;
    font-style: italic;
}


.quoted-content {
    padding: 5px;
    background: #131313;
    border-radius: 3px;
    max-height: 200px;
    overflow: auto;
    color: #c5c5c5;
}

.reply-link {
    color: #0066cc;
    text-decoration: none;
}

.reply-link:hover {
    text-decoration: underline;
}

.post-image {
    max-width: 250px;
    max-height: 250px;
    cursor: pointer;
    transition: transform 0.3s;
    border-radius: 4px;
    margin: 10px 0;
}

.post-image:hover {
    transform: scale(1.02);
}

#modal-image {
    max-width: 90%;
    max-height: 90%;
    z-index: 9999;
    display: block;
    margin: 0 auto;
}

#image-preview, #topic-image-preview {
    display: flex;
    align-items: center;
    margin-top: 10px;
    z-index: 9999;
}

#remove-image, #remove-topic-image {
    background: #ff3e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

#remove-image:hover, #remove-topic-image:hover {
    background: #dc3545;
}

#image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: auto;
    text-align: center;
}

#image-modal .modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 700px;
    max-height: 90vh;
    padding: 20px;
}

#image-modal .close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

#image-modal .close:hover {
    color: #bbb;
}
#image-modal .image-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

#image-modal .image-modal-close:hover {
    color: #ff3e3e;
    background-color: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    border-color: #ff3e3e;
}

#image-modal .image-modal-close:active {
    transform: scale(0.95);
}

#modal-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    z-index: 10000;
}


.post-image {
    max-width: 100%;
    max-height: 300px;
    margin: 10px 0;
    cursor: pointer;
    transition: transform 0.3s;
}

.post-image:hover {
    transform: scale(1.02);
}
.topic-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 0.9em;
    color: #cfcfcf;
}

.post-count {
    font-weight: bold;
}
#moderator-login-modal .modal-content {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background-color: #2e2d2d;
    border-radius: 8px;
}

#moderator-login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#moderator-login-form label {
    color: #7ee014;
    margin-bottom: 5px;
}

#moderator-login-form input {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background-color: #131313;
    color: #f5f5f5;
}

#moderator-login-form button {
    background-color: #7ee014;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

#moderator-login-form button:hover {
    background-color: #097a0fb4;
}
.topic-actions, .post-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-delete-topic, .btn-delete-post {
    background-color: #ff3e3e;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete-topic:hover, .btn-delete-post:hover {
    background-color: #ff1a1a;
}
/* Адаптивность */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
        width: 90%;
    }
    
    #boards-container {
        margin-bottom: 20px;
    }
    
    .post-header {
        flex-direction: column;
    }
@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

}