﻿/*
 * 文件: css/user-center.css
 * 版本: 1.12.1
 * 最后修改: 2026-04-29
 * 修改记录:
 * 2026-04-29 v1.12.1 - 资产页主内容增加暗色遮罩层，弱化背景图中图片元素干扰
 * 2026-04-29 v1.12.0 - 资产页样式整体回退并对齐参考版，仅保留分页与无图占位功能补丁
 * 2026-04-29 v1.11.0 - 资产页背景改为纯渐变参考底（取消背景大图），彻底排除底图异常
 * 2026-04-29 v1.10.0 - 资产页背景改为稳定底图资源，修复 theme_assets_bg 显示异常
 */
@import url('./theme.css');

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    background: var(--user-page-bg);
    color: #fff;
}
body.page-account,
body.page-orders,
body.page-assets {
    overflow: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.user-page {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 20px;
    height: 100vh;
    padding: 16px 16px 18px;
    overflow: hidden;
}

.left-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.left-nav > a:first-child {
    width: 62px;
    min-height: 62px;
    border: 0;
    background: transparent;
    padding: 0;
}

.mini-logo {
    width: 44px;
    height: 44px;
    margin-bottom: 8px;
    border-radius: 10px;
    object-fit: contain;
    object-position: center;
}

.left-nav a {
    width: 50px;
    min-height: 62px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    gap: 4px;
    color: rgba(255,255,255,.58);
}
.left-nav a:nth-of-type(2)::before { content: "◔"; font-size: 22px; }
.left-nav a:nth-of-type(3)::before { content: "✎"; font-size: 22px; }
.left-nav a:nth-of-type(4)::before { content: "◧"; font-size: 22px; }
.left-nav a:nth-of-type(5)::before { content: "▣"; font-size: 22px; }
.left-nav a:nth-of-type(7)::before { content: "◈"; font-size: 22px; }
.left-nav a:nth-of-type(8)::before { content: "◉"; font-size: 22px; }
.left-nav a.active { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #fff; }
.left-nav .spacer { flex: 1; }

.main-content {
    height: 100%;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 16px;
    padding: 20px;
    background: linear-gradient(180deg, var(--panel-overlay-start), var(--panel-overlay-end));
    overflow: auto;
}

body.page-account .main-content {
    background: linear-gradient(180deg, var(--page-overlay-start), var(--page-overlay-end)), url('../images/theme_account_bg.png') center/cover no-repeat;
}
body.page-orders .main-content {
    background: linear-gradient(180deg, var(--page-overlay-start), var(--page-overlay-end)), url('../images/theme_orders_bg.png') center/cover no-repeat;
}
body.page-assets .main-content {
    background: linear-gradient(180deg, var(--page-overlay-start), var(--page-overlay-end)), url('../images/theme_assets_bg.png') center/cover no-repeat;
    position: relative;
}
body.page-assets .main-content::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(10, 5, 9, .78), rgba(10, 5, 9, .86));
}
body.page-assets .main-content > * {
    position: relative;
    z-index: 1;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.page-title-group {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.page-title-group h1 {
    margin: 0;
    font-size: 40px;
    line-height: 1;
    font-weight: 700;
}

.page-title-group p {
    margin: 0;
    color: rgba(255,255,255,.4);
    font-size: 14px;
}

.page-title-group.with-back { align-items: center; }
.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(255,255,255,.05);
    color: #fff;
    font-size: 30px;
    line-height: 1;
}

.header-action {
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.07);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 20px;
}

.panel {
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,.06);
    background: var(--user-panel-bg);
    padding: 16px 18px;
}

.panel h3 { margin: 0 0 6px; font-size: 26px; }
.panel p { margin: 0 0 10px; color: rgba(255,255,255,.42); font-size: 14px; }

.account-layout {
    display: grid;
    grid-template-columns: minmax(620px, 42%) minmax(0, 58%);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 14px 22px;
    align-items: start;
    flex: 1;
    min-height: 0;
    overflow: visible;
}
.account-main .page-title-group h1 { font-size: 46px; }
.account-main .page-title-group p { font-size: 14px; }
.account-main {
    display: flex;
    flex-direction: column;
    overflow: auto;
}
.profile-card { grid-column: 1; border-color: rgba(var(--accent-rgb), .78); background: linear-gradient(180deg, var(--profile-card-start), var(--profile-card-end)); }
.redeem-card { grid-column: 1; }
.invite-card { grid-column: 1; }
.ledger-card {
    grid-column: 2;
    grid-row: 1 / span 3;
    min-height: 0;
    height: 100%;
    align-self: stretch;
    display: flex;
    flex-direction: column;
}

.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar-img { width: 92px; height: 92px; border-radius: 20px; border: 1px solid rgba(255,255,255,.2); }
.profile-head h2 { margin: 0 0 2px; font-size: 34px; line-height: 1.15; }
.profile-head p { margin: 0; font-size: 18px; color: rgba(255,255,255,.42); }

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.metric-box {
    border-radius: 18px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.05);
    padding: 14px 16px;
}
.metric-box span { display: block; color: rgba(255,255,255,.42); font-size: 15px; }
.metric-box strong { display: block; margin-top: 6px; font-size: 42px; line-height: 1; color: #fff; }
.metric-box:first-child strong { color: #ff684f; }

.inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 10px;
    margin-top: 10px;
}

.inline-form input,
.readonly-input,
.search-input {
    height: 56px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.06);
    background: rgba(255,255,255,.04);
    color: #fff;
    font-size: 18px;
    padding: 0 18px;
}
.inline-form button {
    border: 2px solid rgba(var(--accent-rgb), .75);
    background: var(--inline-btn-bg);
    color: #fff;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
}

.invite-card label { display: block; margin-top: 12px; color: rgba(255,255,255,.42); font-size: 14px; }
.table-title {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,.42);
    font-size: 14px;
}
.table-title em { font-style: normal; }

.table-wrap {
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
    overflow: auto;
}
.table-wrap.short { max-height: 286px; }
.table-wrap.tall { max-height: 900px; }
.invite-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.invite-card .table-wrap.short {
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
}
.ledger-card .table-wrap.tall {
    flex: 1;
    min-height: 0;
    max-height: none;
}

table { width: 100%; border-collapse: collapse; }
thead tr { background: rgba(255,255,255,.05); }
th, td { padding: 14px 12px; white-space: nowrap; font-size: 14px; }
th { color: rgba(255,255,255,.76); font-weight: 600; }
td { color: rgba(255,255,255,.9); }

.orders-main .panel h3,
.orders-main .panel p,
.assets-main .page-title-group h1,
.assets-main .page-title-group p,
.orders-main .page-title-group h1,
.orders-main .page-title-group p,
.orders-main .header-action,
.orders-main .stat-card span,
.orders-main .stat-card strong,
.assets-main .filter-group label,
.assets-main .filter-tabs button,
.assets-main .actions-bar button,
.assets-main .selected-tip,
.assets-main .assets-section h3,
.assets-main .work-actions button,
.assets-main .search-input,
.orders-main th,
.orders-main td,
.orders-main .back-link { font-size: initial; }

.orders-main .page-title-group h1 { font-size: 48px; }
.orders-main .page-title-group p { font-size: 14px; }
.orders-main .header-action { font-size: 16px; padding: 10px 24px; }
.orders-main .back-link { font-size: 30px; }

.stats-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat-card {
    border-radius: 14px;
    min-height: 98px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.1);
    position: relative;
    overflow: hidden;
}
.stat-card span { display: block; font-size: 14px; color: rgba(255,255,255,.9); }
.stat-card strong { display: block; margin-top: 8px; font-size: 42px; line-height: 1; }
.stat-card.s1 { background: linear-gradient(120deg, rgba(129,36,36,.85), rgba(129,36,36,.3)); }
.stat-card.s2 { background: linear-gradient(120deg, rgba(129,83,36,.85), rgba(129,83,36,.3)); }
.stat-card.s3 { background: linear-gradient(120deg, rgba(31,72,103,.92), rgba(31,72,103,.34)); }
.stat-card.s4 { background: linear-gradient(120deg, rgba(70,42,124,.92), rgba(70,42,124,.34)); }
.stat-card.s1 strong { color: #ff646c; }
.stat-card.s2 strong { color: #ff9f5c; }
.stat-card.s3 strong { color: #71d1ff; }
.stat-card.s4 strong { color: #9a6bff; }

.order-overview { min-height: 240px; margin-bottom: 16px; }
.order-overview .panel-desc {
    text-align: center;
    color: rgba(255,255,255,.18);
    margin-top: 60px;
    line-height: 1.6;
}
.order-table-panel th, .order-table-panel td { font-size: 30px; }

.filters-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.4fr) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 8px;
}
.filter-group label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: rgba(255,255,255,.56);
}
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs button {
    min-width: 90px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.55);
    font-size: 16px;
    padding: 0 16px;
}
.filter-tabs button.active {
    color: #fff;
    border-color: rgba(var(--accent-rgb), .8);
    background: rgba(var(--accent-rgb), .2);
}

.actions-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-input {
    width: 220px;
    height: 40px;
    border-radius: 10px;
    font-size: 14px;
    padding: 0 12px;
}
.actions-bar button {
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    padding: 0 14px;
}

.selected-tip {
    text-align: right;
    color: rgba(var(--accent-rgb), .95);
    font-size: 18px;
    margin: 6px 0 10px;
    opacity: 0;
}
body.batch-mode .selected-tip { opacity: 1; }

.assets-section { margin-top: 16px; }
.assets-section h3 { margin: 0 0 10px; font-size: 30px; }

.works-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}
.work-card {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.08);
    background: rgba(255,255,255,.02);
}
.work-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}
.work-card.selected {
    border-color: rgba(var(--accent-rgb), .9);
    box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), .7);
}

.asset-checkbox {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,.65);
    background: rgba(0,0,0,.46);
    display: none;
    cursor: pointer;
}
.asset-checkbox.checked {
    background: rgba(var(--accent-rgb), .95);
    border-color: rgba(var(--accent-rgb), .95);
}
body.batch-mode .asset-checkbox { display: block; }

.work-actions {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    gap: 6px;
}
.work-actions button {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 0;
    background: rgba(0,0,0,.44);
    color: #fff;
    font-size: 14px;
}

/* 购买弹窗（保留） */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: linear-gradient(180deg, rgba(30,15,20,.95), rgba(15,8,12,.98));
    border: 1px solid rgba(var(--accent-rgb),.4);
    border-radius: 20px;
    padding: 40px;
    max-width: 900px;
    width: 90%;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255,255,255,.1);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
}

.modal-header { text-align: center; margin-bottom: 32px; }
.modal-header h2 { margin: 0 0 8px; font-size: 28px; }
.modal-header p { margin: 0; font-size: 14px; color: rgba(255,255,255,.6); }
.modal-header .highlight { color: var(--accent); font-weight: bold; }

.package-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 32px; }
.package-card {
    background: rgba(20,12,16,.6);
    border: 2px solid rgba(255,255,255,.15);
    border-radius: 16px;
    padding: 24px;
    text-align: center;
}
.package-card.recommended {
    border-color: rgba(var(--accent-rgb),.7);
    background: linear-gradient(135deg, rgba(36,16,24,.84), rgba(20,12,16,.92));
    position: relative;
}
.package-card.recommended::before {
    content: '推荐';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    padding: 4px 16px;
    border-radius: 12px;
    font-size: 12px;
}
.package-label { font-size: 16px; color: rgba(255,255,255,.7); margin-bottom: 16px; }
.package-price { font-size: 48px; font-weight: bold; color: #fff; margin-bottom: 8px; }
.package-price small { font-size: 16px; color: rgba(255,255,255,.5); }
.package-bonus { font-size: 20px; color: var(--accent); font-weight: bold; margin-bottom: 20px; }
.package-bonus small { font-size: 14px; }
.package-features { list-style: none; padding: 0; margin: 0 0 24px; text-align: left; }
.package-features li {
    font-size: 13px;
    color: rgba(255,255,255,.6);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,.05);
}
.package-features li:last-child { border-bottom: none; }
.package-btn {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(var(--accent-rgb),.7);
    background: rgba(var(--accent-rgb),.2);
    color: #fff;
    font-size: 16px;
}
.package-card.recommended .package-btn { background: var(--accent); border-color: var(--accent); }

.payment-methods { display: flex; justify-content: center; gap: 16px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.payment-method {
    padding: 8px 20px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 8px;
    background: rgba(255,255,255,.05);
    font-size: 14px;
    color: rgba(255,255,255,.7);
    cursor: pointer;
}
.payment-method.active { border-color: var(--accent); background: rgba(var(--accent-rgb),.2); color: #fff; }

@media (max-width: 1600px) {
    .page-title-group h1 { font-size: 28px; }
    .profile-head h2 { font-size: 30px; }
    .profile-head p { font-size: 18px; }
    .metric-box span { font-size: 16px; }
    .metric-box strong { font-size: 40px; }
    .panel h3 { font-size: 24px; }
    .panel p { font-size: 14px; }
    .inline-form input,
    .readonly-input { font-size: 16px; height: 44px; }
    .inline-form button { font-size: 18px; }
    th, td { font-size: 14px; }
    .order-table-panel th, .order-table-panel td { font-size: 14px; }
    .works-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 1200px) {
    .user-page {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    body.page-account,
    body.page-orders,
    body.page-assets {
        overflow: auto;
    }
    .left-nav {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }
    .left-nav .spacer { display: none; }
    .main-content {
        height: auto;
        overflow: visible;
        padding: 14px;
    }
    .account-layout { grid-template-columns: 1fr; }
    .ledger-card { grid-column: 1; grid-row: auto; }
    .filters-row { grid-template-columns: 1fr; }
    .actions-bar { flex-wrap: wrap; }
    .works-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
    .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .works-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
}

/* stage1 动态功能最小补丁：不改变参考视觉，仅补足动态结构所需样式 */
.assets-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 12px;
}
.assets-pagination button {
    height: 38px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 14px;
    padding: 0 18px;
}
.assets-pagination button[hidden] { display: none !important; }

.work-placeholder {
    width: 100%;
    aspect-ratio: 3 / 4;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(35, 22, 29, .95), rgba(16, 10, 16, .98));
}
.work-placeholder span {
    font-size: 13px;
    color: rgba(255,255,255,.62);
    letter-spacing: .5px;
}
