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

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

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

.mine-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.14), rgba(26, 26, 32, 0.95));
    border: 1px solid rgba(201, 162, 39, 0.22);
    border-radius: 14px;
}

.mine-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2a2418, #1a1a20);
    border: 2px solid rgba(201, 162, 39, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    overflow: hidden;
}

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

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

.mine-nickname {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
}

.mine-user-id {
    font-size: 16px;
    color: var(--color-text-muted);
}

.mine-user-id span {
    color: var(--color-primary);
    font-weight: 600;
}

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

.mine-assets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

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

.mine-asset-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 16px 14px;
}

.mine-asset-label {
    font-size: 15px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

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

.mine-asset-card-balance,
.mine-asset-card-tickets {
    position: relative;
    display: flex;
    flex-direction: column;
}

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

.mine-nickname {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mine-edit-btn {
    border: 0;
    background: rgba(201, 162, 39, 0.15);
    color: var(--color-primary);
    font-size: 15px;
    padding: 2px 8px;
    border-radius: 999px;
    cursor: pointer;
}

.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 var(--color-border);
    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 var(--color-border);
}

.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-avatar.frame-gold { box-shadow: 0 0 0 2px #d4af37; }
.mine-avatar.frame-silver { box-shadow: 0 0 0 2px #c0c0c0; }
.mine-avatar.frame-bronze { box-shadow: 0 0 0 2px #cd7f32; }
.mine-avatar.frame-emerald { box-shadow: 0 0 0 2px #2ecc71; }

.mine-recharge-btn {
    margin-top: 12px;
    width: 100%;
    padding: 8px 0;
    border: none;
    border-radius: 8px;
    background: rgba(201, 162, 39, 0.18);
    color: var(--color-primary);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.mine-recharge-btn:active {
    background: rgba(201, 162, 39, 0.28);
}

.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 var(--color-border);
    border-bottom: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mine-recharge-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--color-border);
}

.mine-recharge-sheet-title {
    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;
}

.mine-recharge-sheet-body {
    padding: 16px;
    overflow-y: auto;
}

.mine-recharge-tip {
    margin: 0 0 14px;
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.mine-recharge-user-id {
    margin-bottom: 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(201, 162, 39, 0.08);
    border: 1px solid rgba(201, 162, 39, 0.2);
    font-size: 16px;
    color: var(--color-text-muted);
}

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

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

.mine-recharge-shop-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.mine-recharge-shop-item:last-child {
    border-bottom: none;
}

.mine-recharge-shop-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.mine-recharge-shop-meta {
    font-size: 16px;
    color: var(--color-text-muted);
}

.mine-recharge-shop-phone {
    color: var(--color-primary);
    text-decoration: none;
}

.mine-recharge-shop-phone-muted {
    color: var(--color-text-muted);
}

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

.mine-recharge-pkg-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.mine-recharge-pkg-item:last-child {
    border-bottom: none;
}

.mine-recharge-pkg-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text);
}

.mine-recharge-pkg-meta {
    margin-top: 4px;
    font-size: 15px;
    color: var(--color-text-muted);
}

.mine-recharge-pkg-price {
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--color-accent, #c9a227);
}

.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 {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-muted);
    font-size: 17px;
    cursor: pointer;
}

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

.mine-login-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    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 var(--color-border);
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 18px;
    outline: none;
}

.mine-form-input:focus {
    border-color: rgba(201, 162, 39, 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(201, 162, 39, 0.45);
    background: rgba(201, 162, 39, 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: var(--color-primary);
    color: #1a1a20;
    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: flex-start;
    gap: 10px;
}

.mine-avatar-preview {
    position: relative;
    width: 72px;
    height: 72px;
    padding: 0;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 700;
    color: var(--color-primary);
    flex-shrink: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.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;
    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;
}

.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(201, 162, 39, 0.08);
    border: 1px dashed rgba(201, 162, 39, 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);
}
