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

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
}

.message-form, .message-list, .login-section, .admin-section {
    padding: 30px;
}

.message-form {
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.message-form h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #495057;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
}

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

.submit-btn, .load-more-btn, .logout-btn, .menu-btn, .cancel-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:hover, .load-more-btn:hover, .logout-btn:hover, .menu-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.submit-btn:active, .load-more-btn:active {
    transform: translateY(0);
}

.message-list {
    background: white;
}

.message-list h2 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 1.5em;
}

.message-item {
    background: #f8f9fa;
    border-left: 4px solid #667eea;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 0 8px 8px 0;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.message-author {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1em;
}

.message-time {
    color: #6c757d;
    font-size: 0.9em;
}

.message-content {
    color: #495057;
    line-height: 1.8;
    white-space: pre-wrap;
}

.load-more {
    text-align: center;
    margin-top: 20px;
}

.loading {
    text-align: center;
    color: #6c757d;
    padding: 20px;
}

.admin-section {
    background: white;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.admin-header h2 {
    color: #667eea;
}

.admin-menu {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.menu-btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
}

.password-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.password-section h3 {
    color: #667eea;
    margin-bottom: 15px;
}

.cancel-btn {
    background: #6c757d;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-item {
    flex: 1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2em;
    font-weight: 600;
}

.stat-label {
    font-size: 0.9em;
    opacity: 0.9;
}

.admin-messages {
    max-height: 500px;
    overflow-y: auto;
}

.admin-message-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
}

.admin-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-message-author {
    font-weight: 600;
    color: #667eea;
}

.admin-message-time {
    color: #6c757d;
    font-size: 0.9em;
}

.admin-message-content {
    color: #495057;
    margin-bottom: 10px;
}

.admin-message-actions {
    display: flex;
    gap: 10px;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.delete-btn:hover {
    background: #c82333;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid #c3e6cb;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.8em;
    }
    
    .container {
        border-radius: 0;
        box-shadow: none;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .admin-menu {
        flex-direction: column;
    }
}