/* 关于我们_留言板样式 */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  max-width: 100%;
  overflow-x: hidden;
}

.container {
  margin: 0 auto;
  padding: 20px;
  background-color: white;
  min-height: 100vh;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.input-area {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

#memo-input {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s;
  background-color: #f9f9f9;
  resize: vertical;
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
  margin-bottom: 10px;
}

#add-btn,
.delete-btn,
.upload-label {
  cursor: pointer;
  transition: background-color 0.3s;
}

#add-btn {
  align-self: center;
  background-color: #4caf50;
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 30px;
  font-size: 16px;
  margin-top: 10px;
}

#add-btn:hover {
  background-color: #45a049;
}

.memo-list,
.message-list {
  list-style-type: none;
}

.memo-item,
.message-item {
  background-color: white;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s;
}

.memo-item:hover,
.message-item:hover {
  transform: translateY(-2px);
}

.memo-text,
.message-content {
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

.memo-text {
  flex: 1;
}

.memo-date {
  font-size: 12px;
  color: #888;
  margin-top: 5px;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.delete-btn {
  background-color: #f44336;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  margin-left: 10px;
}

.delete-btn:hover {
  background-color: #d32f2f;
}

.empty-state,
.loading {
  text-align: center;
  color: #888;
}

.empty-state {
  margin-top: 40px;
}

.loading {
  margin-top: 20px;
}

.file-upload-area {
  margin: 10px 0;
}

.upload-label {
  display: inline-block;
  padding: 6px 12px;
  background-color: #f0f0f0;
  border: 1px dashed #ccc;
  border-radius: 4px;
  transition: all 0.3s;
}

.upload-label:hover {
  background-color: #e0e0e0;
  border-color: #999;
}

#image-preview,
.message-images {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.preview-image {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: 4px;
  overflow: hidden;
}

.preview-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.remove-image {
  position: absolute;
  top: 2px;
  right: 2px;
  background-color: rgba(255, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-image {
  max-width: 200px;
  max-height: 200px;
  border-radius: 4px;
  cursor: pointer;
}

.message-image:hover {
  opacity: 0.9;
}

@media (max-width: 500px) {
  .container {
    padding: 15px;
  }

  #memo-input {
    padding: 10px 15px;
  }
}
