.rp-profile {
    display: flex;
    gap: 24px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    max-width: 900px;
    margin: 20px auto;
}
.rp-profile-left { flex: 0 0 150px; text-align: center; }
.rp-avatar { width: 140px; height: 140px; border-radius: 8px; object-fit: cover; }

.rp-badges {
    display: flex;
    flex-wrap: nowrap;              /* ← 关键：不换行 */
    gap: 6px;
    margin: 12px 0;
    overflow-x: auto;               /* ← 横向滚动 */
    overflow-y: hidden;
    padding-bottom: 6px;            /* 滚动条和徽章之间留空隙 */
    justify-content: flex-start;    /* 左对齐，从头开始 */
    scroll-behavior: smooth;

    /* 隐藏滚动条（各浏览器兼容） */
    scrollbar-width: thin;          /* Firefox */
    scrollbar-color: #ccc transparent;
}

/* WebKit 浏览器（Chrome/Safari/Edge）滚动条美化 */
.rp-badges::-webkit-scrollbar {
    height: 6px;
}

.rp-badges::-webkit-scrollbar-track {
    background: transparent;
}

.rp-badges::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 3px;
}

.rp-badges::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.rp-badge {
    display: inline-block;
    line-height: 1;
    cursor: help;
    flex: 0 0 auto;                 /* ← 关键：不允许收缩 */
}

.rp-badge img {
    width: 33px;
    height: 33px;
    object-fit: cover;
    display: block;
    border-radius: 50%;
    border: 1px solid #eee;
}

.rp-badge-noicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    background: #f0f0f0;
    color: #666;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
}

.rp-badge img {
    width: 33px;
    height: 33px;
    object-fit: cover;        /* 圆形时用 cover，避免留白 */
    display: block;
    border-radius: 50%;       /* ← 关键：圆形 */
    border: 1px solid #eee;   /* 可选：加个细边框更好看 */
}

.rp-badge-noicon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    background: #f0f0f0;
    color: #666;
    border-radius: 50%;       /* ← 无图标时的占位也圆形 */
    font-size: 14px;
    font-weight: 600;
}

/* 操作链接：两列布局 */
.rp-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: 14px;
    margin-top: 12px;
    text-align: left;
}
.rp-actions a {
    color: #06c;
    text-decoration: none;
    white-space: nowrap;
}
.rp-actions a:hover { text-decoration: underline; }
/* 单数时最后一项横跨整行 */
.rp-actions a:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.rp-profile-right { flex: 1; padding-top: 8px; }
.rp-profile-right p { margin: 6px 0; line-height: 1.8; font-size: 15px; }
.rp-profile-right p span { color: #666; display: inline-block; min-width: 90px; }
.rp-note-display { color: #c60; background: #fff8e0; padding: 6px 10px; border-radius: 4px; }

/* 主题列表 */
.rp-topic-list { list-style: none; padding: 0; }
.rp-topic-list li { padding: 8px 0; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; }

/* 私信 */
.rp-messages { max-height: 500px; overflow-y: auto; padding: 10px; background: #f9f9f9; border-radius: 6px; }
.rp-msg { margin: 8px 0; }
.rp-msg.mine { text-align: right; }
.rp-msg-content { display: inline-block; padding: 8px 12px; border-radius: 8px; background: #e6f2ff; max-width: 70%; text-align: left; }
.rp-msg.theirs .rp-msg-content { background: #fff; }
.rp-msg-time { font-size: 12px; color: #999; margin-top: 2px; }
.rp-msg-form textarea { width: 100%; height: 80px; margin-top: 10px; }
/* ============================================================
   /profile/modify 页面
   ============================================================ */
.rp-modify {
    max-width: 640px;
    margin: 30px auto;
    padding: 30px 36px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.rp-modify-title {
    margin: 0 0 24px;
    font-size: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

.rp-mod-group {
    border: none;
    padding: 0;
    margin: 0 0 28px;
}

.rp-mod-group legend {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    padding: 0 0 10px;
    border-bottom: 1px dashed #eee;
    width: 100%;
    margin-bottom: 16px;
}

.rp-mod-hint {
    font-size: 13px;
    color: #999;
    margin: 0 0 12px;
}

.rp-mod-field {
    margin-bottom: 16px;
}

.rp-mod-field label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.rp-mod-field input,
.rp-mod-field textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.15s;
    font-family: inherit;
}

.rp-mod-field input:focus,
.rp-mod-field textarea:focus {
    outline: none;
    border-color: #0066cc;
}

.rp-mod-field textarea {
    resize: vertical;

}

.rp-mod-field small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.rp-mod-actions {
    margin-top: 30px;
    text-align: center;
}

.rp-mod-submit {
    padding: 11px 60px;
    font-size: 15px;
    color: #fff;
    background: #0066cc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.rp-mod-submit:hover:not(:disabled) { background: #0055aa; }
.rp-mod-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.rp-mod-msg {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.rp-mod-msg-error {
    background: #fff0f0;
    color: #c00;
    border: 1px solid #fdd;
}

.rp-mod-msg-success {
    background: #f0fff4;
    color: #080;
    border: 1px solid #cfc;
}
/* 头像上传行 */
.rp-mod-avatar-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.rp-mod-avatar-preview img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid #eee;
    display: block;
    background: #f5f5f5;
}

.rp-mod-avatar-upload {
    flex: 1;
}

.rp-mod-file-btn {
    display: block;
    position: relative;
    padding: 10px 14px;
    border: 1px dashed #ccc;
    border-radius: 6px;
    background: #fafafa;
    cursor: pointer;
    font-size: 13px;
    color: #666;
    transition: border-color 0.15s;
}

.rp-mod-file-btn:hover {
    border-color: #0066cc;
}

.rp-mod-file-btn input[type=file] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.rp-mod-upload-btn {
    float: right;
    color: #0066cc;
    font-weight: 600;
}

.rp-mod-avatar-upload small {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

@media (max-width: 600px) {
    .rp-mod-avatar-row {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .rp-mod-avatar-upload {
        width: 100%;
    }
}
/* ============================================================
   登录 / 注册 / 找回密码
   ============================================================ */
.rp-auth-wrap {
    max-width: 420px;
    margin: 40px auto;
    padding: 36px 40px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.rp-auth-wrap h2 {
    margin: 0 0 24px;
    font-size: 22px;
    text-align: center;
    color: #2c3e50;
}

.rp-auth-desc {
    font-size: 14px;
    color: #888;
    text-align: center;
    margin: -12px 0 20px;
}

.rp-auth-field {
    margin-bottom: 18px;
}

.rp-auth-field label {
    display: block;
    font-size: 14px;
    color: #555;
    margin-bottom: 6px;
}

.rp-auth-field input[type=text],
.rp-auth-field input[type=email],
.rp-auth-field input[type=password] {
    width: 100%;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.rp-auth-field input:focus {
    outline: none;
    border-color: #0066cc;
}

.rp-auth-field small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #999;
}

.rp-auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 13px;
}

.rp-auth-checkbox {
    color: #666;
    cursor: pointer;
    user-select: none;
}

.rp-auth-checkbox input {
    margin-right: 4px;
    vertical-align: middle;
}

.rp-auth-link {
    color: #0066cc;
    text-decoration: none;
}

.rp-auth-link:hover { text-decoration: underline; }

.rp-auth-submit {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    color: #fff;
    background: #0066cc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}

.rp-auth-submit:hover:not(:disabled) { background: #0055aa; }
.rp-auth-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.rp-auth-msg {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.rp-auth-msg-error {
    background: #fff0f0;
    color: #c00;
    border: 1px solid #fdd;
}

.rp-auth-msg-success {
    background: #f0fff4;
    color: #080;
    border: 1px solid #cfc;
}

.rp-auth-bottom {
    margin: 20px 0 0;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.rp-auth-bottom a {
    color: #0066cc;
    text-decoration: none;
}

.rp-auth-bottom a:hover { text-decoration: underline; }

.rp-follows {
    max-width: 900px;
    margin: 30px auto;
    padding: 24px 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.rp-follows h2 {
    margin: 0 0 20px;
    font-size: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

.rp-follows-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.rp-follow-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.15s;
}

.rp-follow-item a:hover {
    border-color: #0066cc;
    background: #f8fbff;
}

.rp-follow-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.rp-follow-name {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-role-badge {
    margin-left: 6px;
    font-size: 13px;
    font-weight: 600;
}

.rp-role-admin,
.rp-role-editor {
    color: #c00 !important;
}

.rp-role-author {
    color: #0066cc !important; 
}
/* 信用分记录 */
.rp-credit-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #eee;
}

.rp-credit-title {
    font-size: 16px;
    color: #2c3e50;
    margin: 0 0 16px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.rp-credit-balance {
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

.rp-credit-actions {
    margin-bottom: 16px;
    display: flex;
    gap: 10px;
}

.rp-credit-btn {
    padding: 6px 16px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    transition: all 0.15s;
}

.rp-credit-btn-deduct {
    color: #c00;
    border-color: #fdd;
}

.rp-credit-btn-deduct:hover {
    background: #fff0f0;
    border-color: #c00;
}

.rp-credit-btn-add {
    color: #0066cc;
    border-color: #cce4ff;
}

.rp-credit-btn-add:hover {
    background: #eef6ff;
    border-color: #0066cc;
}

.rp-credit-log {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
}

.rp-credit-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rp-credit-item:last-child {
    border-bottom: none;
}

.rp-credit-time {
    color: #999;
    min-width: 130px;
}

.rp-credit-amt {
    font-weight: 600;
    min-width: 50px;
}

.rp-credit-amt.neg { color: #c00; }
.rp-credit-amt.pos { color: #080; }

.rp-credit-reason {
    flex: 1;
    color: #333;
}

.rp-credit-by {
    color: #999;
    font-size: 12px;
}

.rp-credit-balance-now {
    color: #666;
    font-size: 12px;
}

.rp-credit-empty {
    color: #999;
    text-align: center;
    padding: 20px;
    font-size: 13px;
}
/* 信用分日志页 */
.rp-clog-wrap {
    max-width: 1100px;
    margin: 30px auto;
    padding: 24px 30px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
}

.rp-clog-title {
    margin: 0 0 20px;
    font-size: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
}

/* 统计卡片 */
.rp-clog-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rp-clog-stat {
    padding: 16px 20px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
}

.rp-clog-stat-deduct {
    background: #fff8f8;
    border-color: #fdd;
}

.rp-clog-stat-add {
    background: #f8fff8;
    border-color: #cfc;
}

.rp-clog-stat-label {
    font-size: 12px;
    color: #666;
}

.rp-clog-stat-val {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 4px 0;
}

.rp-clog-stat-deduct .rp-clog-stat-val,
.rp-clog-stat-deduct .rp-clog-stat-sub { color: #c00; }
.rp-clog-stat-add .rp-clog-stat-val,
.rp-clog-stat-add .rp-clog-stat-sub { color: #080; }

.rp-clog-stat-sub {
    font-size: 12px;
}

/* 筛选表单 */
.rp-clog-filter {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: 8px;
    margin-bottom: 16px;
}

.rp-clog-filter input[type=text],
.rp-clog-filter input[type=date],
.rp-clog-filter select {
    padding: 6px 10px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.rp-clog-filter input[type=text] { width: 120px; }
.rp-clog-filter input[name=f_reason] { width: 180px; }

.rp-clog-filter button {
    padding: 6px 16px;
    font-size: 13px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.rp-clog-filter button:hover { background: #0055aa; }

.rp-clog-reset {
    color: #666;
    text-decoration: none;
    font-size: 13px;
}

/* 计数行 */
.rp-clog-count {
    font-size: 13px;
    color: #666;
    margin: 12px 0;
}

/* 表格 */
.rp-clog-table-wrap {
    overflow-x: auto;
    border: 1px solid #eee;
    border-radius: 8px;
}

.rp-clog-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.rp-clog-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: #555;
    border-bottom: 1px solid #eee;
}

.rp-clog-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f5f5f5;
}

.rp-clog-table tr:last-child td { border-bottom: none; }
.rp-clog-table tr:hover td { background: #fafafa; }

.rp-clog-amt {
    font-weight: 600;
}
.rp-clog-amt.neg { color: #c00; }
.rp-clog-amt.pos { color: #080; }

.rp-clog-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* 分页 */
.rp-clog-pagination {
    margin-top: 20px;
    text-align: center;
}

.rp-clog-pagination .page-numbers {
    display: inline-block;
    padding: 6px 10px;
    margin: 0 2px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0066cc;
    text-decoration: none;
    font-size: 13px;
}

.rp-clog-pagination .page-numbers.current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.rp-clog-pagination .page-numbers:hover:not(.current) {
    background: #eef6ff;
}

/* 移动端 */
@media (max-width: 700px) {
    .rp-clog-stats { grid-template-columns: 1fr; }
    .rp-clog-filter { flex-direction: column; align-items: stretch; }
    .rp-clog-filter input[type=text],
    .rp-clog-filter input[name=f_reason] { width: auto; }
}

/* ============================================================
   DZ 风格购买框
   ============================================================ */
.rp-sell-box {
    border: 1px solid #cdcdcd;
    border-radius: 4px;
    padding: 12px 16px 14px;
    margin: 16px 0;
    background: #fafafa;
    font-size: 14px;
    color: #444;
}

.rp-sell-box legend {
    padding: 0 8px;
    font-size: 14px;
    color: #333;
    line-height: 1.8;
    white-space: normal;
}

.rp-sell-box legend strong {
    color: #e74c3c;
    font-weight: 700;
    font-size: 15px;
    padding: 0 3px;
}

.rp-sell-box .rp-sell-menu {
    padding: 2px 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
    margin: 0 6px;
    background: #fff;
    color: #333;
    vertical-align: middle;
}

.rp-sell-box .rp-sell-buy {
    padding: 4px 12px;
    font-size: 13px;
    color: #333;
    background: linear-gradient(to bottom, #f9f9f9, #e9e9e9);
    border: 1px solid #bbb;
    border-radius: 3px;
    cursor: pointer;
    line-height: 100%;
    vertical-align: middle;
    transition: all 0.1s;
}

.rp-sell-box .rp-sell-buy:hover {
    background: linear-gradient(to bottom, #f0f0f0, #dcdcdc);
    border-color: #999;
}

.rp-sell-box .rp-sell-buy:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.rp-sell-box > b {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: #666;
    font-weight: normal;
}

.rp-sell-login {
    color: #0066cc;
    text-decoration: none;
}

.rp-sell-login:hover {
    text-decoration: underline;
}

/* 购买记录弹窗 */
.rp-sell-dialog {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.rp-sell-dialog-inner {
    background: #fff;
    border-radius: 8px;
    padding: 20px 24px;
    max-width: 420px;
    width: 90%;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.rp-sell-dialog-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.rp-sell-dialog-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
}

.rp-sell-dialog-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f5f5f5;
    display: flex;
    justify-content: space-between;
    color: #333;
}

.rp-sell-dialog-list li:last-child { border-bottom: none; }

.rp-sell-dialog-close {
    display: block;
    margin: 16px auto 0;
    padding: 6px 24px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.rp-sell-dialog-close:hover { background: #e9e9e9; }

/* ============================================================
   DZ 风格隐藏框
   ============================================================ */
.rp-hide-box {
    border: 1px solid #cdcdcd;
    border-radius: 4px;
    padding: 12px 16px 14px;
    margin: 16px 0;
    background: #fafafa;
    font-size: 14px;
    color: #444;
    line-height: 1.8;
}

.rp-hide-box legend {
    padding: 0 8px;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.rp-hide-box strong {
    color: #e74c3c;
    font-weight: 700;
    font-size: 15px;
    padding: 0 3px;
}

.rp-hide-box a {
    color: #0066cc;
    text-decoration: none;
}

.rp-hide-box a:hover {
    text-decoration: underline;
}

/* 已解锁的框：边框更柔和 */
.rp-sell-box-unlocked,
.rp-hide-box-unlocked {
    border-color: #d0e6d0;
    background: #fafdfa;
}

.rp-sell-content,
.rp-hide-content {
    padding: 8px 4px 4px;
    line-height: 1.8;
}

.rp-sell-content a {
    color: #0066cc;
    text-decoration: none;
    word-break: break-all;
}

.rp-sell-content a:hover { text-decoration: underline; }

/* 未解锁：默认样式 */
.rp-sell-box-locked,
.rp-hide-box-locked {
    border-color: #cdcdcd;
    background: #fafafa;
}