body{
    margin: 0;
    padding: 0;
    background-color: #EEEEEE;
    font-size: 14px;
    FONT-FAMILY: Verdana, Geneva, Arial, Helvetica, sans-serif;
}

a{
    text-decoration: none;
    color:#800000;
}

.header{
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    background-color: #395479;
}

h1{
    color: #ffd700;
    font-size: 25px;
}

.nav{
    display: flex;
    gap:10px;
}

.nav a{
    text-decoration: none;
    color:#800000;
    padding: 0 10px;
    position: relative;
}

.nav a:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: -10px;
    color: #999;
}

table{
    width: 100%;
    border-color: #EEEEEE;
}

table th{
    background-color: #395479;
    color: white;
    text-align: center;
    padding: 5px;
}

table tr{
    background-color: #DFDEDC;
    color: #800000;
}

table td{
    padding: 5px;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
}

.like-button i {
    color: #666;
}

.like-button i.fas.fa-star {
    color: yellow;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-label {
    margin-right: 10px;
    color: #333;
}

.pagination-link {
    margin: 0 2px;
    padding: 2px 4px;
    text-decoration: none;
    color: #800000;
}

.pagination-link:hover {
    text-decoration: underline;
}

.pagination-current {
    margin: 0 2px;
    padding: 2px 4px;
    color: #555;
}

.pagination-separator {
    margin: 0 2px;
    color: #999;
}

.pagination-dots {
    margin: 0 2px;
    color: #800000;
}

.pagination-arrow {
    margin: 0 2px;
    padding: 2px 4px;
    text-decoration: none;
    color: #800000;
    font-weight: bold;
}

.pagination-arrow:hover {
    text-decoration: underline;
}

.author_block{
    display: flex;
    gap:20px;
    width: 100%;
    padding: 20px;
    background-color: #DDDDDD;
    margin-top: 20px;
}

.author_block_name{
    font-weight: bold;
    color: #800000;
}

.title_theme{
    text-align: center;
}

.author-info-block{
    display: flex;
    flex-direction: column;
    gap:5px;
}

.topic-info {
    border: 1px solid #395479;
    background: #DDDDDD;
}

.topic-content {
    display: flex;
}

.topic-id-info {
    width: 200px;
    padding: 10px;
    background: #DDDDDD;
    border-right: 1px solid #395479;
    text-align: center;
}

.topic-stats-info {
    margin-top: 10px;
    line-height: 1.5;
}

.stat-value {
    margin-left: 5px;
}

.topic-right-content {
    flex: 1;
    padding: 15px;
}

.topic-main-title{
    text-align: center;
}

.topic-body {
    line-height: 1.6;
    margin-bottom: 15px;
}

.topic-details{
    display: flex;
    flex-direction: row;
    gap:10px;
    border-bottom: 1px solid #395479;
    padding-bottom: 10px;
}

.topic-body br {
    margin-bottom: 8px;
}


.like-button {
    background: none;
    padding: 5px 10px;
    cursor: pointer;
}

.like-button i {
    color: #ff4444;
    margin-right: 5px;
}

.no-topics-message{
    text-align: center;
    margin-top: 20px;
}

.no-messages{
    text-align: center;
    margin-top: 20px;
}

.message-item {
    border: 1px solid #395479;
    background: #EEEEEE;
}

.message-content {
    display: flex;
}

.message-id-info {
    width: 200px;
    padding: 10px;
    background: #EEEEEE;
    border-right: 1px solid #395479;
    color: #666;
    text-align: center;
}

.author-block {
    margin-bottom: 2px;
}

.author-name {
    color: #800000;
    text-decoration: none;
}

.author-faith {
    margin-bottom: 2px;
}

.author-role {
    margin-bottom: 8px;
}

.tools-link {
    color: #395479;
    text-decoration: underline;
    cursor: pointer;
    margin-bottom: 10px;
}

.message-details {
    margin-bottom: 10px;
    line-height: 1.4;
    color: #333;
}

.all-messages {
    color: #395479;
    text-decoration: underline;
    cursor: pointer;
}

.message-right-content {
    flex: 1;
    padding: 10px;
}

.message-header {
    margin-bottom: 8px;
}

.reply-info {
    color: #800000;
}

.reply-author {
    color: #800000;
}

.reply-faith {
    color: #666;
    margin-left: 3px;
}

.message-body {
    line-height: 1.5;
    color: #000;
}

.search-row{
    display: flex;
    flex-direction: row;
}

.search-field{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.autocomplete-container.name{
    max-width: 50%;
}

.autocomplete-container.search{
    max-width: 50%;
}

.search-field-title{
    display: flex;
    align-items: center;
    gap:10px;
    width: 100%;
    font-size: 16px;
}

.search-field-author{
    display: flex;
    align-items: center;
    gap:10px;
    width: 100%;
    font-size: 16px;
}

.search-container {
    width: 100%;
}
     
h2{
    display: flex;
    justify-content: center;
    font-weight: 300;
}

h3{
    font-weight: 300;
}

.search-box {
    display: flex;
    justify-content: center;
    gap: 10px;
}
        
.search-input {
    padding: 10px;
    width: 100%;
    border: 1px solid #ddd;
}
        
.search-input:focus {
    outline: none;
    border-color: #395479;
}
        
.search-button {
    position: relative;
    right: 25px;
    z-index: 500;
    background: transparent;
    color: #395479;
    border: none;
    cursor: pointer;;
}
           
.radio-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0;
    padding: 10px;
}
        
.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}
        
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    background: #e9ecef;
}
        
.no-results {
    text-align: center;
    padding: 50px;
    color: #666;
    background: #f9f9f9;
    margin: 20px 0;
}
        
.search-result-table {
    width: 100%;
}
        
.highlight {
    background: #ffd700;
    font-weight: bold;
    padding: 2px 0;
}
        
mark {
    background: #ffd700;
    padding: 2px 4px;
}
        
.message-preview {
    max-width: 500px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
        
.autocomplete-container {
    position: relative;
    flex: 1;
}
        
.autocomplete-items {
    position: absolute;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    max-height: 300px;
    overflow-y: auto;
}
        
.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    border-bottom: 1px solid #ddd;
}
        
.autocomplete-item:hover {
    background: #f0f0f0;
}
        
.search-stats {
    font-weight: bold;
    color: #395479;
}

input{
    font-size: 14px;
}
        
.pagination {
    margin: 20px 0;
    text-align: center;
}
        
table{
    width: 100%;
    border-color: #EEEEEE;
    margin-top: 20px;
    margin-bottom: 20px;
}

table th{
    background-color: #395479;
    color: white;
    text-align: center;
    padding: 10px;
}

table tr{
    background-color: #DFDEDC;
    color: #800000;
}

table td{
    padding: 5px;
}

.like-button {
    background: none;
    border: none;
    cursor: pointer;
}

.like-button i {
    color: #666;
}

.like-button i.fas.fa-star {
    color: #ffd700;
}

.clear-filter-container{
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
}

.clear-filter-button{
    background-color: #395479;
    border: none;
    color: white;
    padding: 10px;
    font-size: 14px;
}

.clear-filter-container.hidden {
    display: none;
}

.mobile-cards{
    display:none;
}

.mobile-topics-cards {
    display: none;
}

.search-results-mobile {
    display: none;
}
        
/*************************************************************************/
/****************************АДАПТИВ**************************************/
/*************************************************************************/

@media screen and (max-width: 768px) {
    

    .search-results-table {
        display: none;
    }
    
    .search-results-mobile {
        display: block;
        width: 100%;
    }
    
    .search-results-mobile .mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
    .topic-text {
        font-size: 14px;
        line-height: 1.5;
        color: #333;
        word-wrap: break-word;
    }
    
    .topic-text mark {
        background: #ffd700;
        padding: 2px;
    }

    .hram{
        display: none;
    }

    h1{
        font-size: 20px;
        margin-left: 20px;
        text-align: left;
    }

    .nav{
        align-items: center;
        justify-content: center;
        margin-top: 20px;
    }

    .search-container-new{
        align-items: center;
        justify-content: center;
    }

    .search-row{
        flex-direction: column;
        gap:20px;
    }

    .autocomplete-container.name{
        max-width: 75%;
    }

    .autocomplete-container.search{
        max-width: 75%;
    }

    .autocomplete-container{
        max-width: 75%;
    }

    .autocomplete-item{
        font-size: 14px;
    }

    .data-table{
        display: none;
    }

    .user-mobile-cards{
        display: flex;
    }

    .mobile-cards {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap:10px;
        padding: 20px;
        box-sizing: border-box;
    }

    .topic-author.users{
        margin-bottom: 10px;
        font-size: 16px;
    }

    .col-name.users{
        color:#800000;
        word-wrap: break-word;        
        overflow-wrap: break-word;   
        word-break: break-word;       
        hyphens: auto; 
    }

    /* Стили для карточек */
    .topic-card {
        background: #f5f5f5;
        border: 1px solid #ddd;
        padding: 15px;
        margin-bottom: 10px;
    }
    
    .topic-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .topic-id {
        font-family: monospace;
        color: #003333;
        font-size: 14px;
    }
    
    .topic-title {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .topic-title a {
        color: #800000;
        text-decoration: none;
    }
    
    .topic-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        margin-bottom: 10px;
        font-size: 14px;
        color: black;
    }
    
    .topic-author i,
    .topic-date i {
        margin-right: 5px;
    }
    
    .topic-author a {
        color: #666;
        text-decoration: none;
    }
    
    .topic-stats {
        display: flex;
        gap: 20px;
        margin-bottom: 15px;
        font-size: 14px;
    }
    
    .topic-messages i,
    .topic-likes i {
        margin-right: 5px;
    }
    
    .likes-count {
        font-weight: bold;
        color: #666;
        margin-right: 5px;
    }
    
    .topic-actions {
        display: flex;
        justify-content: flex-end;
    }
    
    .view-topic-btn {
        background: #395479;
        color: white;
        padding: 8px 15px;
        text-decoration: none;
        font-size: 14px;
    }
    
    .like-button-mobile {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 18px;
        color: #666;
    }
    
    .like-button-mobile i.fas {
        color: #ffd700;
    }

    .topic-likes i {
        color: #ffd700;
    }


    .pagination{
        flex-wrap: wrap;
    }

    .topic-details{
        flex-wrap: wrap;
    }

    .topic-body{
        word-wrap: break-word;        
        overflow-wrap: break-word;   
        word-break: break-word;       
        hyphens: auto; 
    }

    .author_block{
        padding: 20px 0;
    }

    .author-info-block{
        flex-wrap: wrap;
        word-wrap: break-word;        
        overflow-wrap: break-word;   
        word-break: break-word;       
        hyphens: auto; 
    }

    .title_theme{
        font-size: 16px;
    }

    .profile-photo{
       max-width: 100px;
       max-height: 100px; 
    }

    .no-messages{
        margin-bottom: 20px;
    }

    .mobile-topics-cards {
        display: block;
        width: 100%;
    }
    
    .mobile-topics-cards .mobile-cards {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }
    
}

/*************************************************************************/
/****************************ADMINKA**************************************/
/*************************************************************************/

.admin-login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
        
.admin-login-container h2 {
    text-align: center;
    margin-bottom: 30px;
}
        
.admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
        
.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
        
.form-group input {
    padding: 10px;
    border: 1px solid #ddd;
}
          
.login-button {
    padding: 10px;
    color: white;
    background-color: #395479;
    border: none;
    margin-top: 10px;
}
        
.error-message {
    color: #e74c3c;
    text-align: center;
    margin-top: 10px;
    padding: 10px;
    display: none;
}

.admin-container {
    max-width: 1400px;
    margin: 20px auto;
    padding: 20px;
}
        
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}
        
.admin-search {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
}
        
.admin-search input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
}
        
.admin-search input:focus {
    outline: none;
}
        
.admin-search button {
    padding: 10px;
    background-color: #395479;
    color: white;
    border: none;
    cursor: pointer;
}
        
.filter-select {
    padding: 10px;
    border: 1px solid #ddd;
    min-width: 150px;
}
        
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}
        
.delete-btn {
    background: #999;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}
        
.bulk-actions {
    margin-top: 20px;
    padding: 10px;
    background: #f8f9fa;
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}
        
.danger-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}
        
.danger-btn:hover {
    background: #c0392b;
}
        
.warning-btn {
    background: #f39c12;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
}
        
.warning-btn:hover {
    background: #e67e22;
}
        
.success-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 10px;
}
        
.success-btn:hover {
    background: #2ecc71;
}
        
.logout-btn {
    background: #95a5a6;
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    display: inline-block;
}
        
.logout-btn:hover {
    background: #7f8c8d;
}
        
.checkbox-col {
    width: 40px;
    text-align: center;
}
        
.checkbox-col input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
        
.badge-success {
    background: #27ae60;
    color: white;
    padding: 3px 8px;
}
        
.badge-warning {
    background: #f39c12;
    color: white;
    padding: 3px 8px;
}
        
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}
        
.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
        
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
        
.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}
        
.close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
}
        
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.no-results{
    color: #ccc;
    margin-bottom: 20px;
}

.no-results p{
    color: #999;
}

.user-mobile-cards{
    display: none;
}

.container-search-title{
    display: flex;
    flex-direction: column;
}

.search-container-new{
    display: flex;
    align-items: center;
    width: 100%;
}

.search-field-title{
    display: flex;
    flex-direction: column;
}

.search-field-author{
    display: flex;
    flex-direction: column;
}