/* 空状态 */
.profile-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:80px 20px; color:#999; background:#fff; border-radius:12px; width:100%; grid-column:1 / -1; text-align:center; }
.profile-empty .empty-title { font-size:18px; color:#333; margin-bottom:8px; }
.profile-empty .empty-desc  { font-size:13px; color:#bbb; margin-bottom:24px; }

.vip-badge { display:inline-block; padding:2px 10px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border-radius:10px; font-size:12px; margin-left:6px; }
.vip-badge.off { background:#999; }

.logout-btn { margin-top:14px; width:100%; padding:10px; background:#fff; border:1px solid #eee; border-radius:8px; color:#666; cursor:pointer; font-size:14px; transition:all .2s; }
.logout-btn:hover { background:#f6efff; color:#8f41e9; border-color:#8f41e9; }

.works-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: scroll;
    scrollbar-gutter: stable;
    padding-right: 4px;
}

.profile-content .video-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: max-content;
    align-items: start;
    align-content: start;
    gap: 10px;
    padding: 10px 0;
}

.profile-content .video-card {
    align-self: start;
    height: auto;
    min-height: max-content;
}

.works-scroll .loading-more {
    text-align: center;
    padding: 20px;
    color: #999;
    font-size: 14px;
}

.works-toolbar { display:flex; align-items:center; gap:12px; }
.works-search { display:flex; align-items:center; height:34px; border:1px solid #e5e5e5; border-radius:18px; overflow:hidden; background:#fff; }
.works-search input { width:180px; height:100%; border:0; outline:0; padding:0 12px; font-size:13px; color:#333; }
.works-search button { height:100%; border:0; padding:0 14px; background:#8f41e9; color:#fff; font-size:13px; cursor:pointer; }
.publish-work-btn { padding:8px 22px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border:none; border-radius:20px; font-size:13px; font-weight:600; cursor:pointer; }
.work-actions { display:flex; gap:8px; margin-top:8px; }
.work-actions .action-btn { flex:1; padding:6px 0; border:1px solid #eee; background:#fff; border-radius:6px; cursor:pointer; font-size:12px; color:#666; transition:all .2s; }
.work-actions .action-btn:hover { background:#f8f9fa; color:#333; }
.work-actions .delete-btn:hover { color:#dc3545; border-color:#dc3545; }

/* 浏览图标 */
.views { display:inline-flex; align-items:center; gap:4px; }
.views .views-icon { width:20px; height:14px; vertical-align:middle; }

html, body {
    height: 100%;
    overflow: hidden;
}

.container {
    height: 100vh;
    overflow: hidden;
}

.main-content {
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
    padding: 15px;
}

.profile-container {
    height: calc(100vh - 30px);
    overflow: hidden;
    gap: 15px;
    max-width: none;
    width: 100%;
}

.works-section {
    box-shadow: none;
    width: auto;
    box-sizing: border-box;
    height: 100%;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.user-info-card,
.recharge-record-card {
    box-shadow: none;
}
.user-info-card,.recharge-record-card,.works-section,.video-card{
	border-radius:10px;
}
/* profile-sidebar 固定左侧 */
.profile-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
    overflow: hidden;
}

.user-info-card {
    flex-shrink: 0;
}

/* 充值记录模块内滚动 */
.recharge-record-card {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.recharge-record-card .record-toggle {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.recharge-record-card .record-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}
.recharge-record-card #payRecords {
    min-height: 100%;
}
.pay-record-placeholder {
    min-height: 180px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 13px;
    text-align: center;
}

/* profile-content 自带滚动 */
.profile-content {
    flex: 1;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 隐藏余额和点数 */
.stat-row.stat-hidden { display: none; }

/* layer 弹窗适配（16:9） */
.layer-video-modal .layui-layer-content { padding:0; overflow:hidden; }
.layer-video-modal .modal-content-inner { display:flex; flex-direction:column; height:100%; background:#fff; box-sizing:border-box; }
.layer-video-modal .modal-header { padding:16px 30px 0; flex-shrink:0; }
.layer-video-modal .modal-layout { flex:1; min-height:0; padding:50px 30px 50px; gap:30px; }
.layer-video-modal .modal-video-section { flex:1.1; display:flex; flex-direction:column; min-width:0; }
.layer-video-modal .modal-video-container { width:100%; aspect-ratio:16/9; min-height:0; background:#000; border-radius:8px; overflow:hidden; position:relative; display:block; }
.layer-video-modal .modal-video,
.layer-video-modal .modal-image { width:100%; height:100%; object-fit:contain; background:#000; display:none; }
.layer-video-modal .modal-info { min-height:0; overflow:auto; }
.layer-video-modal .modal-textarea { min-height:180px; }

/* 充值弹窗 */
.layer-recharge-modal .layui-layer-content { padding:0; overflow:hidden; }
.recharge-modal-inner { padding:24px 30px; height:100%; box-sizing:border-box; display:flex; flex-direction:column; overflow:hidden; }
.recharge-title { font-size:20px; font-weight:600; color:#333; margin-bottom:18px; text-align:center; flex-shrink:0; }
.pay-type-tabs { display:flex; gap:12px; margin-bottom:18px; justify-content:center; flex-shrink:0; }
.pay-type-tab { padding:8px 22px; border:1px solid #eee; border-radius:20px; cursor:pointer; font-size:14px; color:#666; transition:all .2s; display:flex; align-items:center; background:#fff; }
.pay-type-tab:hover { border-color:#c99cf5; }
.pay-type-tab.active { border-color:#8f41e9; background:#faf5ff; color:#8f41e9; font-weight:600; }
#rechargeBody { flex:1; min-height:0; overflow-y:auto; padding-right:4px; }
.recharge-list { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; padding:10px 2px 2px; }
.recharge-card { border:2px solid #eee; border-radius:10px; padding:16px 12px; text-align:center; cursor:pointer; position:relative; transition:all .2s; background:#fff; }
.recharge-card:hover { border-color:#c99cf5; }
.recharge-card.selected { border-color:#8f41e9; background:#faf5ff; }
.recharge-card .lv-name { font-size:14px; color:#666; margin-bottom:8px; }
.recharge-card .lv-price { font-size:22px; font-weight:700; color:#8f41e9; margin-bottom:4px; }
.recharge-card .lv-price small { font-size:13px; font-weight:400; }
.recharge-card .lv-original { font-size:12px; color:#999; text-decoration:line-through; }
.recharge-card .lv-duration { font-size:12px; color:#666; margin-top:6px; }
.recharge-card .lv-badge { position:absolute; top:-8px; right:8px; background:#8f41e9; color:#fff; font-size:11px; padding:2px 8px; border-radius:10px; }
.pay-amount-confirm { margin-top:12px; padding:10px 12px; border-radius:10px; background:#f6efff; display:flex; align-items:center; justify-content:center; gap:10px; color:#666; flex-shrink:0; }
.pay-amount-confirm span { font-size:13px; }
.pay-amount-confirm strong { font-size:20px; color:#8f41e9; }
.pay-amount-confirm em { font-style:normal; font-size:12px; color:#2eaf63; }
.recharge-actions { margin-top:12px; text-align:center; flex-shrink:0; padding-top:12px; border-top:1px solid #f2f2f2; background:#fff; }
.recharge-actions button { padding:10px 40px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border:none; border-radius:24px; font-size:14px; font-weight:600; cursor:pointer; }
.recharge-actions button:disabled { background:#ccc; cursor:not-allowed; }
.recharge-qr { padding:0 20px; text-align:center; }
.recharge-qr .qr-box { display:inline-block; padding:12px; border:1px solid #eee; border-radius:8px; background:#fff; margin-bottom:16px; }
.vip-end-time { font-size:11px; color:#999; margin-top:2px; }

.coupon-stat-row { cursor:pointer; }
.coupon-stat-row:hover .stat-label,
.coupon-stat-row:hover .stat-value { color:#8f41e9; }
.coupon-count-badge { display:inline-flex; align-items:center; justify-content:center; min-width:42px; padding:2px 10px; border-radius:12px; background:#f6efff; color:#8f41e9; font-size:12px; font-weight:600; }
.invite-actions { display:inline-flex; gap:6px; align-items:center; }
.invite-actions button { padding:3px 8px; border:0; border-radius:12px; background:#eef6ff; color:#1e88e5; font-size:12px; font-weight:600; cursor:pointer; }
.invite-actions button:hover { background:#1e88e5; color:#fff; }
.layer-coupon-modal .layui-layer-content { padding:0; overflow:hidden; }
.coupon-modal-inner { padding:22px 24px; background:#fff; height:100%; box-sizing:border-box; display:flex; flex-direction:column; }
.coupon-modal-title { font-size:18px; font-weight:600; color:#333; text-align:center; margin-bottom:16px; }
.coupon-modal-body { flex:1; min-height:0; overflow-y:auto; }
.coupon-loading,
.coupon-empty { height:180px; display:flex; align-items:center; justify-content:center; color:#999; font-size:14px; }
.coupon-list { display:flex; flex-direction:column; gap:10px; }
.coupon-card { border:1px solid #eee; border-radius:10px; padding:14px; background:#fff; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.coupon-card.duration { border-color:#c99cf5; background:#faf5ff; }
.coupon-card.discount { border-color:#b7d7ff; background:#f7fbff; }
.coupon-main { min-width:0; }
.coupon-name { font-size:15px; font-weight:600; color:#333; margin-bottom:6px; }
.coupon-desc { font-size:12px; color:#777; line-height:1.6; }
.coupon-tag { display:inline-flex; align-items:center; padding:3px 9px; border-radius:12px; font-size:12px; margin-right:6px; }
.coupon-card.duration .coupon-tag { color:#8f41e9; background:#f3e8ff; }
.coupon-card.discount .coupon-tag { color:#1e88e5; background:#eaf4ff; }
.coupon-use-btn { flex-shrink:0; padding:7px 14px; border:none; border-radius:18px; background:#8f41e9; color:#fff; cursor:pointer; font-size:13px; }
.coupon-use-btn:hover { background:#7d35d0; }
.layer-invite-modal .layui-layer-content { padding:0; overflow:hidden; }
.invite-modal-inner { padding:22px 24px; background:#fff; height:100%; box-sizing:border-box; display:flex; flex-direction:column; }
.invite-modal-title { font-size:18px; font-weight:600; color:#333; text-align:center; margin-bottom:16px; }
.invite-modal-body { flex:1; min-height:0; overflow-y:auto; }
.invite-loading,
.invite-empty { height:180px; display:flex; align-items:center; justify-content:center; color:#999; font-size:14px; }
.invite-info-box { padding:14px; border:1px solid #eee; border-radius:12px; background:#fbfbfb; }
.invite-line { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.invite-line span { color:#666; font-size:13px; }
.invite-line strong { flex:1; color:#1e88e5; font-size:20px; letter-spacing:1px; }
.invite-line button,
.invite-link button { padding:6px 12px; border:0; border-radius:16px; background:#1e88e5; color:#fff; cursor:pointer; font-size:12px; }
.invite-link-row { display:flex; gap:8px; align-items:center; }
.invite-link-row input { flex:1; height:36px; box-sizing:border-box; border:1px solid #eee; border-radius:8px; padding:0 10px; color:#333; background:#fff; }
.invite-link-row button { flex-shrink:0; padding:8px 14px; border:0; border-radius:18px; background:#1e88e5; color:#fff; cursor:pointer; font-size:12px; }
.invite-summary { margin-top:12px; font-size:13px; color:#666; }
.invite-summary b { color:#8f41e9; }
.invite-task-title { margin:16px 0 10px; font-size:15px; font-weight:600; color:#333; }
.invite-task-list { display:flex; flex-direction:column; gap:10px; }
.invite-task { padding:12px; border:1px solid #eee; border-radius:10px; background:#fff; }
.invite-task.done { border-color:#bde8c9; background:#f7fff9; }
.invite-task-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; }
.invite-task-head span { font-size:14px; font-weight:600; color:#333; }
.invite-task-head em { font-style:normal; font-size:12px; color:#8f41e9; }
.invite-task-desc { font-size:12px; color:#777; line-height:1.5; margin-bottom:8px; }
.invite-progress { height:6px; border-radius:6px; background:#f0f0f0; overflow:hidden; }
.invite-progress i { display:block; height:100%; background:linear-gradient(135deg,#a66af0,#8f41e9); border-radius:6px; }
.layer-invite-bind-modal .layui-layer-content { padding:0; overflow:hidden; }
.invite-bind-inner { padding:24px; background:#fff; box-sizing:border-box; height:100%; }
.invite-bind-title { font-size:18px; font-weight:600; color:#333; text-align:center; margin-bottom:10px; }
.invite-bind-desc { font-size:13px; color:#777; line-height:1.6; margin-bottom:14px; }
.invite-bind-input { width:100%; height:38px; box-sizing:border-box; border:1px solid #eee; border-radius:8px; padding:0 12px; color:#333; }
.invite-bind-input:focus { border-color:#8f41e9; outline:none; }
.invite-bind-error { margin-top:8px; padding:8px 10px; border-radius:8px; background:#fff1f0; color:#d93026; font-size:12px; line-height:1.5; }
.invite-bind-actions { display:flex; gap:10px; justify-content:center; margin-top:18px; }
.invite-bind-actions button { padding:8px 22px; border:none; border-radius:20px; cursor:pointer; font-size:13px; }
.invite-bind-submit { background:#8f41e9; color:#fff; }
.invite-bind-submit:disabled { background:#bbb; cursor:not-allowed; }
.invite-bind-cancel { background:#f5f5f5; color:#666; }

/* 创作者申请弹窗 */
.layer-creator-apply-modal .layui-layer-content { padding:0; }
.creator-apply-inner { padding:24px 30px; }
.creator-apply-title { font-size:20px; font-weight:600; color:#333; margin-bottom:12px; text-align:center; }
.creator-apply-tip { background:#fff7ed; border:1px solid #fed7aa; color:#c2410c; border-radius:8px; padding:10px 12px; font-size:13px; line-height:1.6; margin-bottom:16px; }
.creator-apply-form .form-row { margin-bottom:14px; }
.creator-apply-form label { display:block; font-size:13px; color:#666; margin-bottom:6px; font-weight:500; }
.creator-apply-form input[type=text], .creator-apply-form textarea { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid #ddd; border-radius:6px; font-size:14px; outline:none; transition:border-color .2s; font-family:inherit; }
.creator-apply-form input[type=text]:focus, .creator-apply-form textarea:focus { border-color:#8f41e9; }
.creator-apply-form textarea { resize:vertical; min-height:120px; }
.creator-apply-actions { margin-top:20px; text-align:center; }
.creator-apply-actions button { padding:10px 40px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border:none; border-radius:24px; font-size:14px; font-weight:600; cursor:pointer; }
.creator-apply-actions button:disabled { background:#ccc; cursor:not-allowed; }

.profile-edit-btn { background:linear-gradient(135deg,#5b8cff,#3c6cff) !important; margin-top:8px; }

.user-info-card .user-header { display:flex; align-items:center; gap:12px; }
.user-info-card .user-header .user-details { flex:1; min-width:0; }
.stat-row .stat-value { text-align: right; }
.profile-edit-inline-btn {
    padding:6px 14px;
    background:#fff;
    color:#8f41e9;
    border:1px solid #8f41e9;
    border-radius:16px;
    font-size:12px;
    cursor:pointer;
    flex-shrink:0;
    transition:all .2s;
}
.profile-edit-inline-btn:hover { background:#8f41e9; color:#fff; }

.layer-profile-edit-modal .layui-layer-content { padding:0; }
.profile-edit-inner { padding:24px 30px; max-height:80vh; overflow-y:auto; }
.profile-edit-title { font-size:20px; font-weight:600; color:#333; margin-bottom:16px; text-align:center; }
.profile-edit-form .form-row { margin-bottom:14px; }
.profile-edit-form label { display:block; font-size:13px; color:#666; margin-bottom:6px; font-weight:500; }
.profile-edit-form input[type=text], .profile-edit-form input[type=date] { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid #ddd; border-radius:6px; font-size:14px; outline:none; transition:border-color .2s; font-family:inherit; }
.profile-edit-form input[type=text]:focus, .profile-edit-form input[type=date]:focus { border-color:#8f41e9; }
.profile-edit-form .form-row-half { display:flex; gap:12px; }
.profile-edit-form .form-row-half > div { flex:1; }
.avatar-row { display:flex; align-items:center; gap:14px; }
.avatar-preview { width:64px; height:64px; border-radius:50%; object-fit:cover; border:2px solid #eee; flex-shrink:0; }
.avatar-upload-btn { padding:6px 16px; border:1px solid #8f41e9; color:#8f41e9; background:#fff; border-radius:6px; cursor:pointer; font-size:13px; }
.avatar-upload-btn:hover { background:#f6efff; }
.avatar-tip { font-size:12px; color:#999; margin-top:4px; }
.gender-tabs { display:flex; gap:8px; }
.gender-tabs .g-tab { flex:1; padding:8px 0; text-align:center; border:1px solid #ddd; border-radius:6px; cursor:pointer; color:#666; font-size:13px; transition:all .2s; }
.gender-tabs .g-tab:hover { border-color:#8f41e9; color:#8f41e9; }
.gender-tabs .g-tab.active { background:#f6efff; border-color:#8f41e9; color:#8f41e9; font-weight:600; }
.profile-edit-actions { margin-top:18px; text-align:center; }
.profile-edit-actions button { padding:10px 40px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border:none; border-radius:24px; font-size:14px; font-weight:600; cursor:pointer; }
.profile-edit-actions button:disabled { background:#ccc; cursor:not-allowed; }

/* 发布弹窗 */
.layer-publish-modal .layui-layer-content { padding:0; }
.publish-modal-inner { padding:24px 30px; }
.publish-title { font-size:20px; font-weight:600; color:#333; margin-bottom:18px; text-align:center; }
.publish-form .form-row { margin-bottom:14px; }
.publish-form label { display:block; font-size:13px; color:#666; margin-bottom:6px; font-weight:500; }
.publish-form input[type=text], .publish-form select, .publish-form textarea { width:100%; box-sizing:border-box; padding:9px 12px; border:1px solid #ddd; border-radius:6px; font-size:14px; outline:none; transition:border-color .2s; font-family:inherit; }
.publish-form input[type=text]:focus, .publish-form select:focus, .publish-form textarea:focus { border-color:#8f41e9; }
.publish-form textarea { resize:vertical; min-height:80px; }
.upload-zone { border:2px dashed #ddd; border-radius:8px; padding:30px 20px; text-align:center; cursor:pointer; transition:all .2s; background:#fafafa; }
.upload-zone:hover { border-color:#8f41e9; background:#faf5ff; }
.upload-zone.has-file { padding:14px; border-style:solid; }
.upload-zone .uz-icon { font-size:40px; color:#ccc; margin-bottom:10px; }
.upload-zone .uz-tip { font-size:13px; color:#999; }
.upload-zone .uz-progress { width:100%; height:6px; background:#eee; border-radius:3px; margin-top:8px; overflow:hidden; }
.upload-zone .uz-progress-bar { height:100%; background:linear-gradient(90deg,#a66af0,#8f41e9); width:0%; transition:width .3s; }
.upload-preview { display:flex; align-items:center; gap:12px; text-align:left; }
.upload-preview .pv-thumb { width:200px; height:130px; object-fit:cover; border-radius:4px; background:#000; }
.upload-preview .pv-video { width:200px; height:130px; object-fit:contain; }
.upload-preview .pv-info { flex:1; min-width:0; }
.upload-preview .pv-name { font-size:14px; color:#333; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.upload-preview .pv-meta { font-size:12px; color:#999; margin-top:3px; }
.upload-preview .pv-remove { color:#dc3545; cursor:pointer; font-size:12px; }
.publish-actions { margin-top:20px; text-align:center; }
.publish-actions button { padding:10px 40px; background:linear-gradient(135deg,#a66af0,#8f41e9); color:#fff; border:none; border-radius:24px; font-size:14px; font-weight:600; cursor:pointer; }
.publish-actions button:disabled { background:#ccc; cursor:not-allowed; }
.material-type-tabs { display:flex; gap:12px; }
.mt-tab { flex:1; text-align:center; padding:10px 0; border:2px solid #eee; border-radius:8px; cursor:pointer; font-size:14px; color:#666; transition:all .2s; }
.mt-tab:hover { border-color:#c99cf5; }
.mt-tab.active { border-color:#8f41e9; background:#faf5ff; color:#8f41e9; font-weight:600; }
.tag-picker { display:flex; flex-wrap:wrap; gap:8px; max-height:120px; overflow-y:auto; padding:4px 0; }
.tag-chip { display:inline-flex; align-items:center; padding:4px 12px; border:1px solid #ddd; border-radius:16px; font-size:13px; color:#666; cursor:pointer; transition:all .15s; background:#fff; user-select:none; }
.tag-chip:hover { border-color:#c99cf5; }
.tag-chip.selected { border-color:#8f41e9; background:#f6efff; color:#8f41e9; font-weight:500; }

@media (max-width:1200px) {
    .profile-content .video-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width:900px) {
    .layer-video-modal .modal-layout { flex-direction:column; overflow:auto; }
    .profile-content .video-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width:992px) {
    .profile-sidebar { position:static; height:auto; }
    .profile-content { height:auto; overflow-y:visible; }
}
@media (max-width:768px) {
    .profile-content .video-grid { grid-template-columns: repeat(1, 1fr); }
}
