body.profile-page {
    background:
        radial-gradient(circle at top, rgba(255, 215, 106, 0.08), transparent 28%),
        linear-gradient(180deg, #111a2e 0%, #0b1220 40%, #09101d 100%);
}

.main-content.profile-main {
    max-width: 1024px;
    padding-top: 88px;
    padding-bottom: 88px;
}

.profile-root {
    display: grid;
    gap: 1rem;
    padding-bottom: 1rem;
}

.profile-loading-shell,
.profile-hero-card,
.profile-section {
    border: 1px solid rgba(255, 215, 106, 0.14);
    border-radius: 22px;
    background: rgba(17, 26, 46, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(16px);
}

.profile-loading-shell {
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    min-height: 320px;
    padding: 3rem 1.5rem;
    color: #dbe4f6;
}

.profile-loading-spinner {
    width: 42px;
    height: 42px;
    border: 2px solid rgba(255, 215, 106, 0.2);
    border-top-color: #ffd76a;
    border-radius: 50%;
    animation: profile-spin 1s linear infinite;
}

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

.profile-hero-card {
    padding: 1.35rem 1.4rem;
}

.profile-hero-card--guest {
    display: grid;
    gap: 1rem;
}

.profile-login-heading,
.profile-user-name,
.profile-section-title,
.profile-panel-title {
    margin: 0;
    color: #f8fafc;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.profile-login-heading {
    font-size: 1.3rem;
}

.profile-user-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border: 1px solid rgba(255, 215, 106, 0.32);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 215, 106, 0.14), rgba(255, 215, 106, 0.04));
    color: #ffd76a;
    font-size: 1.55rem;
    font-weight: 800;
    overflow: hidden;
}

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

.profile-user-name {
    font-size: 1.32rem;
}

.profile-user-meta {
    min-width: 0;
    flex: 1;
}

.profile-user-headline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

/* desktop 端不展示移动专用退出按钮 */
.profile-mobile-logout-button {
    display: none !important;
}

.profile-auth-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.profile-auth-button,
.profile-form-button,
.profile-section-link,
.profile-quiet-button {
    min-height: 42px;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 800;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.profile-auth-button,
.profile-form-button,
.profile-quiet-button {
    border: 1px solid transparent;
    cursor: pointer;
}

.profile-auth-button--primary,
.profile-form-button {
    background: linear-gradient(135deg, #f6d36b 0%, #e2b53b 100%);
    color: #151a23;
}

.profile-auth-button--secondary,
.profile-section-link,
.profile-quiet-button {
    border-color: rgba(255, 215, 106, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
}

.profile-auth-button:hover,
.profile-form-button:hover,
.profile-section-link:hover,
.profile-quiet-button:hover,
.profile-action-card:hover,
.profile-favorite-card:hover,
.profile-admin-link:hover {
    transform: translateY(-1px);
}

.profile-section {
    display: grid;
    gap: 1rem;
    padding: 1.2rem 1.25rem;
}

.profile-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.profile-section-title {
    font-size: 1rem;
}

.profile-section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.85rem;
    text-decoration: none;
}

.profile-card-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 22px;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: rgba(255, 215, 106, 0.12);
    color: #ffd76a;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.profile-metric-grid,
.profile-action-grid,
.profile-chip-grid,
.profile-tool-grid,
.profile-settings-grid,
.profile-favorite-grid {
    display: grid;
    gap: 0.75rem;
}

.profile-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-chip-grid,
.profile-tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-settings-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-settings-panel--admin {
    grid-column: 1 / -1;
}

.profile-metric-card,
.profile-action-card,
.profile-settings-panel,
.profile-empty-block {
    border: 1px solid rgba(255, 215, 106, 0.1);
    border-radius: 18px;
    background: rgba(10, 17, 30, 0.82);
}

.profile-metric-card,
.profile-action-card,
.profile-settings-panel {
    display: grid;
    gap: 0.45rem;
    padding: 0.95rem;
}

.profile-action-card {
    text-decoration: none;
    color: inherit;
}

.profile-action-card--compact {
    min-height: 148px;
}

.profile-card-title {
    margin: 0;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 780;
}

.profile-card-value {
    margin: 0;
    color: #ffd76a;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
}

.profile-card-note {
    margin: 0;
    color: #aeb9d5;
    font-size: 0.82rem;
    line-height: 1.5;
}

.profile-empty-block {
    padding: 1rem;
}

.profile-empty-title {
    color: #f8fafc;
    font-size: 0.96rem;
    font-weight: 780;
}

.profile-empty-note {
    margin-top: 0.3rem;
    color: #aeb9d5;
    font-size: 0.82rem;
}

.profile-favorite-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-favorite-card {
    display: grid;
    gap: 0.7rem;
    padding: 0.8rem;
    border: 1px solid rgba(255, 215, 106, 0.1);
    border-radius: 18px;
    background: rgba(10, 17, 30, 0.82);
    color: inherit;
    text-align: left;
    text-decoration: none;
}

.profile-favorite-card--ghost {
    width: 100%;
    border: 1px solid rgba(255, 215, 106, 0.08);
    cursor: pointer;
}

.profile-favorite-thumb {
    aspect-ratio: 0.72;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(9, 14, 26, 0.92);
}

.profile-favorite-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-favorite-thumb--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 215, 106, 0.72);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.profile-favorite-info {
    display: grid;
    gap: 0.36rem;
}

.profile-favorite-name {
    color: #f8fafc;
    font-size: 0.9rem;
    font-weight: 760;
}

.profile-favorite-meta {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    color: #aeb9d5;
    font-size: 0.76rem;
}

.profile-change-up {
    color: var(--price-rise-color, #ff4d4f);
}

.profile-change-down {
    color: var(--price-fall-color, #52c41a);
}

.profile-change-neutral {
    color: #94a3b8;
}

.profile-panel-head {
    display: grid;
    gap: 0.35rem;
}

.profile-settings-list,
.profile-password-form {
    display: grid;
    gap: 0.8rem;
}

.profile-settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 42px;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-settings-row:last-of-type {
    padding-bottom: 0;
}

.profile-settings-label,
.profile-form-label {
    color: #aeb9d5;
    font-size: 0.84rem;
    font-weight: 700;
}

.profile-settings-value {
    color: #f8fafc;
    font-size: 0.88rem;
    text-align: right;
    word-break: break-word;
}

.profile-inline-form {
    display: grid;
    gap: 0.5rem;
}

.profile-inline-form-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.6rem;
}

.profile-inline-form-row .profile-form-input {
    flex: 1 1 auto;
    min-width: 0;
}

.profile-inline-form-row .profile-form-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 84px;
    padding: 0 1rem;
    white-space: nowrap;
    word-break: keep-all;
    writing-mode: horizontal-tb;
}

.profile-form-input {
    width: 100%;
    min-height: 42px;
    padding: 0.7rem 0.82rem;
    border: 1px solid rgba(255, 215, 106, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    color: #f8fafc;
    font-size: 0.92rem;
}

.profile-form-input:focus {
    outline: none;
    border-color: rgba(255, 215, 106, 0.42);
    box-shadow: 0 0 0 3px rgba(255, 215, 106, 0.08);
}

.profile-form-button--block {
    width: 100%;
}

.profile-avatar-actions {
    display: flex;
    justify-content: flex-start;
}

.profile-form-message {
    padding: 0.8rem 0.9rem;
    border-radius: 14px;
    font-size: 0.84rem;
    line-height: 1.5;
}

.profile-form-message.is-error {
    border: 1px solid rgba(255, 77, 79, 0.28);
    background: rgba(127, 29, 29, 0.36);
    color: #fecaca;
}

.profile-form-message.is-success {
    border: 1px solid rgba(82, 196, 26, 0.28);
    background: rgba(22, 101, 52, 0.34);
    color: #dcfce7;
}

.profile-admin-list {
    display: grid;
    gap: 0.6rem;
}

.profile-admin-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255, 100, 100, 0.16);
    border-radius: 14px;
    background: rgba(127, 29, 29, 0.26);
    color: #fecaca;
    text-decoration: none;
}

.profile-inline-notice {
    position: fixed;
    left: 50%;
    bottom: 1.5rem;
    z-index: 980;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: min(520px, calc(100vw - 2rem));
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(255, 215, 106, 0.18);
    border-radius: 16px;
    background: rgba(12, 18, 31, 0.96);
    color: #f8fafc;
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(16px);
    transform: translate(-50%, 10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.profile-inline-notice.is-visible {
    transform: translate(-50%, 0);
    opacity: 1;
    pointer-events: auto;
}

.profile-inline-notice.is-success {
    border-color: rgba(82, 196, 26, 0.22);
}

.profile-inline-notice-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #f8fafc;
    cursor: pointer;
}
