/* Contenedor principal del foro */
.foro-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 2rem;
    margin-top: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* Zona superior: Formulario */
.foro-form-box {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.foro-form-box h3, .foro-mensajes-box h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.foro-form-box input[type="text"],
.foro-form-box textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    margin-bottom: 0.8rem;
    background-color: #ffffff;
    transition: all 0.2s ease;
}

.foro-form-box input[type="text"]:focus,
.foro-form-box textarea:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.foro-form-box textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 150px;
}

/* Zona inferior: Lista de comentarios */
.foro-mensajes-box {
    display: flex;
    flex-direction: column;
}

.mensajes-lista {
    max-height: 550px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding-right: 0.5rem;
}

/* Diseño de Burbuja de Comentario Estética */
.comentario-burbuja {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background-color: #f8fafc;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.comentario-burbuja:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

/* Avatar circular con la inicial del usuario */
.burbuja-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 6px rgba(245, 158, 11, 0.3);
}

/* Cuerpo de la burbuja */
.burbuja-contenido {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Evita que elementos flexibles rompan el ancho de la tarjeta */
}

.burbuja-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.burbuja-header strong {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 600;
    word-break: break-word;
}

.burbuja-texto p {
    margin-top: 0.35rem;
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    word-break: break-word;
}

/* Pie de la burbuja normal (Usuarios) */
.burbuja-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 0.6rem;
    width: 100%;
}

/* Pie de la burbuja en el Panel Admin */
.burbuja-footer-admin {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.8rem;
    padding-top: 0.6rem;
    border-top: 1px solid #e2e8f0;
    width: 100%;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.likes-counter {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.form-like {
    margin: 0;
}

.btn-like {
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.btn-like:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: scale(1.05);
}

.btn-like.liked {
    background-color: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #dc2626 !important;
    cursor: pointer !important;
}

/* Estilos de Administración */
.btn-eliminar {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #dc2626;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-eliminar:hover {
    background-color: #fee2e2;
    border-color: #fca5a5;
    transform: scale(1.05);
}

.btn-logout {
    color: #dc2626 !important;
    font-weight: 600;
}

.admin-badge {
    background-color: #fef3c7;
    color: #d97706;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #fde68a;
    white-space: nowrap;
}

/* Estado