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

body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 720px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    color: #667eea;
    text-align: center;
    margin-bottom: 24px;
    font-size: 2rem;
}

h2 {
    color: #667eea;
    margin-bottom: 12px;
    font-size: 1.3rem;
}

section {
    margin-bottom: 20px;
}

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

.reply-form .form-group {
    margin-bottom: 8px;
}

.reply-form .form-group input,
.reply-form .form-group textarea {
    padding: 8px;
    font-size: 0.9rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

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

button {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}

button:hover {
    background: #5568d3;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.message-card {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    gap: 10px;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.message-avatar.small {
    width: 32px;
    height: 32px;
}

.message-info {
    flex: 1;
}

.message-author {
    font-weight: bold;
    color: #667eea;
    font-size: 0.95rem;
}

.message-time {
    color: #999;
    font-size: 0.78rem;
}

.message-content {
    color: #555;
    margin-bottom: 4px;
    word-break: break-all;
    font-size: 0.95rem;
}

.delete-btn {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 0.85rem;
}

.delete-btn:hover {
    text-decoration: underline;
}

.replies {
    margin: 8px 0;
    padding-left: 14px;
    border-left: 2px solid #667eea;
}

.reply-card {
    background: white;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.reply-form {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e0e0e0;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.page-btn {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #667eea;
    border-radius: 6px;
    color: #667eea;
    text-decoration: none;
    background: white;
}

.page-btn.active {
    background: #667eea;
    color: white;
}

.page-btn:hover:not(.active) {
    background: #f0f2ff;
}

.error {
    color: #ff6b6b;
    margin-bottom: 16px;
}

.reply-tag {
    background: #667eea;
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.message-actions {
    margin: 4px 0;
}

.btn-link {
    background: transparent;
    color: #667eea;
    padding: 0;
    border: none;
    font-size: 0.85rem;
    cursor: pointer;
}

.btn-link:hover {
    text-decoration: underline;
    background: transparent;
}


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

.back a {
    color: #0066cc;
    text-decoration: none;
    font-size: 0.95rem;
}

.back a:hover {
    text-decoration: underline;
}
