* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
}

.site-header {
    background-color: #00779C;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
}

.site-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.site-title a {
    color: #ffffff;
    text-decoration: none;
}

.site-title a:hover {
    text-decoration: underline;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

.site-nav a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 400;
}

.site-nav a:hover {
    text-decoration: underline;
}

.site-footer {
    background-color: #00779C;
    height: 60px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Main content area */
.container {
    max-width: 600px;
    margin: 20px auto;
    padding: 0 20px 120px 20px;
    min-height: calc(100vh - 100px);
}

/* Page title */
h2 {
    color: #00779C;
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* Messages list */
.messages-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

/* Message item */
.message-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    list-style: none;
}

.message-avatar {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 50%;
    background-color: #d0d0d0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #999;
}

.message-content {
    flex: 1;
}

.message-user {
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.message-text {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.message-image-wrap {
    margin: 8px 0;
}

.message-image {
    display: block;
    width: 100%;
    max-width: 380px;
    max-height: 320px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
}

.message-timestamp {
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

.message-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.message-edit-toggle {
    background-color: transparent;
    border: 1px solid #00779C;
    color: #00779C;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.message-edit-toggle:hover {
    background-color: #eef8fb;
}

.message-delete-form {
    margin: 0;
}

.message-delete-button {
    background-color: #b42318;
    border: 1px solid #b42318;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
}

.message-delete-button:hover {
    background-color: #8f1d14;
    border-color: #8f1d14;
}

.message-edit-form {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.message-edit-form textarea {
    width: 100%;
    min-height: 90px;
    border: 1px solid #c9d8de;
    border-radius: 6px;
    padding: 8px;
    resize: vertical;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

.message-edit-form button {
    background-color: #00779C;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    align-self: flex-start;
}

.message-edit-form button:hover {
    background-color: #005f7a;
}

.hidden {
    display: none;
}

/* View all messages link */
.view-all-link {
    text-align: center;
    margin-bottom: 30px;
}

.view-all-link a {
    color: #00779C;
    text-decoration: none;
    font-size: 14px;
}

.view-all-link a:hover {
    text-decoration: underline;
}

/* Message input form */
.message-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 80px;
}

.message-input-wrapper {
    flex: 1;
}

.message-input-wrapper textarea {
    width: 100%;
    padding: 12px;
    border: 2px dashed #999;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
}

.message-input-wrapper textarea:focus {
    outline: none;
    border-color: #00779C;
}

.message-upload-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upload-plus-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #00779C;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}

.upload-plus-btn:hover {
    background-color: #005f7a;
}

.upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.upload-filename {
    color: #666;
    font-size: 12px;
}

.message-form button {
    background-color: #00779C;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    align-self: flex-end;
}

.message-form button:hover {
    background-color: #005f7a;
}
