/* 我的：登录 + 资料 + 资产 */

.tab-page-mine {
    padding: 0;
}

.mine-page {
    position: relative;
    padding: 16px 12px calc(16px + var(--safe-bottom));
}

.mine-bg-glow {
    position: absolute;
    top: 0;
    left: -10%;
    width: 80%;
    height: 160px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.14), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.mine-profile {
    position: relative;
    z-index: 1;
    padding: 0;
    margin-bottom: 16px;
    overflow: hidden;
    background: linear-gradient(165deg, rgba(251, 191, 36, 0.1) 0%, var(--color-surface) 48%);
    border: 1px solid rgba(251, 191, 36, 0.22);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.mine-profile-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    box-sizing: border-box;
}

.mine-avatar-wrap {
    position: relative;
    flex-shrink: 0;
    width: 76px;
    height: 76px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.mine-avatar {
    position: absolute;
    left: 2%;
    top: 2%;
    width: 96%;
    height: 96%;
    border-radius: 50%;
    background: linear-gradient(135deg, #152028, #121a26);
    border: 2px solid rgba(251, 191, 36, 0.28);
    overflow: hidden;
    box-sizing: border-box;
}

.mine-avatar.has-frame {
    left: 15.5%;
    top: 15.5%;
    width: 69%;
    height: 69%;
    border-color: transparent;
}

.mine-avatar img,
.mine-avatar .app-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mine-avatar-frame {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    object-fit: contain;
}

.mine-avatar-edit {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 3;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #1a1408;
    font-size: 12px;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
    border: 2px solid var(--color-surface);
    box-sizing: border-box;
    pointer-events: none;
}

.mine-profile-body {
    flex: 1;
    min-width: 0;
}

.mine-nickname {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}

.mine-profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.mine-chip {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.22);
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-chip-shop {
    color: var(--color-text-muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--color-border);
    font-weight: 500;
}

.mine-shop-tag {
    margin-top: 6px;
    font-size: 13px;
    color: var(--color-primary);
}

.mine-setup {
    padding: 8px 4px 24px;
}

.mine-setup-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}

.mine-setup-sub {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 18px;
    line-height: 1.5;
}

.mine-setup-shops {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mine-setup-shop {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(22, 22, 28, 0.9);
    cursor: pointer;
}

.mine-setup-shop.is-on {
    border-color: rgba(251, 191, 36, 0.55);
    background: rgba(251, 191, 36, 0.1);
}

.mine-setup-shop input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mine-setup-shop-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--color-text);
}

.mine-setup-shop-addr {
    font-size: 12px;
    color: var(--color-text-muted);
}

.mine-setup-empty {
    font-size: 13px;
    color: var(--color-text-muted);
    padding: 8px 0;
}

.mine-section-head {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    padding: 0 2px;
}

.mine-section-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--color-text-muted);
}

.mine-assets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.mine-asset-card-balance {
    grid-column: 1 / -1;
}

@media (max-width: 360px) {
    .mine-assets {
        grid-template-columns: 1fr;
    }
    .mine-asset-card-balance {
        grid-column: auto;
    }
}

.mine-asset-card {
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    box-shadow: none;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
}

.mine-asset-card-tickets,
.mine-asset-card-premium,
.mine-asset-card-balance {
    border-top: none;
    position: relative;
}

.mine-asset-label {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.mine-asset-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
    word-break: break-all;
}

.mine-shop-tickets {
    margin: 6px 0 0;
    padding-top: 6px;
    border-top: 1px solid rgba(251, 191, 36, 0.12);
}

.mine-shop-ticket-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--color-text-muted);
    padding: 2px 0;
}

.mine-shop-ticket-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-shop-ticket-num {
    flex-shrink: 0;
    color: var(--color-text);
    font-weight: 600;
}

.mine-recharge-shop-picker {
    margin-bottom: 14px;
}

.mine-recharge-shop-fixed {
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.18);
    font-size: 14px;
    color: var(--color-text);
}

.mine-exchange-modal[hidden] {
    display: none !important;
}

.mine-exchange-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.mine-exchange-tip {
    margin: -8px 0 16px;
    font-size: 15px;
    color: var(--color-text-muted);
    line-height: 1.5;
}

.mine-edit-modal[hidden] {
    display: none !important;
}

.mine-edit-modal {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.mine-edit-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.mine-edit-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 78vh;
    background: var(--color-surface);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-bottom: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mine-edit-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.mine-edit-sheet-title {
    font-size: 20px;
    font-weight: 700;
}

.mine-edit-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.mine-edit-sheet-body {
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mine-asset-btn,
.mine-recharge-btn {
    margin-top: 10px;
    width: 100%;
    padding: 7px 0;
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: 8px;
    background: transparent;
    color: var(--color-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.mine-asset-btn:active,
.mine-recharge-btn:active {
    background: rgba(251, 191, 36, 0.1);
}

.mine-admin-entry {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    overflow: hidden;
    box-shadow: none;
    border: 1px solid var(--color-border);
    cursor: pointer;
}

.mine-admin-entry-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mine-admin-entry-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-text);
}

.mine-admin-entry-sub {
    font-size: 12px;
    color: var(--color-text-muted);
}

.mine-admin-entry-arrow {
    font-size: 20px;
    color: var(--color-text-muted);
    line-height: 1;
}

.mine-recharge-modal[hidden] {
    display: none !important;
}

.mine-recharge-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

body.mine-modal-open {
    overflow: hidden;
}

.mine-recharge-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.mine-recharge-sheet {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: 78vh;
    background: var(--color-surface);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-bottom: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mine-recharge-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.mine-recharge-sheet-head-main {
    display: flex;
    align-items: baseline;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.mine-recharge-sheet-title {
    flex-shrink: 0;
    font-size: 20px;
    font-weight: 700;
}

.mine-recharge-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.mine-recharge-sheet-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.mine-recharge-tip {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--color-text-muted);
    text-align: center;
}

.mine-recharge-user-id {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 13px;
    color: var(--color-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-recharge-user-id strong {
    color: var(--color-primary);
    font-weight: 700;
}

.mine-recharge-packages {
    margin-bottom: 4px;
}

.mine-recharge-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 10px;
}

.mine-recharge-pkg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (max-width: 380px) {
    .mine-recharge-pkg-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.mine-recharge-pkg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 16px 8px 14px;
    min-height: 128px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(251, 191, 36, 0.25);
    box-sizing: border-box;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mine-recharge-pkg-card.is-selected {
    border-color: var(--color-primary);
    background: linear-gradient(165deg, rgba(251, 191, 36, 0.22) 0%, var(--color-primary-dim) 70%);
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.25);
}

.mine-recharge-pkg-badge {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 18px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a;
    background: linear-gradient(135deg, #fbbf24 0%, #fbbf24 100%);
    border-radius: 0 0 0 8px;
}

.mine-recharge-pkg-check {
    position: absolute;
    left: 0;
    top: 0;
    min-width: 18px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #1a1a1a;
    background: #fbbf24;
    border-radius: 0 0 8px 0;
}

.mine-recharge-pkg-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mine-recharge-pkg-card.is-selected .mine-recharge-pkg-name {
    color: var(--color-text);
}

.mine-recharge-pkg-price-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
    margin-bottom: 8px;
    line-height: 1;
}

.mine-recharge-pkg-currency {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-accent, #fbbf24);
    padding-bottom: 2px;
}

.mine-recharge-pkg-amount {
    font-size: 26px;
    font-weight: 700;
    color: var(--color-accent, #fbbf24);
    letter-spacing: -0.5px;
}

.mine-recharge-pkg-benefit {
    font-size: 11px;
    color: var(--color-text-muted);
    line-height: 1.3;
    margin-bottom: 4px;
}

.mine-recharge-pkg-gift {
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent, #fbbf24);
    line-height: 1.3;
}

.mine-recharge-pkg-gift.is-muted {
    font-weight: 400;
    color: var(--color-text-muted);
    opacity: 0.7;
}

.mine-recharge-footer {
    flex-shrink: 0;
    padding: 8px 16px 8px;
    border-top: 1px solid rgba(251, 191, 36, 0.25);
}

.mine-recharge-submit-btn {
    width: 100%;
    padding: 8px 12px;
    min-height: 36px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #1a1408;
    background: linear-gradient(135deg, var(--color-primary), #f59e0b);
    cursor: pointer;
}

.mine-recharge-submit-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mine-pay-modal[hidden] {
    display: none !important;
}

.mine-pay-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mine-pay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
}

.mine-pay-sheet {
    position: relative;
    width: min(360px, calc(100vw - 32px));
    background: var(--color-surface);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 14px;
    overflow: hidden;
}

.mine-pay-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(251, 191, 36, 0.25);
}

.mine-pay-sheet-title {
    font-size: 17px;
    font-weight: 700;
}

.mine-pay-sheet-body {
    padding: 20px 16px 24px;
    text-align: center;
}

.mine-pay-amount {
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.mine-pay-qr {
    width: 200px;
    height: 200px;
    margin: 0 auto 14px;
    padding: 8px;
    background: #fff;
    border-radius: 10px;
    box-sizing: content-box;
}

.mine-pay-qr img,
.mine-pay-qr canvas {
    display: block;
    width: 200px !important;
    height: 200px !important;
}

.mine-pay-qr-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #666;
    font-size: 13px;
}

.mine-pay-hint {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.mine-pay-status {
    font-size: 14px;
    color: var(--color-accent, #fbbf24);
}

.mine-pay-status.is-success {
    color: #3d9a5f;
}

.mine-pay-status.is-timeout {
    color: var(--color-text-muted);
}

.mine-recharge-shops-loading,
.mine-recharge-shops-empty {
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: center;
    padding: 12px 0;
}

.mine-logout-btn {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.mine-logout-btn:active {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--color-text);
}

.mine-login-card {
    background: var(--color-surface);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: 14px;
    padding: 20px 16px;
}

.mine-login-title {
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.mine-login-sub {
    font-size: 16px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 20px;
}

.mine-form-group {
    margin-bottom: 14px;
}

.mine-form-label {
    display: block;
    font-size: 16px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.mine-form-input {
    width: 100%;
    min-height: 52px;
    padding: 14px 14px;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.25);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 18px;
    outline: none;
}

.mine-form-input:focus {
    border-color: rgba(251, 191, 36, 0.45);
}

.mine-code-row {
    display: flex;
    gap: 10px;
}

.mine-code-row .mine-form-input {
    flex: 1;
    min-width: 0;
}

.mine-code-btn {
    flex-shrink: 0;
    min-width: 120px;
    min-height: 52px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(251, 191, 36, 0.45);
    background: rgba(251, 191, 36, 0.12);
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}

.mine-code-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mine-login-btn {
    width: 100%;
    margin-top: 6px;
    min-height: 52px;
    padding: 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--color-primary), #f59e0b);
    color: #1a1408;
    font-size: 19px;
    font-weight: 700;
    cursor: pointer;
}

.mine-login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mine-avatar-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.mine-avatar-preview-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
}

.mine-avatar-preview {
    position: absolute;
    left: 15.5%;
    top: 15.5%;
    width: 69%;
    height: 69%;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(251, 191, 36, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.mine-avatar-preview.has-frame {
    border-color: transparent;
}

.mine-avatar-preview:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.mine-avatar-preview img,
.mine-avatar-preview .app-avatar-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mine-avatar-preview-mask {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.mine-avatar-upload-hint {
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.4;
    text-align: center;
}

.mine-form-file {
    display: none;
}

.mine-form-hint {
    margin-top: 6px;
    font-size: 15px;
    color: var(--color-text-muted);
}

.mine-tip,
.mine-loading,
.mine-error {
    text-align: center;
    padding: 40px 16px;
    font-size: 17px;
    color: var(--color-text-muted);
}

.mine-error {
    color: #f87171;
}

.mine-dev-tip {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px dashed rgba(251, 191, 36, 0.25);
    font-size: 15px;
    color: var(--color-text-muted);
    text-align: center;
    line-height: 1.5;
}

.mine-dev-tip strong {
    color: var(--color-primary);
}

/* 骨架屏 */
.sk-mine-profile {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    padding: 18px 16px;
    overflow: hidden;
    box-sizing: border-box;
}

.sk-mine-chips {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.sk-mine-chip {
    width: 64px;
    height: 20px;
    border-radius: 999px;
}

.sk-mine-assets {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.sk-mine-asset {
    flex: 1;
    height: 110px;
    border-radius: var(--radius-lg);
}

.sk-mine-menu {
    height: 48px;
    border-radius: 10px;
    margin-bottom: 8px;
}
