/* ===== 全局重置 & 黑色主题 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    background: #0d0d0d;
    color: #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    padding: 10px 15px 80px;
    min-height: 100vh;
}
a {
    color: #FE638F;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    background: #1a1a1a;
    border-radius: 12px;
    padding: 20px 20px 30px;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

/* ===== 头部 ===== */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
    flex-wrap: wrap;
    gap: 10px;
}
.logo a {
    display: inline-block;
}
.logo img {
    height: 40px;
    max-width: 150px;
    vertical-align: middle;
}
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.btn-reply {
    background: #4a6fa5;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-reply:hover {
    background: #3a5a8a;
    text-decoration: none;
}
.btn-back {
    background: #FE638F;
    color: #fff;
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 2px 8px rgba(254,99,143,0.4);
}
.btn-back:hover {
    background: #e0557a;
    text-decoration: none;
}

/* ===== 帖子内容 ===== */
.post-content {
    padding: 20px 0 15px;
    border-bottom: 1px solid #2a2a2a;
    word-wrap: break-word;
}
.post-content h1, .post-content h2, .post-content h3 {
    color: #fff;
}
.post-content ul, .post-content ol {
    padding-left: 25px;
    margin: 10px 0;
}
.post-content p {
    margin: 8px 0;
}
.post-time {
    color: #888;
    font-size: 13px;
    margin-top: 8px;
}
.post-likes {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.like-btn-post {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s;
}
.like-btn-post:hover {
    color: #FE638F;
}
.like-btn-post .likes-count {
    font-weight: bold;
    color: #ccc;
}

/* ===== 回复区域 ===== */
.replies-section {
    margin-top: 25px;
}
.replies-section h3 {
    color: #ccc;
    font-weight: normal;
    border-bottom: 1px dashed #333;
    padding-bottom: 8px;
    margin-bottom: 15px;
}
.reply-item {
    margin: 15px 0;
    padding: 14px 16px;
    background: #252525;
    border-radius: 10px;
    border-left: 3px solid #FE638F;
}
.reply-item.level-1 {
    border-left-color: #FE638F;
}
.reply-item.level-2 {
    margin-left: 30px;
    border-left-color: #3a8fff;
    background: #1e2a3a;
}
.reply-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #fff;
    flex-shrink: 0;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
}
.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}
.reply-author {
    font-weight: bold;
    color: #e0e0e0;
    font-size: 14px;
}
.reply-time {
    font-size: 12px;
    color: #777;
    margin-left: auto;
}
.reply-content {
    margin: 6px 0 10px 48px;
    word-break: break-word;
    color: #ddd;
    font-size: 15px;
}
.reply-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: 48px;
    font-size: 13px;
    flex-wrap: wrap;
}
.like-btn {
    background: transparent;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}
.like-btn:hover {
    color: #FE638F;
}
.like-btn .likes-count {
    font-weight: bold;
    color: #ccc;
}
.reply-btn {
    background: transparent;
    border: none;
    color: #FE638F;
    cursor: pointer;
    font-size: 13px;
    padding: 2px 8px;
    border-radius: 12px;
    transition: background 0.2s;
}
.reply-btn:hover {
    background: #2a3a4a;
}
.reply-btn.level-2-hidden {
    display: none;
}

/* ===== 官方标识 ===== */
.official-badge {
    background: #ffd700;
    color: #000;
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 12px;
    font-weight: bold;
    margin-left: 8px;
    display: inline-block;
    box-shadow: 0 0 8px rgba(255,215,0,0.3);
}
.post-official {
    margin-bottom: 10px;
}

/* ===== 待审核标记 ===== */
.pending-badge {
    background: #ffaa00;
    color: #000;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 12px;
    font-weight: bold;
    margin-left: 8px;
}
.reply-item.status-pending {
    border-left-color: #ffaa00;
    opacity: 0.9;
}

/* ===== 管理员审核按钮（内联使用，保留样式备用） ===== */
.admin-audit-btns {
    margin-left: 10px;
    display: inline-flex;
    gap: 6px;
}
.admin-audit-btns button {
    padding: 2px 12px;
    border: none;
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    font-weight: bold;
}
.admin-audit-btns .pass {
    background: #2e7d32;
    color: #fff;
}
.admin-audit-btns .pass:hover {
    background: #1b5e20;
}
.admin-audit-btns .reject {
    background: #c62828;
    color: #fff;
}
.admin-audit-btns .reject:hover {
    background: #b71c1c;
}

/* ===== 回复表单 ===== */
.reply-form {
    margin-top: 30px;
    background: #202020;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1px solid #333;
}
.reply-form .form-group {
    margin-bottom: 12px;
}
.reply-form .form-group textarea {
    width: 100%;
    padding: 10px 12px;
    background: #111;
    border: 1px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 15px;
    transition: border-color 0.3s;
    font-family: inherit;
    resize: vertical;
    min-height: 70px;
}
.reply-form .form-group textarea:focus {
    outline: none;
    border-color: #FE638F;
}
.reply-form .form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 10px;
}
.reply-form .form-row .hint {
    font-size: 13px;
    color: #888;
}
.btn-submit {
    background: #FE638F;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 15px;
}
.btn-submit:hover {
    background: #e0557a;
}
.btn-submit:active {
    transform: scale(0.97);
}
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== 底部 ===== */
.footer {
    margin-top: 40px;
    text-align: center;
    color: #555;
    font-size: 13px;
    border-top: 1px solid #2a2a2a;
    padding-top: 18px;
}
.footer .admin-link {
    color: #666;
    cursor: pointer;
    margin-left: 12px;
    font-size: 12px;
    transition: color 0.2s;
}
.footer .admin-link:hover {
    color: #aaa;
}

/* ===== 到顶部按钮 ===== */
#go-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #FE638F;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(254,99,143,0.4);
    transition: opacity 0.3s, transform 0.2s;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    opacity: 0.8;
}
#go-top:hover {
    opacity: 1;
    transform: scale(1.05);
}
#go-top.show {
    display: flex;
}

/* ===== 模态框 ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background: #1a1a1a;
    border-radius: 16px;
    padding: 30px 35px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
    border: 1px solid #333;
}
.modal-box h3 {
    color: #fff;
    margin-bottom: 12px;
    font-weight: normal;
}
.modal-box p {
    color: #aaa;
    font-size: 14px;
    margin-bottom: 18px;
}
.modal-box input {
    width: 100%;
    padding: 10px 14px;
    background: #111;
    border: 1px solid #444;
    border-radius: 8px;
    color: #e0e0e0;
    font-size: 16px;
    margin-bottom: 18px;
    transition: border-color 0.3s;
}
.modal-box input:focus {
    outline: none;
    border-color: #FE638F;
}
.modal-box .modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}
.modal-box .modal-actions button {
    padding: 8px 24px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.modal-box .modal-actions .btn-confirm {
    background: #FE638F;
    color: #fff;
}
.modal-box .modal-actions .btn-confirm:hover {
    background: #e0557a;
}
.modal-box .modal-actions .btn-cancel {
    background: #444;
    color: #ccc;
}
.modal-box .modal-actions .btn-cancel:hover {
    background: #555;
}

/* ===== 响应式 ===== */
@media (max-width: 600px) {
    .container {
        padding: 12px 12px 20px;
    }
    .logo img {
        height: 32px;
    }
    .btn-back, .btn-reply {
        font-size: 14px;
        padding: 6px 14px;
    }
    .reply-item.level-2 {
        margin-left: 12px;
    }
    .reply-content {
        margin-left: 0;
    }
    .reply-actions {
        margin-left: 0;
    }
    .reply-form .form-row {
        flex-direction: column;
        align-items: stretch;
    }
    .reply-form .form-row .hint {
        text-align: center;
    }
    #go-top {
        width: 44px;
        height: 44px;
        font-size: 24px;
        bottom: 20px;
        right: 15px;
    }
    .modal-box {
        padding: 20px;
    }
}
@media (min-width: 601px) and (max-width: 1024px) {
    .container {
        padding: 20px 30px;
    }
}