/**
 * 用户留存组件样式：收藏按钮 / 提醒弹窗 / 通知红点 / 我的收藏页
 * 配色沿用站点主题变量，无变量时回退到深色方案
 */

/* ============ Toast 提示 ============ */
.rt-toast {
    position: fixed;
    left: 50%;
    bottom: 40px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(20, 25, 40, .95);
    color: #fff;
    padding: 13px 26px;
    border-radius: 26px;
    font-size: 14px;
    z-index: 2147483647;
    opacity: 0;
    transition: opacity .3s, transform .3s;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .3);
    max-width: 86vw;
    text-align: center;
}
.rt-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.rt-toast-error { background: rgba(200, 40, 50, .96); }

/* ============ 收藏 / 提醒 按钮 ============ */
.rt-collect,
.rt-notify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 22px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 26px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    text-decoration: none;
    line-height: 1.2;
}
.rt-collect:hover,
.rt-notify:hover {
    background: rgba(255, 255, 255, .12);
    transform: translateY(-1px);
}
.rt-collect.collected {
    background: rgba(255, 193, 7, .16);
    border-color: rgba(255, 193, 7, .5);
    color: #ffc107;
}
.rt-notify.subscribed {
    background: rgba(34, 197, 94, .16);
    border-color: rgba(34, 197, 94, .5);
    color: #4ade80;
}
.rt-notify-primary {
    background: linear-gradient(135deg, #e94560 0%, #f27121 100%);
    border-color: transparent;
    box-shadow: 0 6px 18px rgba(233, 69, 96, .28);
}
.rt-notify-primary:hover { box-shadow: 0 8px 24px rgba(233, 69, 96, .38); }
.rt-icon { font-size: 16px; line-height: 1; }

/* 卡片角标式收藏按钮（列表页用） */
.rt-collect-mini {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    backdrop-filter: blur(4px);
    font-size: 17px;
    z-index: 3;
}
.rt-collect-mini:hover { background: rgba(0, 0, 0, .72); }
.rt-collect-mini .rt-text { display: none; }

/* ============ 通知红点 ============ */
.rt-badge {
    display: none;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: #e94560;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
    vertical-align: top;
    margin-left: 4px;
}

/* ============ 提醒订阅弹窗 ============ */
.rt-modal {
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background: rgba(5, 8, 20, .76);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2147483000;
    padding: 20px;
}
.rt-modal.show { display: flex; }
.rt-modal-box {
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #10182b;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, .4);
}
.rt-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.rt-modal-title { margin: 0; font-size: 18px; color: #fff; }
.rt-modal-desc {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
    line-height: 1.65;
}
.rt-modal-close {
    flex-shrink: 0;
    width: 34px; height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
}
.rt-modal-close:hover { background: rgba(255, 255, 255, .16); }
.rt-modal-body { padding: 22px 24px; }
.rt-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 22px;
}

.rt-item-box {
    padding: 13px 15px;
    margin-bottom: 18px;
    background: rgba(255, 255, 255, .04);
    border-radius: 9px;
}
.rt-item-title { color: #fff; font-size: 14px; font-weight: 600; line-height: 1.5; }
.rt-item-price { margin-top: 5px; color: #e94560; font-size: 15px; font-weight: 700; }

.rt-field { margin-bottom: 16px; }
.rt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.rt-label {
    display: block;
    margin-bottom: 7px;
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
    font-weight: 600;
}
.rt-req { color: #e94560; }
.rt-input {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}
.rt-input:focus {
    outline: none;
    border-color: #e94560;
    background: rgba(255, 255, 255, .08);
}
.rt-input::placeholder { color: rgba(255, 255, 255, .3); }
.rt-input option { background: #10182b; color: #fff; }
.rt-hint {
    margin-top: 6px;
    color: rgba(255, 255, 255, .42);
    font-size: 12px;
    line-height: 1.55;
}

.rt-alert {
    display: none;
    margin-top: 14px;
    padding: 11px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
}
.rt-alert.show { display: block; }
.rt-alert.error {
    background: rgba(239, 68, 68, .14);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, .28);
}
.rt-alert.success {
    background: rgba(34, 197, 94, .14);
    color: #bbf7d0;
    border: 1px solid rgba(34, 197, 94, .28);
}

.rt-btn {
    padding: 11px 26px;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
}
.rt-btn:disabled { opacity: .6; cursor: not-allowed; }
.rt-btn-primary {
    background: linear-gradient(135deg, #e94560 0%, #f27121 100%);
    color: #fff;
}
.rt-btn-primary:hover:not(:disabled) { box-shadow: 0 6px 20px rgba(233, 69, 96, .35); }
.rt-btn-ghost {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
}
.rt-btn-ghost:hover { background: rgba(255, 255, 255, .14); }

/* ============ 我的收藏 / 我的提醒 / 消息中心 ============ */
.rt-page { padding: 40px 0 60px; }
.rt-page-head { margin-bottom: 26px; }
.rt-page-title { margin: 0 0 8px; font-size: 26px; color: var(--text, #fff); }
.rt-page-desc { margin: 0; color: var(--text-secondary, rgba(255,255,255,.6)); font-size: 14px; }

.rt-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.rt-tab {
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 20px;
    color: var(--text-secondary, rgba(255,255,255,.7));
    text-decoration: none;
    font-size: 14px;
    transition: all .25s;
}
.rt-tab:hover { background: rgba(255, 255, 255, .07); }
.rt-tab.active {
    background: #e94560;
    border-color: #e94560;
    color: #fff;
    font-weight: 600;
}
.rt-tab-count { opacity: .75; font-size: 12px; margin-left: 3px; }

.rt-list { display: grid; gap: 16px; }
.rt-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--secondary, rgba(255,255,255,.04));
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    transition: all .25s;
}
.rt-card:hover { border-color: rgba(233, 69, 96, .35); transform: translateY(-2px); }
.rt-card-img {
    flex-shrink: 0;
    width: 110px;
    height: 82px;
    object-fit: cover;
    border-radius: 8px;
    background: rgba(255, 255, 255, .05);
}
.rt-card-body { flex: 1; min-width: 0; }
.rt-card-title {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
    font-weight: 600;
}
.rt-card-title a { color: var(--text, #fff); text-decoration: none; }
.rt-card-title a:hover { color: #e94560; }
.rt-card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary, rgba(255,255,255,.55));
    font-size: 13px;
}
.rt-card-price { color: #e94560; font-size: 17px; font-weight: 700; }
.rt-card-price-old { text-decoration: line-through; color: rgba(255,255,255,.4); font-size: 13px; font-weight: 400; }
.rt-drop-tag {
    display: inline-block;
    padding: 3px 9px;
    background: rgba(34, 197, 94, .18);
    color: #4ade80;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
}
.rt-card-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
}
.rt-mini-btn {
    padding: 7px 14px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, .75);
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    text-align: center;
}
.rt-mini-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.rt-mini-btn.danger:hover {
    background: rgba(239, 68, 68, .16);
    border-color: rgba(239, 68, 68, .4);
    color: #fca5a5;
}

.rt-empty {
    padding: 64px 24px;
    text-align: center;
    color: var(--text-secondary, rgba(255,255,255,.5));
}
.rt-empty-icon { font-size: 52px; margin-bottom: 16px; opacity: .55; }
.rt-empty-text { font-size: 15px; line-height: 1.8; margin-bottom: 22px; }

/* 消息列表 */
.rt-notice {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: var(--secondary, rgba(255,255,255,.04));
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
}
.rt-notice.unread {
    border-left: 3px solid #e94560;
    background: rgba(233, 69, 96, .05);
}
.rt-notice-icon { flex-shrink: 0; font-size: 22px; line-height: 1.3; }
.rt-notice-body { flex: 1; min-width: 0; }
.rt-notice-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text, #fff);
}
.rt-notice-content {
    margin: 0 0 8px;
    color: var(--text-secondary, rgba(255,255,255,.65));
    font-size: 13px;
    line-height: 1.7;
}
.rt-notice-time { color: rgba(255, 255, 255, .38); font-size: 12px; }

.rt-pager { margin-top: 30px; text-align: center; }
.rt-pager a, .rt-pager span {
    display: inline-block;
    padding: 8px 16px;
    margin: 0 4px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 18px;
    color: var(--text-secondary, rgba(255,255,255,.7));
    text-decoration: none;
    font-size: 13px;
}
.rt-pager a:hover { background: rgba(255, 255, 255, .08); }
.rt-pager span.current { background: #e94560; border-color: #e94560; color: #fff; }

/* ============ 响应式 ============ */
@media (max-width: 640px) {
    .rt-grid { grid-template-columns: 1fr; }
    .rt-modal-box { max-height: 92vh; }
    .rt-modal-head { padding: 18px 18px 14px; }
    .rt-modal-body { padding: 18px; }
    .rt-modal-foot { padding: 14px 18px 18px; }
    .rt-card { flex-direction: column; }
    .rt-card-img { width: 100%; height: 160px; }
    .rt-card-actions { flex-direction: row; }
    .rt-collect, .rt-notify { padding: 10px 16px; font-size: 13px; }
    .rt-page-title { font-size: 21px; }
}
