.container_reg {
    max-width: 900px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border: 1px solid #ccc;
}

.container_authorization {
    max-width: 400px;
    margin: auto;
    margin-top: 50px;
    text-align: center;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.registration-form {
    margin-top: 1.5rem;
}

.form-container {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1.5rem;
}

.form-column {
    flex: 1;
    min-width: 300px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #00bcd4;
    border-radius: 0.375rem;
    font-size: 1rem;
    box-shadow: none!important;
}

.form-control:focus{
    outline: 2px solid #00bcd4;
}

.form-control:valid{
    border-color: #4CAF50!important;
}

.is-invalid {
    border-color: #dc3545;
}

.invalid-feedback {
    color: #dc3545;
    margin-top: 0rem;
    position: absolute ;
    width: max-content;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .form-container {
        flex-direction: column;
    }

    .form-column {
        width: 100%;
    }

    .form-actions {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .btn-send, .reply-btn, .btn-cancel {
        width: auto;
        max-width: 100%;
        margin-bottom: 0rem;
  }
}

.GoButton, #DataSort {
    background-color: gray;
    color: white;
    padding: 5px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.GoButton:hover {
    background-color: darkgray;
}

#backButton {
    pointer-events: none;
}

::after {
    color: white;
}

#info_user {
    display: none;
}

#info_user_button, a {
    cursor: pointer;
}

#canvas {
    max-height: 300px;
}


.block {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    transition: transform 0.3s ease;
    width: 200px;
}

.block:hover {
    transform: scale(1.05);
}

.title_name {
    padding-top: 1em;
}

input[type="text"],
textarea {
    width: 100%;
    resize: none;
    overflow: hidden;
    min-height: 50px;
}

#delete_post_bttn {
    float: right;
    margin-bottom: 5px;
}

.container_with_delete_post_bttn{
    padding-right: 2rem;
}

.href_post {
    text-decoration: none;
    color: #333333;
}

.rounded-circle {
    margin-right: 7px;
}

.clamp-text {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: pre-line;  /* сохраняет \n, но убирает лишние пробелы */
}

.post-card-link {
    text-decoration: none;
    color: inherit;
}

.post-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
    cursor: pointer;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    background-color: #f9f9f9;
}

.username:hover span {
    color: #00bcd4; /* бирюзовый акцент, как в логотипе */
    text-shadow: 0 0 3px rgba(0, 188, 212, 0.5);
    transition: all 0.3s ease;
}

.username img {
    border: 2px solid #00bcd4;
    /* padding: 2px;*/
    background-color: white;
}

.username span {
    font-family: 'Segoe UI', 'Roboto', sans-serif;
    font-size: 1rem;
}

.btn-registration, .btn-send {
    background-color: #00bcd4 !important;
    transition: 0.3s;
}

.btn-registration:hover, .btn-send:hover {
    background-color: #02cee8 !important;
    color: #212529 !important;
    transition: 0.3s;
}

.btn-login:hover {
    color: #212529 !important;
    transition: 0.3s;
}

.username {
  display: inline-flex;
  max-width: fit-content;
}

.dropdown-toggle {
    cursor: pointer;
}

.nav-link:hover {
    color: #00bcd4 !important;
    text-shadow: 0 0 3px rgba(0, 188, 212, 0.5);
    transition: all 0.3s ease;
}

.form-check-input:checked {
  background-color: #00bcd4;
  border-color: #00bcd4;
}

canvas {
    display: block;
    border-radius: 4px;
}

.like-btn {
    background-color: rgb(128, 128, 128)!important; /* лайк не поставлен */
    border: none;
    cursor: pointer;
    font-size: 0.875rem;;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 0.4rem;
    transition: background-color 0.2s ease;
}

.like-btn.liked {
    background-color: #00bcd4 !important; /* лайк поставлен */
}

.users-msg-list {
    background-color: #383f48!important;
    border-color: #00bcd4;
    border-radius: 8px!important;
}

.users-msg-list + .users-msg-list {
  border-top: 1px solid #00bcd4;
}

.my-message{
    background-color: #00bcd4;
}

.flash{
    color: red;
}

#messages-container {
    background-color: #383f48;
    border-radius: 8px;
    border-width: 3px!important;
    border-color: #151b23!important;
    overflow-y: auto; /* важно */
    scrollbar-width: thin; /* для Firefox */
    scrollbar-color: #00bcd4 #151b23; /* для Firefox */
}

.x3dom-progress{
    visibility: hidden;
}

.comment {
    background-color: rgba(42, 49, 60, 0.9);
    margin-left: 20px;
}

@media (max-width: 600px) {
  .comment {
    margin-left: 8px;
  }
}


.highlight-comment {
    border: 2px solid #00bcd4!important;
    background-color: rgba(0, 188, 212, 0.1);
    transition: background-color 0.3s ease;
}