/* Стили для комментариев в стиле чата */
.comments-section {
    margin-top: 2rem;
    max-width: 800px;
}

.comment {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #222;
    border-radius: 10px;
    border: 1px solid #333;
    transition: background-color 0.2s ease;
}

.comment:hover {
    background-color: #252525;
}

.comment-author-panel {
    flex-shrink: 0;
    width: 100px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #444;
    object-fit: cover;
}

.guest-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border: 2px solid #555;
}

.guest-avatar svg {
    width: 40px;
    height: 40px;
}

.author-name {
    display: block;
    word-wrap: break-word;
    font-size: 0.9em;
    text-align: center;
}

.author-name a {
    color: #0f0;
    text-decoration: none;
    font-weight: bold;
}

.author-name a:hover {
    text-decoration: underline;
    color: #0c0;
}

.author-status {
    display: block;
    font-size: 0.75em;
    color: #888;
    font-style: italic;
}

.comment-content {
    flex-grow: 1;
    padding: 0.5rem 0;
    min-width: 0; /* Для правильного переноса длинных слов */
}

.comment-content p {
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
    color: #ddd;
}

.comment-time {
    font-size: 0.8em;
    color: #666;
    margin-top: 0.5rem;
}

/* Стили для формы комментария */
.comment-form {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #222;
    border-radius: 10px;
    border: 1px solid #333;
}

.comment-form h3 {
    margin-top: 0;
    color: #0f0;
    border-bottom: 1px solid #444;
    padding-bottom: 0.5rem;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-form label {
    color: #ccc;
    font-weight: bold;
}

.comment-form input[type="text"],
.comment-form textarea {
    padding: 0.75rem;
    background: #333;
    border: 1px solid #555;
    border-radius: 5px;
    color: white;
    font-family: monospace;
    font-size: 1em;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #0f0;
    box-shadow: 0 0 0 2px rgba(0, 255, 0, 0.1);
}

.comment-form button {
    padding: 0.75rem 1.5rem;
    background: #0a5;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-family: monospace;
    align-self: flex-start;
    transition: background-color 0.2s ease;
}

.comment-form button:hover {
    background: #0c6;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .comment {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .comment-author-panel {
        width: 100%;
        flex-direction: row;
        text-align: left;
        gap: 1rem;
    }
    
    .comment-avatar,
    .guest-avatar {
        width: 40px;
        height: 40px;
    }
    
    .guest-avatar svg {
        width: 24px;
        height: 24px;
    }
    
    .author-name {
        text-align: left;
    }
}