.rh-wrapper {
    max-width: 900px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #333;
    line-height: 1.6;
    --rh-bg: #fff;
    --rh-bg-alt: #fafafa;
    --rh-text: #333;
    --rh-text-light: #555;
    --rh-text-muted: #999;
    --rh-border: #ddd;
    --rh-shadow: rgba(0, 0, 0, 0.06);
    --rh-accent: #4a90d9;
}

.rh-header {
    text-align: center;
    margin-bottom: 30px;
}

.rh-wrapper .rh-header .rh-title,
.rh-wrapper h2.rh-title {
    font-size: 32px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: #2c3e50 !important;
    letter-spacing: 2px !important;
}

.rh-title-underline {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4a90d9, #5cb85c);
    margin: 10px auto 0;
    border-radius: 2px;
}

.rh-instructions {
    background: var(--rh-bg);
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px var(--rh-shadow);
    border-left: 4px solid var(--rh-accent);
}

.rh-instruction-item {
    padding: 8px 0;
    font-size: 15px;
    color: var(--rh-text-light);
    border-bottom: 1px dashed var(--rh-border);
}

.rh-instruction-item:last-child {
    border-bottom: none;
}

.rh-num {
    color: #e74c3c;
    font-weight: 600;
    margin-right: 4px;
}

.rh-example-box {
    background: #fff5f5;
    border: 1px solid #fde2e2;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 25px;
}

.rh-example-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.rh-example-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #e74c3c;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.rh-example-title {
    color: #e74c3c;
    font-weight: 600;
    font-size: 15px;
}

.rh-example-item {
    padding: 6px 0;
    font-size: 14px;
    color: #666;
}

.rh-example-bullet {
    color: #4a90d9;
    margin-right: 4px;
}

.rh-form {
    background: var(--rh-bg);
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px var(--rh-shadow);
}

.rh-form-row {
    display: flex;
    gap: 16px;
}

.rh-form-row .rh-form-group {
    flex: 1;
}

.rh-form-group {
    margin-bottom: 18px;
}

.rh-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--rh-text);
    font-size: 14px;
}

.rh-required {
    color: #e74c3c;
}

.rh-form-group input[type="text"],
.rh-form-group input[type="email"],
.rh-form-group select,
.rh-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--rh-border);
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    background: var(--rh-bg-alt);
    color: var(--rh-text);
}

.rh-form-group input[type="text"]:focus,
.rh-form-group input[type="email"]:focus,
.rh-form-group select:focus,
.rh-form-group textarea:focus {
    outline: none;
    border-color: var(--rh-accent);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
    background: var(--rh-bg);
}

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

.rh-form-actions {
    text-align: center;
    margin-top: 20px;
}

.rh-submit-btn {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
    border: none;
    padding: 12px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 2px;
}

.rh-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
}

.rh-submit-btn:active {
    transform: translateY(0);
}

.rh-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.rh-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rh-spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes rh-spin {
    to { transform: rotate(360deg); }
}

.rh-form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 6px;
    text-align: center;
    display: none;
}

.rh-form-message.rh-success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.rh-form-message.rh-error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ========== 未登录提示框 ========== */
.rh-login-required {
    background: var(--rh-bg);
    border-radius: 8px;
    padding: 40px 24px;
    text-align: center;
    box-shadow: 0 2px 8px var(--rh-shadow);
    border: 1px dashed var(--rh-border);
}

.rh-login-icon {
    font-size: 48px;
    margin-bottom: 16px;
    line-height: 1;
}

.rh-login-text {
    font-size: 18px;
    font-weight: 600;
    color: var(--rh-text);
    margin: 0 0 8px 0;
}

.rh-login-sub {
    font-size: 14px;
    color: var(--rh-text-muted);
    margin: 0 0 24px 0;
}

.rh-login-btn,
.rh-register-btn {
    display: inline-block;
    padding: 10px 32px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 1px;
    margin: 0 6px;
}

.rh-login-btn {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff !important;
    border: none;
}

.rh-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(74, 144, 217, 0.3);
    color: #fff !important;
}

.rh-register-btn {
    background: var(--rh-bg-alt);
    color: var(--rh-text) !important;
    border: 1px solid var(--rh-border);
}

.rh-register-btn:hover {
    transform: translateY(-2px);
    border-color: var(--rh-accent);
    color: var(--rh-accent) !important;
}

/* 暗夜模式适配 */
body.color-dark .rh-login-required,
body.theme-dark .rh-login-required,
body.dark-mode .rh-login-required,
body.rh-dark-mode .rh-login-required {
    background: #2a2a2a !important;
    border-color: #444 !important;
}

body.color-dark .rh-login-text,
body.theme-dark .rh-login-text,
body.dark-mode .rh-login-text,
body.rh-dark-mode .rh-login-text {
    color: #e0e0e0 !important;
}

body.color-dark .rh-login-sub,
body.theme-dark .rh-login-sub,
body.dark-mode .rh-login-sub,
body.rh-dark-mode .rh-login-sub {
    color: #999 !important;
}

body.color-dark .rh-register-btn,
body.theme-dark .rh-register-btn,
body.dark-mode .rh-register-btn,
body.rh-dark-mode .rh-register-btn {
    background: #333 !important;
    border-color: #555 !important;
    color: #e0e0e0 !important;
}

body.color-dark .rh-register-btn:hover,
body.theme-dark .rh-register-btn:hover,
body.dark-mode .rh-register-btn:hover,
body.rh-dark-mode .rh-register-btn:hover {
    border-color: #5b9bd5 !important;
    color: #5b9bd5 !important;
}

.rh-recent {
    margin-top: 30px;
}

.rh-recent-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    padding-left: 10px;
    border-left: 3px solid var(--rh-accent);
}

.rh-recent-list {
    background: var(--rh-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--rh-shadow);
}

.rh-recent-item {
    padding: 14px 18px;
    border-bottom: 1px solid var(--rh-border);
    transition: background 0.2s;
}

.rh-recent-item:last-child {
    border-bottom: none;
}

.rh-recent-item:hover {
    background: var(--rh-bg-alt);
}

.rh-recent-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.rh-recent-nickname {
    font-weight: 600;
    color: var(--rh-text);
    font-size: 14px;
}

.rh-recent-status {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 500;
}

.rh-status-pending {
    background: #fff3cd;
    color: #856404;
}

.rh-status-processing {
    background: #d1ecf1;
    color: #0c5460;
}

.rh-status-completed {
    background: #d4edda;
    color: #155724;
}

.rh-status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.rh-recent-content {
    font-size: 14px;
    color: var(--rh-text-light);
    margin-bottom: 4px;
}

.rh-recent-category {
    background: #e8f4fd;
    color: #1a73e8;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 8px;
}

.rh-recent-name {
    font-weight: 500;
}

.rh-recent-name-en {
    color: var(--rh-text-muted);
    font-weight: 400;
}

.rh-recent-time {
    font-size: 12px;
    color: var(--rh-text-muted);
}

/* 最近求助的备注信息 */
.rh-recent-note {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-all;
}

.rh-recent-user-note {
    background: var(--rh-bg-alt);
    color: var(--rh-text-light);
    border-left: 3px solid var(--rh-accent);
}

.rh-recent-admin-note {
    background: #fff8e1;
    color: #8a6d00;
    border-left: 3px solid #f0ad4e;
}

.rh-note-label {
    font-weight: 600;
    margin-right: 4px;
}

.rh-note-content {
    color: inherit;
}

/* 暗夜模式 - 备注信息 */
body.color-dark .rh-recent-user-note,
body.theme-dark .rh-recent-user-note,
body.dark-mode .rh-recent-user-note,
body.rh-dark-mode .rh-recent-user-note {
    background: #333 !important;
    color: #b0b0b0 !important;
    border-left-color: #5b9bd5 !important;
}

body.color-dark .rh-recent-admin-note,
body.theme-dark .rh-recent-admin-note,
body.dark-mode .rh-recent-admin-note,
body.rh-dark-mode .rh-recent-admin-note {
    background: #3d3520 !important;
    color: #ffd966 !important;
    border-left-color: #f0ad4e !important;
}

@media (max-width: 600px) {
    .rh-form-row {
        flex-direction: column;
        gap: 0;
    }

    .rh-title {
        font-size: 24px;
    }

    .rh-wrapper {
        margin: 15px;
    }
}

/* ============================================
   DARK MODE - Using CSS Variables for easy override
   ============================================ */

/* Method 1: System preference */
@media (prefers-color-scheme: dark) {
    .rh-wrapper {
        --rh-bg: #2a2a2a;
        --rh-bg-alt: #333;
        --rh-text: #e0e0e0;
        --rh-text-light: #b0b0b0;
        --rh-text-muted: #777;
        --rh-border: #444;
        --rh-shadow: rgba(0, 0, 0, 0.3);
        --rh-accent: #5b9bd5;
    }

    .rh-wrapper .rh-header .rh-title,
    .rh-wrapper h2.rh-title {
        color: #ffffff !important;
    }

    .rh-example-box {
        background: #2d2424;
        border-color: #4a2a2a;
    }

    .rh-example-title {
        color: #ff8b7a;
    }

    .rh-example-item {
        color: #a8a8a8;
    }

    .rh-status-pending {
        background: #3d3520;
        color: #ffd966;
    }

    .rh-status-processing {
        background: #1f3a4a;
        color: #5bc0eb;
    }

    .rh-status-completed {
        background: #1f3a2a;
        color: #5bce6e;
    }

    .rh-status-rejected {
        background: #3d2020;
        color: #ff7a7a;
    }

    .rh-recent-category {
        background: #1a3a5c;
        color: #5b9bd5;
    }

    .rh-form-message.rh-success {
        background: #1f3a2a;
        color: #5bce6e;
        border-color: #2d5a3a;
    }

    .rh-form-message.rh-error {
        background: #3d2020;
        color: #ff7a7a;
        border-color: #5a2d2d;
    }
}

/* Method 2: Zibll theme dark mode classes */
body.color-dark .rh-wrapper,
body.theme-dark .rh-wrapper,
body.dark-mode .rh-wrapper {
    --rh-bg: #2a2a2a !important;
    --rh-bg-alt: #333 !important;
    --rh-text: #e0e0e0 !important;
    --rh-text-light: #b0b0b0 !important;
    --rh-text-muted: #777 !important;
    --rh-border: #444 !important;
    --rh-shadow: rgba(0, 0, 0, 0.3) !important;
    --rh-accent: #5b9bd5 !important;
}

body.color-dark .rh-wrapper .rh-header .rh-title,
body.color-dark .rh-wrapper h2.rh-title,
body.theme-dark .rh-wrapper .rh-header .rh-title,
body.theme-dark .rh-wrapper h2.rh-title,
body.dark-mode .rh-wrapper .rh-header .rh-title,
body.dark-mode .rh-wrapper h2.rh-title {
    color: #ffffff !important;
}

body.color-dark .rh-example-box,
body.theme-dark .rh-example-box,
body.dark-mode .rh-example-box {
    background: #2d2424 !important;
    border-color: #4a2a2a !important;
}

body.color-dark .rh-example-title,
body.theme-dark .rh-example-title,
body.dark-mode .rh-example-title {
    color: #ff8b7a !important;
}

body.color-dark .rh-example-item,
body.theme-dark .rh-example-item,
body.dark-mode .rh-example-item {
    color: #a8a8a8 !important;
}

body.color-dark .rh-status-pending,
body.theme-dark .rh-status-pending,
body.dark-mode .rh-status-pending {
    background: #3d3520 !important;
    color: #ffd966 !important;
}

body.color-dark .rh-status-processing,
body.theme-dark .rh-status-processing,
body.dark-mode .rh-status-processing {
    background: #1f3a4a !important;
    color: #5bc0eb !important;
}

body.color-dark .rh-status-completed,
body.theme-dark .rh-status-completed,
body.dark-mode .rh-status-completed {
    background: #1f3a2a !important;
    color: #5bce6e !important;
}

body.color-dark .rh-status-rejected,
body.theme-dark .rh-status-rejected,
body.dark-mode .rh-status-rejected {
    background: #3d2020 !important;
    color: #ff7a7a !important;
}

body.color-dark .rh-recent-category,
body.theme-dark .rh-recent-category,
body.dark-mode .rh-recent-category {
    background: #1a3a5c !important;
    color: #5b9bd5 !important;
}

/* Method 3: JS-driven dark mode class */
body.rh-dark-mode .rh-wrapper {
    --rh-bg: #2a2a2a !important;
    --rh-bg-alt: #333 !important;
    --rh-text: #e0e0e0 !important;
    --rh-text-light: #b0b0b0 !important;
    --rh-text-muted: #777 !important;
    --rh-border: #444 !important;
    --rh-shadow: rgba(0, 0, 0, 0.3) !important;
    --rh-accent: #5b9bd5 !important;
}

body.rh-dark-mode .rh-wrapper .rh-header .rh-title,
body.rh-dark-mode .rh-wrapper h2.rh-title {
    color: #ffffff !important;
}

body.rh-dark-mode .rh-example-box {
    background: #2d2424 !important;
    border-color: #4a2a2a !important;
}

body.rh-dark-mode .rh-example-title {
    color: #ff8b7a !important;
}

body.rh-dark-mode .rh-example-item {
    color: #a8a8a8 !important;
}

body.rh-dark-mode .rh-status-pending {
    background: #3d3520 !important;
    color: #ffd966 !important;
}

body.rh-dark-mode .rh-status-processing {
    background: #1f3a4a !important;
    color: #5bc0eb !important;
}

body.rh-dark-mode .rh-status-completed {
    background: #1f3a2a !important;
    color: #5bce6e !important;
}

body.rh-dark-mode .rh-status-rejected {
    background: #3d2020 !important;
    color: #ff7a7a !important;
}

body.rh-dark-mode .rh-recent-category {
    background: #1a3a5c !important;
    color: #5b9bd5 !important;
}

body.rh-dark-mode .rh-form-message.rh-success {
    background: #1f3a2a !important;
    color: #5bce6e !important;
    border-color: #2d5a3a !important;
}

body.rh-dark-mode .rh-form-message.rh-error {
    background: #3d2020 !important;
    color: #ff7a7a !important;
    border-color: #5a2d2d !important;
}

/* ========== 前台提醒弹窗 ========== */

.rh-notify-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rh-notify-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    animation: rh-notify-in 0.3s ease;
}

@keyframes rh-notify-in {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.rh-notify-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #4a90d9, #5cb85c);
}

.rh-notify-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.rh-notify-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    line-height: 1;
    opacity: 0.8;
}

.rh-notify-close:hover { opacity: 1; }

.rh-notify-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.rh-notify-footer {
    padding: 12px 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.rh-notify-btn {
    background: #4a90d9;
    color: #fff;
    border: none;
    padding: 8px 32px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.rh-notify-btn:hover { background: #3a7dc1; }

/* 提醒卡片 */
.rh-notify-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #5cb85c;
}

.rh-notify-card:last-child { margin-bottom: 0; }

.rh-notify-icon { font-size: 28px; margin-bottom: 8px; }

.rh-notify-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.rh-notify-ok { background: #e8f5e9; color: #2e7d32; }
.rh-notify-no { background: #fbe9e7; color: #c62828; }

.rh-notify-name {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 4px;
}

.rh-notify-cat {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.rh-notify-notes {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
    word-break: break-all;
}

.rh-notify-msg {
    font-size: 14px;
    color: #4a90d9;
    font-weight: 600;
}

/* 暗色模式弹窗 */
body.color-dark .rh-notify-modal,
body.theme-dark .rh-notify-modal,
body.dark-mode .rh-notify-modal,
body.rh-dark-mode .rh-notify-modal {
    background: #2a2a2a !important;
}

body.color-dark .rh-notify-footer,
body.theme-dark .rh-notify-footer,
body.dark-mode .rh-notify-footer,
body.rh-dark-mode .rh-notify-footer {
    border-top-color: #444 !important;
}

body.color-dark .rh-notify-card,
body.theme-dark .rh-notify-card,
body.dark-mode .rh-notify-card,
body.rh-dark-mode .rh-notify-card {
    background: #333 !important;
}

body.color-dark .rh-notify-name,
body.theme-dark .rh-notify-name,
body.dark-mode .rh-notify-name,
body.rh-dark-mode .rh-notify-name {
    color: #e0e0e0 !important;
}

body.color-dark .rh-notify-cat,
body.theme-dark .rh-notify-cat,
body.dark-mode .rh-notify-cat,
body.rh-dark-mode .rh-notify-cat {
    color: #999 !important;
}

body.color-dark .rh-notify-notes,
body.theme-dark .rh-notify-notes,
body.dark-mode .rh-notify-notes,
body.rh-dark-mode .rh-notify-notes {
    background: #2a2a2a !important;
    border-color: #444 !important;
    color: #b0b0b0 !important;
}

body.color-dark .rh-notify-btn,
body.theme-dark .rh-notify-btn,
body.dark-mode .rh-notify-btn,
body.rh-dark-mode .rh-notify-btn {
    background: #5b9bd5 !important;
}
