* { 
    box-sizing: border-box; 
}

body { 
    background: #f8f9fa; /* 极浅的底灰，衬托高级感 */
    padding: 16px; 
    margin: 0; 
    font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; 
    color: #1c1c1c; /* 全局基础普通文字：纯正的黑 */
}

/* ==========================================
   1. 顶栏与全局基础容器
   ========================================== */
.header-bar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #fff; 
    padding: 12px 20px; 
    border-radius: 8px; 
    border: 1px solid #e5e5e5; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03); 
}

.search-container { 
    margin: 16px 0 24px 0; 
    background: #fff;
    border: 1px solid #e5e5e5; 
    border-radius: 8px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.search-form { 
    display: flex; 
    gap: 8px; 
}

.input-field {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    color: #1c1c1c;
    border: 1px solid #dcdcdc;
    border-radius: 4px;
    background-color: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    flex: 1;
}

/* 焦点状态：高级金描边 */
.input-field:focus {
    border-color: #D4AF37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.15);
}

.section-title { 
    font-size: 18px; 
    font-weight: 700; 
    margin: 24px 0 14px 0; 
    color: #1c1c1c; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

/* ==========================================
   2. 统一按钮系统（绸缎紫底 + 金字）
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: #F2D27A; /* 金字 */
    background: linear-gradient(135deg, #5B3287 0%, #3D1F5C 100%); /* 深邃绸缎紫渐变 */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 6px rgba(61, 31, 92, 0.3);
    text-decoration: none;
}

.btn:hover {
    background: linear-gradient(135deg, #4A286E 0%, #2A1342 100%);
    color: #FFE699; /* 悬浮时金色更明亮 */
    box-shadow: 0 4px 10px rgba(61, 31, 92, 0.4);
    transform: translateY(-1px);
}

.btn:active {
    background: #2A1342;
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
}

.btn-sm {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn.is-preparing {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: wait;
    opacity: 0.92;
}

.btn.is-preparing::before {
    content: '';
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border: 2px solid rgba(242, 210, 122, 0.35);
    border-top-color: #F2D27A;
    border-radius: 50%;
    animation: download-button-spin 0.75s linear infinite;
}

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

.btn-outline {
    background: #ffffff !important;
    color: #1c1c1c !important;
    border: 1px solid #1c1c1c !important;
    box-shadow: none;
}

.btn-outline:hover {
    background: #1c1c1c !important;
    color: #D4AF37 !important; /* 黑底金字 */
}

.btn-disabled {
    background: #e5e5e5 !important;
    color: #999999 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* ==========================================
   3. 核心 Grid 媒体卡片矩阵
   ========================================== */
.media-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, 180px); 
    gap: 16px; 
    justify-content: start; 
    align-items: stretch;
}

@media (max-width: 480px) {
    .media-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* ==========================================
   优云宝收银台（统一紫金主题）
   ========================================== */
.yyb-page {
    max-width: 680px;
    margin: 18px auto 32px;
}

.yyb-card {
    padding: 20px 22px;
    text-align: center;
    background: #fff;
    border: 1px solid rgba(91, 50, 135, 0.22);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(61, 31, 92, 0.08);
}

.yyb-title {
    margin: 0 0 6px;
    color: #1f2328;
    font-size: 22px;
    line-height: 1.35;
}

.yyb-order-line,
.yyb-help,
.yyb-countdown {
    color: #57606a;
}

.yyb-order-line {
    margin: 0 0 8px;
    font-size: 13px;
}

.yyb-order-line code,
.yyb-copy-row code,
.yyb-account-row code {
    color: #1f2328;
    font-size: 14px;
    font-weight: 700;
}

.yyb-match-panel {
    margin: 14px 0;
    padding: 14px;
    text-align: left;
    background: linear-gradient(145deg, #fbf8ff 0%, #f3ecfa 100%);
    border: 1px solid rgba(91, 50, 135, 0.24);
    border-radius: 10px;
}

.yyb-match-panel > h2 {
    margin: 0;
    color: #1f2328;
    font-size: 16px;
    text-align: center;
}

.yyb-match-tip {
    margin: 4px 0 10px;
    color: #57606a;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
}

.yyb-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.yyb-choice {
    display: flex;
    gap: 9px;
    padding: 11px;
    background: #fff;
    border: 1px solid #d9c9e8;
    border-radius: 8px;
}

.yyb-choice-primary {
    border-color: #8b62ae;
    box-shadow: inset 3px 0 0 #5B3287;
}

.yyb-choice-number {
    display: inline-flex;
    flex: 0 0 25px;
    width: 25px;
    height: 25px;
    align-items: center;
    justify-content: center;
    color: #F2D27A;
    background: linear-gradient(135deg, #5B3287, #3D1F5C);
    border-radius: 50%;
    font-weight: 700;
}

.yyb-choice h3,
.yyb-direct-transfer h3 {
    margin: 1px 0 4px;
    color: #24292f;
    font-size: 14px;
}

.yyb-choice p,
.yyb-direct-transfer p {
    margin: 0;
    color: #24292f;
    font-size: 12px;
    line-height: 1.5;
}

.yyb-copy-row,
.yyb-account-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 7px;
}

.yyb-direct-transfer {
    margin-top: 10px;
    padding: 11px;
    background: #fffdf5;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 8px;
}

.yyb-amount {
    margin: 6px 0 8px;
    color: #cf222e;
    font-size: 22px;
    font-weight: 800;
}

.yyb-qrcode {
    display: flex;
    width: 200px;
    min-height: 200px;
    margin: 8px auto 6px;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #fff;
    border: 2px solid #5B3287;
    border-radius: 8px;
}

.yyb-open-link {
    display: inline-block;
    margin: 2px auto 5px;
    color: #0969da;
    font-weight: 700;
}

.yyb-unavailable {
    margin: 24px auto;
    padding: 28px 16px;
    color: #6b6075;
    background: #faf8fc;
    border: 1px dashed #8b62ae;
    border-radius: 8px;
}

.yyb-status {
    margin: 10px 0 7px;
    padding: 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
}

.yyb-status-waiting {
    color: #24292f;
    background: #f3ecfa;
    border: 1px solid #bda2d3;
}

.yyb-status-success {
    color: #116329;
    background: #dafbe1;
    border: 1px solid #4ac26b;
}

.yyb-status-error {
    color: #a40e26;
    background: #ffebe9;
    border: 1px solid #ff8182;
}

.yyb-help {
    margin: 7px 0 10px;
    font-size: 12px;
}

.yyb-countdown {
    margin: 5px 0 0;
    font-size: 12px;
}

.yyb-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.yyb-hidden {
    display: none !important;
}

/* Payment waiting/review page — shared purple-gold theme */
.payment-waiting-page {
    max-width: 640px;
    margin: 24px auto 40px;
    padding: 28px;
    text-align: center;
    color: #24292f;
    background: #fff;
    border: 1px solid rgba(91, 50, 135, 0.24);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(61, 31, 92, 0.09);
}

.payment-waiting-instructions,
.payment-waiting-edit,
.payment-waiting-order-card {
    padding: 18px;
    margin-bottom: 22px;
    text-align: left;
    background: linear-gradient(145deg, #fbf8ff 0%, #f3ecfa 100%);
    border: 1px solid rgba(91, 50, 135, 0.28);
    border-radius: 9px;
}

.payment-waiting-instructions h3,
.payment-waiting-edit h3 {
    margin: 0 0 8px;
    color: #3D1F5C;
}

.payment-waiting-instructions code,
.payment-waiting-instructions [style*="font-family:monospace"] {
    color: #3D1F5C;
}

.payment-waiting-edit input {
    background: #fff;
    border-color: #bda2d3 !important;
}

.payment-waiting-edit input:focus {
    border-color: #5B3287 !important;
    outline: 2px solid rgba(91, 50, 135, 0.14);
}

.payment-waiting-title {
    margin: 0 0 10px;
    color: #3D1F5C;
}

.payment-waiting-spinner {
    width: 50px;
    height: 50px;
    animation: rotate 2s linear infinite;
}

.payment-waiting-order-card {
    margin: 25px 0;
    font-size: 13px;
}

.payment-waiting-order-card li:first-child {
    border-bottom-color: #bda2d3 !important;
}

.payment-waiting-polling {
    color: #5B3287;
    font-size: 14px;
    font-weight: 700;
}

.payment-waiting-page .btn-back {
    color: #5B3287;
    border-color: #8b62ae;
}

.payment-return-btn {
    color: #5B3287;
    background: #fff;
    border-color: #8b62ae;
}

.payment-return-btn:hover {
    color: #fff;
    background: #5B3287;
    border-color: #5B3287;
}

/* Gift card order tutorial */
.gift-guide-page {
    max-width: 760px;
    margin: 24px auto 40px;
    padding: 28px;
    color: #24292f;
    background: #fff;
    border: 1px solid rgba(91, 50, 135, 0.25);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(61, 31, 92, 0.09);
}

.gift-guide-header {
    padding-bottom: 18px;
    border-bottom: 2px solid #eee4f6;
}

.gift-guide-header h1 {
    margin: 0 0 8px;
    color: #3D1F5C;
    font-size: 26px;
}

.gift-guide-header p {
    margin: 0;
    color: #57606a;
    line-height: 1.65;
}

.gift-guide-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0 22px;
}

.gift-guide-summary > div {
    min-width: 0;
    padding: 13px;
    background: #f7f1fb;
    border: 1px solid #dbc9e8;
    border-radius: 8px;
}

.gift-guide-summary span,
.gift-guide-values dt {
    display: block;
    margin-bottom: 5px;
    color: #6f5684;
    font-size: 12px;
    font-weight: 700;
}

.gift-guide-summary strong,
.gift-guide-values dd {
    margin: 0;
    color: #24292f;
    overflow-wrap: anywhere;
}

.gift-guide-steps {
    counter-reset: gift-guide-step;
    padding: 0;
    margin: 0;
    list-style: none;
}

.gift-guide-steps > li {
    position: relative;
    margin-bottom: 13px;
    padding: 16px 16px 16px 58px;
    background: linear-gradient(145deg, #fcfaff, #f5eefb);
    border: 1px solid #dbc9e8;
    border-radius: 9px;
}

.gift-guide-steps > li::before {
    counter-increment: gift-guide-step;
    content: counter(gift-guide-step);
    position: absolute;
    top: 16px;
    left: 16px;
    width: 28px;
    height: 28px;
    color: #f7d96b;
    background: #5B3287;
    border-radius: 50%;
    font-weight: 800;
    line-height: 28px;
    text-align: center;
}

.gift-guide-steps h2 {
    margin: 1px 0 8px;
    color: #3D1F5C;
    font-size: 17px;
}

.gift-guide-steps p {
    margin: 0;
    color: #57606a;
    line-height: 1.6;
}

.gift-guide-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin: 12px 0 0;
}

.gift-guide-values > div,
.gift-guide-emphasis,
.gift-guide-code {
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #cbb4dc;
    border-radius: 7px;
}

.gift-guide-emphasis,
.gift-guide-code {
    margin-top: 9px !important;
    color: #3D1F5C !important;
    font-size: 18px;
    font-weight: 800;
    user-select: all;
}

.gift-guide-code {
    font-family: monospace;
}

.gift-copy-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.gift-copy-value {
    flex: 1;
    min-width: 0;
    padding: 9px 10px;
    color: #3D1F5C;
    background: #f8f5fb;
    border: 1px solid #dbc9e8;
    border-radius: 6px;
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    overflow-wrap: anywhere;
    user-select: all;
}

.gift-copy-button {
    flex: 0 0 auto;
    padding: 6px 9px;
    color: #5B3287;
    background: #fff;
    border: 1px solid #9c78ba;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.gift-copy-button:hover,
.gift-copy-button.is-copied {
    color: #fff;
    background: #5B3287;
    border-color: #5B3287;
}

.gift-guide-links,
.gift-guide-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 14px;
}

/* Pending orders shown below the points packages */
.bonus-pending-orders {
    margin-top: 34px;
    padding: 20px;
    text-align: left;
    background: linear-gradient(145deg, #fbf8ff, #f3ecfa);
    border: 1px solid rgba(91, 50, 135, 0.3);
    border-radius: 12px;
}

.bonus-pending-heading {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 14px;
    border-bottom: 1px solid #dbc9e8;
}

.bonus-pending-heading > span {
    font-size: 21px;
}

.bonus-pending-heading h2 {
    margin: 0 0 4px;
    color: #3D1F5C;
    font-size: 18px;
}

.bonus-pending-heading p,
.bonus-order-item p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.55;
}

.bonus-order-day {
    margin-top: 17px;
}

.bonus-order-day h3 {
    margin: 0 0 8px;
    color: #6f5684;
    font-size: 13px;
}

.bonus-order-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.bonus-order-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #d6c2e5;
    border-radius: 8px;
}

.bonus-order-item strong {
    display: block;
    margin-bottom: 4px;
    color: #24292f;
    font-size: 14px;
}

/* Profile payment status and order history */
.profile-paid-line {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 7px;
    color: #666;
    font-size: 14px;
}

.profile-paid-badge,
.profile-order-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.profile-paid-badge.is-paid,
.profile-order-status.is-paid {
    color: #116329;
    background: #dafbe1;
    border: 1px solid #4ac26b;
}

.profile-paid-badge.is-unpaid,
.profile-order-status.is-pending {
    color: #6f5684;
    background: #f3ecfa;
    border: 1px solid #cbb4dc;
}

.profile-order-status.is-rejected {
    color: #a40e26;
    background: #ffebe9;
    border: 1px solid #ff8182;
}

.profile-payment-card {
    padding: 24px;
}

.profile-payment-heading {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.profile-payment-heading h3 {
    margin: 0 0 4px;
    color: #3D1F5C;
    font-size: 17px;
}

.profile-payment-heading p {
    margin: 0;
    color: #6b7280;
    font-size: 12px;
}

.profile-payment-list {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.profile-payment-item {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    padding: 13px 14px;
    background: linear-gradient(145deg, #fcfaff, #f5eefb);
    border: 1px solid #dbc9e8;
    border-radius: 8px;
}

.profile-payment-main,
.profile-payment-side {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-payment-main > strong {
    color: #24292f;
    font-family: monospace;
}

.profile-payment-main > span,
.profile-payment-main > small {
    color: #6b7280;
    font-size: 12px;
}

.profile-payment-side {
    align-items: flex-end;
    flex: 0 0 auto;
}

.profile-payment-side > strong {
    color: #3D1F5C;
}

.profile-payment-side > a {
    color: #5B3287;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.profile-payment-empty {
    padding: 24px;
    color: #777;
    text-align: center;
    background: #faf8fc;
    border: 1px dashed #cbb4dc;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .yyb-page {
        margin: 10px auto 22px;
    }

    .yyb-card {
        padding: 15px 14px;
    }

    .yyb-match-panel {
        padding: 12px;
    }

    .yyb-title {
        font-size: 19px;
    }

    .yyb-choice-grid {
        grid-template-columns: 1fr;
    }

    .yyb-actions,
    .yyb-actions .btn {
        width: 100%;
    }

    .payment-waiting-page {
        margin: 10px auto 24px;
        padding: 18px 14px;
    }

    .payment-waiting-instructions,
    .payment-waiting-edit,
    .payment-waiting-order-card {
        padding: 14px;
    }

    .gift-guide-page {
        margin: 10px auto 24px;
        padding: 18px 14px;
    }

    .gift-guide-header h1 {
        font-size: 22px;
    }

    .gift-guide-summary,
    .gift-guide-values {
        grid-template-columns: 1fr;
    }

    .gift-guide-steps > li {
        padding: 14px 12px 14px 50px;
    }

    .gift-guide-steps > li::before {
        top: 14px;
        left: 12px;
    }

    .gift-guide-actions .btn {
        width: 100%;
        box-sizing: border-box;
    }

    .gift-copy-row {
        align-items: stretch;
        flex-direction: column;
    }

    .gift-copy-button {
        width: 100%;
    }

    .bonus-pending-orders {
        padding: 15px 12px;
    }

    .bonus-order-item {
        align-items: stretch;
        flex-direction: column;
    }

    .bonus-order-item .btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .profile-payment-heading,
    .profile-payment-item {
        align-items: stretch;
        flex-direction: column;
    }

    .profile-payment-heading .btn {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .profile-payment-side {
        align-items: flex-start;
    }
}

.card { 
    background: #fff; 
    border: 1px solid #eaeaea; 
    border-radius: 6px; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 6px 16px rgba(0,0,0,0.08); 
    border-color: #dcdcdc;
}

.card-img-wrapper { 
    position: relative; 
    width: 100%; 
    height: 220px; 
    overflow: hidden; 
    background: #111; 
}

.card-img-wrapper img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.4s ease, object-fit 0.4s ease; 
}

.card-img-wrapper:hover img { 
    object-fit: contain !important; 
    transform: scale(1.03); 
}

.card-img-wrapper.has-screenshots { cursor: pointer; }
.card-img-wrapper.no-screenshots { cursor: default; }

.badge-shot {
    position: absolute; 
    top: 8px; 
    right: 8px;
    background: rgba(28,28,28,0.85); 
    color: #D4AF37; /* 黑底金字 */
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px; 
    border-radius: 2px; 
    pointer-events: none; 
    backdrop-filter: blur(4px);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.card-info { 
    padding: 12px 10px; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    flex-grow: 1; 
}

.card-title { 
    font-size: 13px; 
    font-weight: 600; 
    color: #1c1c1c; 
    line-height: 1.5; 
    height: 39px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    display: -webkit-box; 
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical; 
    margin-bottom: 8px; 
}

.card-meta { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    font-size: 11px; 
    color: #666; 
}

.lock-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(28, 28, 28, 0.75);
    color: #F2D27A;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* ==========================================
   4. 🚀 现代化独立卡片分页
   ========================================== */
.custom-pg-container {
    margin: 30px 0 20px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
}

.custom-pg-info {
    font-size: 14px !important;
    color: #666 !important;
    text-align: center !important;
}

.custom-pg-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-wrap: wrap !important;
}

.c-pg-btn, .c-pg-num {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #1c1c1c !important;
    background-color: #ffffff !important;
    border: 1px solid #dcdcdc !important;
    border-radius: 4px !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    user-select: none !important;
    cursor: pointer !important;
}

.c-pg-num {
    min-width: 36px !important;
    padding: 0 10px !important;
}

.c-pg-btn:hover:not(.disabled), .c-pg-num:hover:not(.active) {
    background-color: #1c1c1c !important;
    border-color: #1c1c1c !important;
    color: #D4AF37 !important; /* 悬浮时变成黑底金字 */
}

.c-pg-num.active {
    background-color: #4A286E !important; /* 绸缎紫底 */
    border-color: #4A286E !important;
    color: #F2D27A !important; /* 金字 */
    box-shadow: 0 2px 6px rgba(74, 40, 110, 0.3) !important;
}

.c-pg-btn.disabled {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    border-color: #e5e5e5 !important;
    cursor: not-allowed !important;
}

.c-pg-dots {
    color: #666 !important;
    font-weight: bold !important;
    padding: 0 4px !important;
}

.c-pg-select {
    height: 36px !important;
    padding: 0 32px 0 12px !important;
    color: #3D1F5C !important;
    background-color: #ffffff !important;
    border: 1px solid #9c78ba !important;
    border-radius: 4px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
}

.c-pg-select:focus {
    border-color: #5B3287 !important;
    outline: 2px solid rgba(91, 50, 135, 0.16) !important;
}

@media (max-width: 480px) {
    .custom-pg-controls,
    .c-pg-select {
        width: 100% !important;
    }

    .c-pg-btn {
        flex: 1 1 0 !important;
    }
}

/* ==========================================
   5. 全屏剧照预览弹窗
   ========================================== */
.modal-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100vw; 
    height: 100vh;
    background: rgba(17,17,17,0.95); 
    display: none; 
    justify-content: center; 
    align-items: center;
    z-index: 9999; 
    backdrop-filter: blur(8px);
}

.modal-body { 
    max-width: 90vw; 
    max-height: 90vh; 
    overflow-y: auto; 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    padding: 20px; 
}

.modal-body img { 
    width: 100%; 
    border-radius: 4px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.8); 
}

.modal-close { 
    position: absolute; 
    top: 20px; 
    right: 25px; 
    color: #D4AF37; 
    font-size: 32px; 
    cursor: pointer; 
    font-weight: 300; 
}

/* ==========================================
   6. 👤 顶栏用户导航下拉菜单样式
   ========================================== */
.user-nav-dropdown {
    position: relative;
    display: inline-block;
}

.user-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    background: #fff;
    border: 1px solid #dcdcdc;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #1c1c1c;
    transition: all 0.2s ease;
}

.user-nav-btn:hover {
    background: #1c1c1c;
    color: #D4AF37;
    border-color: #1c1c1c;
}

.user-nav-btn .user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 200px;
    z-index: 1000;
    padding: 6px 0;
}

.user-dropdown-menu.show {
    display: block !important;
}

.user-dropdown-header {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown-header .name {
    font-size: 13px;
    font-weight: 700;
    color: #1c1c1c;
}

.user-dropdown-header .points {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    color: #1c1c1c;
    text-decoration: none;
    transition: background 0.2s ease;
}

.user-dropdown-item:hover {
    background: #f5f5f5;
    color: #000;
}

.user-dropdown-item.danger {
    color: #1c1c1c;
    font-weight: 600;
}

.user-dropdown-item.danger:hover {
    background: #1c1c1c;
    color: #fff;
}

.user-dropdown-divider {
    border-top: 1px solid #f0f0f0;
    margin: 4px 0;
}

/* ==========================================
   7. ✨ 头像徽章与高亮
   ========================================== */
.user-avatar-badge {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #1c1c1c; /* 黑底 */
    color: #D4AF37;     /* 金字 */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

.user-avatar-badge.vip-badge {
    background: linear-gradient(135deg, #E6C27A 0%, #D4AF37 100%);
    color: #1c1c1c;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.4);
}

.vip-mini-tag {
    font-size: 10px;
    font-weight: 800;
    background: #1c1c1c;
    color: #D4AF37;
    padding: 2px 5px;
    border-radius: 2px;
    line-height: 1;
}

.dropdown-chevron {
    transition: transform 0.2s ease;
}

/* =========================================
   8. 最近搜索记录与热搜风云榜
   ========================================= */
.recent-searches-container {
    margin-top: 16px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.recent-searches-label {
    display: flex;
    align-items: center;
    font-size: 16px;
    color: #1c1c1c;
    font-weight: 700;
    user-select: none;
}

.search-history-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-history-tag {
    display: inline-block;
    font-size: 14px;
    color: #1c1c1c;
    background-color: #fff;
    border: 1px solid #dcdcdc;
    padding: 4px 16px;
    border-radius: 20px;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.search-history-tag:hover {
    background-color: #1c1c1c; /* 黑底 */
    color: #D4AF37;           /* 金字 */
    border-color: #1c1c1c;
}

.rankings-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rankings-header {
    text-align: center;
    margin-bottom: 35px;
}

.rankings-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #1c1c1c;
    margin-bottom: 8px;
}

.rankings-board {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #eaeaea;
    overflow: hidden;
}

.rankings-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.rankings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.rankings-item:nth-child(even) {
    border-right: none;
}

.rankings-item:hover {
    background-color: #fafafa;
}

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 14px;
    margin-right: 16px;
    background-color: #f5f5f5;
    color: #666;
}

.rank-1 { background-color: #D4AF37; color: #1c1c1c; }
.rank-2 { background-color: #1c1c1c; color: #D4AF37; }
.rank-3 { background-color: #4A286E; color: #F2D27A; }

.rankings-keyword {
    font-size: 16px;
    font-weight: 600;
    color: #1c1c1c;
    text-decoration: none;
    transition: color 0.2s ease;
}

.rankings-keyword:hover {
    color: #D4AF37; 
}

.rankings-item-right {
    font-size: 13px;
    color: #999;
}

/* =========================================
   🚀 被遗漏的代码补全区
   ========================================= */

.search-count-icon {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    opacity: 0.7;
}

.rankings-empty {
    padding: 40px;
    text-align: center;
    color: #999;
    font-size: 15px;
    grid-column: span 2;
}

.rankings-footer {
    margin-top: 35px;
    text-align: center;
}

.btn-back {
    display: inline-block;
    padding: 10px 24px;
    background-color: #1c1c1c; /* 返回大按钮：黑底金字 */
    color: #D4AF37;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #D4AF37; /* 悬浮：金底黑字 */
    color: #1c1c1c;
    transform: translateY(-1px);
}

.site-footer {
    width: 100%;
    padding: 20px 16px 30px;
    margin-top: 28px;
    text-align: center;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.site-footer-home {
    text-decoration: none;
}

.site-footer-link {
    color: #6f5684;
    font-size: 13px;
    text-decoration: none;
}

.site-footer-link:hover {
    color: #4A286E;
    text-decoration: underline;
}

.lang-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #1c1c1c;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s;
}

.lang-item img {
    border-radius: 2px;
    box-shadow: 0 0 2px rgba(0,0,0,0.2);
}

.lang-item:hover {
    background-color: #f5f5f5;
}

@media (max-width: 768px) {
    .rankings-list {
        grid-template-columns: 1fr;
    }
    .rankings-item {
        border-right: none;
    }
    .rankings-empty {
        grid-column: span 1;
    }
}

/* =========================================
   9. 附加组件增强样式（配合 .btn 使用）
   ========================================= */
.keyword-link {
    margin-right: 4px;
    text-decoration: none;
    color: inherit;
}
.keyword-link:hover {
    color: #D4AF37;
}

.btn-magnet {
    background: #1c1c1c;
    color: #D4AF37;
}
.btn-magnet:hover {
    background: #2c2c2c;
    color: #F2D27A;
}

.btn-pan {
    box-shadow: 0 2px 10px rgba(74, 40, 110, 0.4);
    
}
/* ==========================================
   VIP 专属按钮样式 (紫金主题配套)
   ========================================== */
.btn-vip {
    background: linear-gradient(135deg, #E6C27A 0%, #D4AF37 100%) !important;
    color: #1c1c1c !important;
    border: none !important;
    font-weight: 700 !important;
    transition: all 0.3s ease;
}

.btn-vip:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

/* 兼容带图标的弹性布局 */
.btn-vip.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
@media (max-width: 480px) {
    /* 针对手机端表单按钮让其 100% 宽度 */
    form[action*="claim_reward"] .btn {
        width: 100%;
        justify-content: center;
    }
}
