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

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #667eea;
    min-height: 100vh;
    padding: 20px 0;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    color: #2c3e50;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #667eea;
}

h2, h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #667eea;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn:active {
    transform: translateY(0);
}

.btn.secondary-btn {
    background: #a8edea;
    color: #2c3e50;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.4);
}

.btn.secondary-btn:hover {
    box-shadow: 0 6px 20px rgba(168, 237, 234, 0.6);
}

.btn.submit-btn {
    background: #38ef7d;
    box-shadow: 0 4px 15px rgba(56, 239, 125, 0.4);
}

.btn.submit-btn:hover {
    box-shadow: 0 6px 20px rgba(56, 239, 125, 0.6);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    margin: 8% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 80%;
    max-width: 480px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #95a5a6;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close-btn:hover {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

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

form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #2c3e50;
}

form input, form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

form input:focus, form textarea:focus {
    outline: none;
    border-color: #667eea;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

form textarea {
    resize: vertical;
    min-height: 100px;
}

.image-upload-container {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.image-preview {
    margin-top: 1rem;
    display: none;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-image {
    margin-top: 1rem;
}

.message-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.message-image img:hover {
    transform: scale(1.02);
}

.error-message {
    color: #e74c3c;
    margin-top: 1rem;
    display: none;
    padding: 0.75rem;
    background-color: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    font-size: 0.9rem;
}

/* 留言区域样式 */
.message-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.message-form-container {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.message-form-container textarea {
    width: 100%;
    margin-bottom: 1rem;
}

.messages-list {
    margin-top: 2rem;
}

.messages-list h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #667eea;
    display: inline-block;
}

.message-card {
    background: #f5f7fa;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.message-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #667eea;
}

.message-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.message-card .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

.message-card .message-header span:first-child {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
}

.message-card .message-content {
    margin-bottom: 1rem;
    color: #444;
    line-height: 1.8;
    font-size: 1rem;
}

.message-card .message-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* 用户管理样式 */
.admin-controls {
    background: #a8edea;
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(168, 237, 234, 0.3);
}

.admin-controls h3 {
    margin: 0 0 1rem 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.user-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
}

.user-item div:first-child strong {
    color: #2c3e50;
    font-size: 1.1rem;
}

.role-select {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    font-size: 0.95rem;
    background-color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.role-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* 工具类 */
.hidden {
    display: none;
}

.logged-in-user {
    display: flex;
    align-items: center;
}

.logged-in-user span {
    margin-right: 1rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 1.1rem;
}

footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
}

/* 消息提示样式 */
.message-notification {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .message-section {
        padding: 1.5rem;
    }

    .modal-content {
        width: 90%;
        margin: 15% auto;
        padding: 2rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
}
    