* { box-sizing: border-box; }
html, body { min-height: 100%; }
body.profile-page { min-height: 100vh; margin: 0; overflow-x: hidden; color: #f8fafc; background: #070b12; }
#profileOverlay { position: fixed; inset: 0; z-index: 50; visibility: hidden; overflow: hidden; pointer-events: none; transition: visibility 0s linear .26s; }
#profileOverlay.open { visibility: visible; pointer-events: auto; transition-delay: 0s; }
.profile-backdrop-scrim { position: fixed; inset: 0; z-index: 2; opacity: 0; background: rgba(2, 7, 14, .74); -webkit-backdrop-filter: blur(10px) saturate(.68); backdrop-filter: blur(10px) saturate(.68); transition: opacity .24s ease; }
.profile-stage { position: relative; z-index: 3; display: flex; justify-content: center; width: 100%; height: 100%; min-height: 100vh; padding: clamp(1.15rem, 4vh, 3rem) 1rem 2.5rem; overflow-x: hidden; overflow-y: auto; }
.profile-scene { width: min(680px, 100%); opacity: 0; transform: translateY(9px) scale(.99); pointer-events: none; will-change: transform, opacity; transition: transform .26s cubic-bezier(.2,.8,.2,1), opacity .22s ease; }
body.profile-screen-open .profile-backdrop-scrim { opacity: 1; }
body.profile-screen-open .profile-scene { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
body.profile-screen-open .menu-center,
body.profile-screen-open .auth-corner,
body.profile-screen-open .discord-corner,
body.profile-screen-open .menu-version { opacity: 0; pointer-events: none; transition-duration: .22s; }
body.profile-screen-open .menu-center { animation: none; transform: translateY(-10px); }
.profile-back { display: inline-flex; align-items: center; gap: .48rem; min-height: 36px; margin: 0 0 .6rem; padding: .38rem .68rem; color: rgba(235, 242, 251, .72); text-decoration: none; background: transparent; border: 1px solid transparent; border-radius: 10px; font-size: .9rem; font-weight: 750; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.profile-back:hover, .profile-back:focus-visible { color: #fff; outline: 0; background: rgba(8, 14, 23, .36); border-color: rgba(255, 255, 255, .18); transform: translateX(-2px); }
.profile-back svg { width: 20px; height: 20px; }
.profile-brand { display: block; width: min(270px, 62vw); height: auto; margin: 0 auto .9rem; filter: drop-shadow(0 7px 18px rgba(0, 0, 0, .32)); }
.profile-heading { margin-bottom: 1.15rem; text-align: center; }
.profile-heading h1 { margin: 0; font-size: clamp(1.75rem, 4vw, 2.25rem); line-height: 1.1; letter-spacing: -.035em; }
.profile-heading p { margin: .38rem 0 0; color: rgba(203, 213, 225, .6); font-size: .95rem; }
.profile-surface { overflow: hidden; background: rgba(7, 17, 29, .79); border: 1px solid rgba(128, 157, 190, .24); border-radius: 16px; box-shadow: 0 24px 70px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .04); }
.profile-identity { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.25rem; background: linear-gradient(135deg, rgba(21, 55, 91, .5), rgba(9, 26, 44, .34)); border-bottom: 1px solid rgba(128, 157, 190, .18); }
.profile-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 72px; height: 72px; overflow: hidden; border: 3px solid rgba(96, 165, 250, .75); border-radius: 50%; color: #fff; background: linear-gradient(135deg, #2f82e8, #1457a7); box-shadow: 0 10px 26px rgba(0, 0, 0, .28), 0 0 0 4px rgba(59, 130, 246, .1); font-size: 1.6rem; font-weight: 850; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-identity-copy { min-width: 0; }
.profile-identity h2 { overflow: hidden; margin: 0; font-size: 1.35rem; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.profile-email { overflow: hidden; margin-top: .2rem; color: rgba(203, 213, 225, .65); font-size: .86rem; text-overflow: ellipsis; white-space: nowrap; }
.profile-meta { display: flex; flex-wrap: wrap; gap: .42rem; margin-top: .65rem; }
.profile-chip { display: inline-flex; align-items: center; gap: .32rem; padding: .28rem .55rem; color: #b9d8ff; background: rgba(49, 119, 202, .16); border: 1px solid rgba(96, 165, 250, .28); border-radius: 999px; font-size: .68rem; font-weight: 750; }
.profile-chip svg { width: 13px; height: 13px; }
.profile-form { padding: 1.25rem; }
.profile-section-label { margin: 0 0 .18rem; color: #65b9f3; font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-section-title { margin: 0 0 1rem; font-size: 1.15rem; }
.profile-field { margin-bottom: 1rem; }
.profile-field label { display: block; margin: 0 0 .4rem; color: rgba(226, 232, 240, .78); font-size: .82rem; font-weight: 650; }
.profile-input { display: block; width: 100%; min-height: 52px; padding: .72rem .9rem; color: #f8fafc; background: rgba(15, 23, 36, .84); border: 1px solid rgba(148, 163, 184, .22); border-radius: 10px; outline: none; font: inherit; transition: background .18s ease, border-color .18s ease, box-shadow .18s ease; }
.profile-input:focus { background: rgba(18, 30, 47, .94); border-color: rgba(96, 165, 250, .7); box-shadow: 0 0 0 3px rgba(59, 130, 246, .16); }
.profile-input:disabled { color: rgba(203, 213, 225, .58); opacity: 1; cursor: not-allowed; background: rgba(10, 18, 29, .64); }
.profile-help { margin: .38rem 0 0; color: rgba(148, 163, 184, .54); font-size: .72rem; }
.profile-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding-top: .2rem; }
.profile-button { display: inline-flex; align-items: center; justify-content: center; gap: .48rem; min-height: 46px; padding: .68rem 1rem; border-radius: 9px; font: inherit; font-size: .9rem; font-weight: 800; text-decoration: none; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease; }
.profile-button svg { width: 18px; height: 18px; }
.profile-button-primary { color: #fff; background: linear-gradient(135deg, #1684f8, #0f69ce); border: 1px solid #2d91ff; box-shadow: inset 0 -2px 0 rgba(4, 46, 99, .38); }
.profile-button-primary:hover { color: #fff; background: linear-gradient(135deg, #2994ff, #1478e7); transform: translateY(-1px); }
.profile-button-danger { color: #ff687d; background: transparent; border: 1px solid transparent; }
.profile-button-danger:hover { color: #ff8495; background: rgba(220, 53, 69, .1); border-color: rgba(255, 104, 125, .28); }
@media (max-width: 560px) {
    .profile-stage { align-items: flex-start; padding: .8rem; }
    .profile-brand { width: min(225px, 68vw); }
    .profile-identity { align-items: flex-start; padding: 1rem; }
    .profile-avatar { width: 62px; height: 62px; }
    .profile-form { padding: 1rem; }
    .profile-actions { align-items: stretch; flex-direction: column; }
    .profile-button { width: 100%; }
    .profile-button-danger { order: 2; }
}
