* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    background-image: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 40px;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.message {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: messageFadeIn 0.5s ease;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.message-content {
    margin-bottom: 20px;
    word-wrap: break-word;
    font-size: 16px;
    line-height: 1.5;
    color: #444;
}

.message-actions {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #666;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.action-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0,123,255,0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:hover::before {
    width: 300px;
    height: 300px;
}

.action-btn:hover {
    color: #007bff;
    transform: translateY(-1px);
    z-index: 1;
}

.action-btn svg {
    margin-right: 5px;
    vertical-align: middle;
    transition: transform 0.3s ease;
    z-index: 2;
    position: relative;
}

.action-btn span {
    z-index: 2;
    position: relative;
}

.action-btn:hover svg {
    transform: scale(1.1) rotate(5deg);
}

.liked svg path {
    fill: #ff4757;
}

.liked {
    color: #ff4757;
}

.liked:hover {
    background-color: rgba(255,71,87,0.1);
}

.comments {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.comment {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.comment:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.comment-replies {
    margin-top: 15px;
    margin-left: 30px;
}

.secondary-comment {
    background: #f0f0f0;
    font-size: 14px;
    border-left: 3px solid #007bff;
}

.comment-content {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.4;
}

.comment-actions {
    font-size: 13px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reply-form {
    margin-top: 15px;
    display: none;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    border: 1px solid #e9ecef;
}

.reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    resize: vertical;
    min-height: 100px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.reply-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 12px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0069d9;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.send-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
}

.send-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.6);
}

.send-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.send-form {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.send-form h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-size: 1.5rem;
    font-weight: 600;
}

.send-form textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ced4da;
    border-radius: 10px;
    resize: vertical;
    min-height: 180px;
    margin-bottom: 20px;
    font-family: inherit;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

.send-form textarea:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.error {
    color: #dc3545;
    margin-bottom: 10px;
}

.success {
    color: #28a745;
    margin-bottom: 10px;
}

.more-comments {
    text-align: center;
    margin-top: 15px;
}

.more-comments-btn {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.more-comments-btn:hover {
    background-color: rgba(0,123,255,0.1);
    transform: translateY(-1px);
}

.more-comments-btn svg {
    transition: transform 0.3s ease;
}

.more-comments-btn:hover svg {
    transform: scale(1.1);
}

/* Markdown 样式 */
.message-content h1,
.message-content h2,
.message-content h3 {
    margin: 15px 0 10px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.message-content h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.message-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
}

.message-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.message-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.message-content em {
    font-style: italic;
    color: #555;
}

.message-content blockquote {
    border-left: 3px solid #999;
    padding-left: 15px;
    margin: 0;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 0;
    line-height: 1.5;
}

.message-content ol,
.message-content ul {
    margin: 10px 0;
    padding-left: 25px;
}

.message-content li {
    margin: 5px 0;
}

.message-content code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    color: #e74c3c;
}

.message-content hr {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 20px 0;
}

.message-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.message-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 评论中的 Markdown 样式 */
.comment-content h1,
.comment-content h2,
.comment-content h3 {
    margin: 10px 0 5px 0;
    color: #2c3e50;
    line-height: 1.3;
}

.comment-content h1 {
    font-size: 1.5rem;
    font-weight: 700;
}

.comment-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
}

.comment-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.comment-content strong {
    font-weight: 600;
    color: #2c3e50;
}

.comment-content em {
    font-style: italic;
    color: #555;
}

.comment-content blockquote {
    border-left: 3px solid #999;
    padding-left: 15px;
    margin: 0;
    color: #666;
    font-style: italic;
    background: #f8f9fa;
    padding: 8px 15px;
    border-radius: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.comment-content ol,
.comment-content ul {
    margin: 8px 0;
    padding-left: 20px;
}

.comment-content li {
    margin: 3px 0;
}

.comment-content code {
    background: #f0f0f0;
    padding: 1px 4px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85em;
    color: #e74c3c;
}

.comment-content hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 15px 0;
}

.comment-content a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.comment-content a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .message {
        padding: 15px;
    }
    
    .message-actions {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .action-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .send-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
        bottom: 20px;
        right: 20px;
    }
    
    .send-form {
        padding: 20px;
    }
    
    .send-form textarea {
        min-height: 150px;
    }
    
    .comment-replies {
        margin-left: 15px;
    }
}

/* 后台样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 200px;
    background: #343a40;
    color: white;
    padding: 20px;
}

.sidebar h2 {
    margin-bottom: 30px;
    font-size: 18px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
    border-radius: 4px;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.1);
}

.main-content {
    flex: 1;
    padding: 20px;
    background: #f8f9fa;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table tr:hover {
    background: #f5f5f5;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form {
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.login-form h2 {
    margin-bottom: 20px;
    text-align: center;
}