/* AUREUM PROFILE HEADER V3 — presentation only, DB rank from /api/referrals/me */
.aureum-profile{--tier:#b87e50;--tier-light:#efc69c;--tier-deep:#59321d;--tier-glow:rgba(184,126,80,.35);--tier-faint:rgba(184,126,80,.13);--tier-soldier:sepia(.85) saturate(1.35) hue-rotate(-12deg);position:relative;isolation:isolate;overflow:hidden;grid-template-columns:minmax(0,1.48fr) minmax(215px,.87fr) minmax(270px,1fr)!important;gap:11px!important;padding:16px!important;border-color:color-mix(in srgb,var(--tier) 55%,#443525)!important;background:linear-gradient(112deg,rgba(14,17,21,.97),rgba(10,13,18,.96))!important;box-shadow:0 18px 55px #000a,0 0 23px var(--tier-faint),inset 0 1px rgba(255,227,163,.15)!important}
.aureum-profile.rank-silver{--tier:#a9bbd2;--tier-light:#f1f7ff;--tier-deep:#425675;--tier-glow:rgba(160,199,255,.37);--tier-faint:rgba(168,203,255,.12);--tier-soldier:grayscale(1) brightness(1.28) contrast(1.18)}
.aureum-profile.rank-gold{--tier:#cfa340;--tier-light:#ffe9a3;--tier-deep:#855012;--tier-glow:rgba(255,183,38,.43);--tier-faint:rgba(255,185,36,.16);--tier-soldier:sepia(1) saturate(2.4) contrast(1.1)}
.aureum-profile.rank-platinum{--tier:#69d0da;--tier-light:#e2fdff;--tier-deep:#19525b;--tier-glow:rgba(105,208,218,.42);--tier-faint:rgba(105,208,218,.14);--tier-soldier:sepia(.6) saturate(2.5) hue-rotate(135deg) brightness(1.18)}
.aureum-profile.rank-diamond{--tier:#9b9af7;--tier-light:#f2eeff;--tier-deep:#454390;--tier-glow:rgba(155,154,247,.49);--tier-faint:rgba(155,154,247,.17);--tier-soldier:sepia(.7) saturate(2.8) hue-rotate(205deg) brightness(1.15)}
.aureum-profile.rank-obsidian{--tier:#8e64c6;--tier-light:#ead8ff;--tier-deep:#40205d;--tier-glow:rgba(142,100,198,.66);--tier-faint:rgba(142,100,198,.21);--tier-soldier:sepia(.65) saturate(3) hue-rotate(195deg) contrast(1.25)}
.aureum-profile::before{content:'';position:absolute;inset:0;pointer-events:none;z-index:-1;background:radial-gradient(ellipse at 20% 50%,var(--tier-faint),transparent 45%),linear-gradient(90deg,transparent 55%,var(--tier-faint));}
.aureum-profile>.profile-user-card,.aureum-profile>.profile-balance-card,.aureum-profile .profile-stat-box{border:1px solid color-mix(in srgb,var(--tier) 42%,#252a30)!important;background:linear-gradient(140deg,rgba(15,18,24,.88),rgba(8,12,17,.94))!important;box-shadow:inset 0 1px rgba(255,255,255,.07),0 0 18px rgba(0,0,0,.25)!important;border-radius:11px!important}
.aureum-profile>.profile-user-card{position:relative;min-width:0;overflow:hidden;display:flex;align-items:center;gap:13px;padding:17px!important;background:radial-gradient(ellipse at 23% 42%,var(--tier-faint),transparent 62%),linear-gradient(95deg,rgba(13,16,20,.94) 20%,rgba(13,15,20,.72))!important}
.aureum-profile .profile-rank-ambient{position:absolute;inset:-20px -14px -20px 34%;pointer-events:none;opacity:.22;background:url('/assets/gold-soldiers.webp') center 42% / cover no-repeat;filter:var(--tier-soldier);mask-image:linear-gradient(90deg,transparent,#000 45%);-webkit-mask-image:linear-gradient(90deg,transparent,#000 45%)}
.aureum-profile .profile-user-card::before{content:'';position:absolute;inset:0;pointer-events:none;border-top:1px solid var(--tier);opacity:.42}
.aureum-profile .profile-avatar-frame{position:relative;flex:0 0 91px;width:91px;height:91px;border-radius:50%;padding:4px;border:2px solid var(--tier);background:linear-gradient(135deg,var(--tier-light),var(--tier-deep) 45%,#080d13 75%,var(--tier));box-shadow:0 0 20px var(--tier-glow),0 0 0 4px rgba(0,0,0,.56),inset 0 0 10px var(--tier-glow)}
.aureum-profile .profile-avatar-large{display:block;width:100%!important;height:100%!important;object-fit:cover;border:0!important;border-radius:50%!important;box-shadow:none!important}
.aureum-profile .profile-avatar-spark{position:absolute;top:-15px;left:calc(50% - 9px);font-size:19px;color:var(--tier-light);text-shadow:0 0 12px var(--tier)}
.aureum-profile .profile-avatar-crest{position:absolute;top:6px;left:18px;font-size:12px;color:var(--tier);opacity:.8}
.aureum-profile .profile-user-info{position:relative;z-index:1;min-width:0;flex:1}
.aureum-profile .profile-name-line{gap:7px!important;min-width:0;flex-wrap:wrap!important}
.aureum-profile .profile-name-line #profileUsername{font-size:clamp(15px,1.18vw,21px)!important;font-weight:900!important;line-height:1.35!important;letter-spacing:.01em;color:var(--tier-light)!important;background:linear-gradient(110deg,var(--tier) 0%,var(--tier-light) 40%,var(--tier) 85%)!important;background-clip:text!important;-webkit-background-clip:text!important;-webkit-text-fill-color:transparent!important;filter:drop-shadow(0 0 6px var(--tier-glow));overflow-wrap:anywhere;margin:0!important}
.aureum-profile #profileRankBadge{font-size:19px!important;color:var(--tier)!important;filter:drop-shadow(0 0 6px var(--tier))!important}
.aureum-profile .profile-steam-id{font-size:11px!important;color:#c4bdaf!important;margin:5px 0 9px!important}
.aureum-profile .profile-rank-ribbon{display:inline-flex;align-items:center;gap:7px;margin-bottom:3px;padding:4px 11px 4px 8px;border:1px solid var(--tier);border-radius:5px;background:linear-gradient(110deg,var(--tier-deep),rgba(12,14,20,.88));color:var(--tier-light);font-size:10px;font-weight:900;letter-spacing:.1em;text-shadow:0 0 8px var(--tier-glow);box-shadow:0 0 13px var(--tier-faint)}
.aureum-profile .profile-rank-ribbon-symbol,.aureum-profile .profile-rank-ribbon-flare{color:var(--tier-light)}
.aureum-profile .profile-settings-btn,.aureum-profile .profile-referral-btn{position:relative;z-index:2;margin-top:8px!important;font-size:11px!important;padding:7px 10px!important;border-color:color-mix(in srgb,var(--tier) 50%,#34312b)!important}
.aureum-profile .profile-referral-btn{background:linear-gradient(110deg,var(--tier-deep),#161820)!important;color:var(--tier-light)!important}
.aureum-profile>.profile-balance-card{min-width:0;padding:17px!important;justify-content:center;gap:7px;background:radial-gradient(ellipse at 70% 0%,var(--tier-faint),transparent 75%),rgba(10,15,21,.95)!important}
.aureum-profile .profile-card-title{font-size:11px!important;letter-spacing:.08em;color:#d3c4ae!important}
.aureum-profile .profile-balance-value{margin:3px 0 7px!important;font-size:clamp(23px,2vw,34px)!important;color:var(--tier-light)!important;text-shadow:0 0 14px var(--tier-glow)}
.aureum-profile .profile-balance-value i{color:#f39c12!important}
.aureum-profile .profile-topup-btn{height:41px!important;flex-shrink:0}
.aureum-profile .profile-stats{min-width:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px!important}
.aureum-profile .profile-stat-box{min-width:0;padding:13px 5px!important;gap:9px!important;position:relative;overflow:hidden}
.aureum-profile .profile-stat-box::before{content:'';position:absolute;inset:0 0 auto;height:2px;background:linear-gradient(90deg,transparent,var(--tier),transparent);opacity:.7}
.aureum-profile .profile-stat-icon{font-size:16px;color:var(--tier);filter:drop-shadow(0 0 7px var(--tier-glow))}
.aureum-profile .stat-label{font-size:10px!important;color:#d0c7b9!important;letter-spacing:.025em}
.aureum-profile .stat-value{font-size:25px!important;color:var(--tier-light);text-shadow:0 0 12px var(--tier-glow)}
.aureum-profile .stat-value.stat-win{color:#35e49a!important;text-shadow:0 0 12px #13b67b4d}
.aureum-profile .stat-value.stat-loss{color:#ff5c62!important;text-shadow:0 0 12px #fa404a4d}
.aureum-profile.rank-diamond .profile-avatar-frame,.aureum-profile.rank-obsidian .profile-avatar-frame{animation:aureumAvatarPulse 3.8s ease-in-out infinite alternate}
.aureum-profile.rank-obsidian::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(120deg,transparent 15%,rgba(142,100,198,.085) 48%,transparent 78%);background-size:230% 100%;animation:aureumSweep 8s linear infinite}
@keyframes aureumAvatarPulse{to{box-shadow:0 0 31px var(--tier-glow),0 0 0 4px rgba(0,0,0,.56),inset 0 0 16px var(--tier-glow)}}
@keyframes aureumSweep{to{background-position:230% 0}}
@media(max-width:1150px){.aureum-profile{grid-template-columns:minmax(0,1.4fr) minmax(195px,.9fr)!important}.aureum-profile .profile-stats{grid-column:1/-1}.aureum-profile .profile-stat-box{min-height:95px}}
@media(max-width:700px){.aureum-profile{grid-template-columns:minmax(0,1fr)!important;padding:11px!important}.aureum-profile .profile-stats{grid-column:auto}.aureum-profile>.profile-user-card{min-height:165px}.aureum-profile .profile-name-line #profileUsername{font-size:17px!important}.aureum-profile>.profile-balance-card{min-height:150px}}
@media(max-width:380px){.aureum-profile .profile-avatar-frame{width:72px;height:72px;flex-basis:72px}.aureum-profile>.profile-user-card{gap:10px;padding:11px!important}.aureum-profile .profile-stat-box{padding:10px 3px!important}.aureum-profile .stat-label{font-size:9px!important}}
@media(prefers-reduced-motion:reduce){.aureum-profile *{animation:none!important}}

/* Keep the username clean; rank is already shown by its colors and ribbon. */
.aureum-profile #profileRankBadge{display:none!important}


/* Diamond — match lavender rank color */
.aureum-profile.rank-obsidian .profile-rank-ambient {
    background-image:
        linear-gradient(
            rgba(120, 65, 205, 0.65),
            rgba(155, 100, 235, 0.65)
        ),
        url('/assets/gold-soldiers.webp') !important;

    background-blend-mode: color !important;
    filter: saturate(1.3) !important;
    opacity: 0.38 !important;
}
/* Compact account sign-out control; keeps the existing profile layout intact. */
.aureum-profile .profile-logout-btn {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: baseline;
    width: 31px;
    height: 31px;
    margin: 8px 0 0 7px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--tier) 45%, #34312b);
    border-radius: 7px;
    background: #141920;
    color: #e2d2b6;
    cursor: pointer;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.aureum-profile .profile-logout-btn:hover,
.aureum-profile .profile-logout-btn:focus-visible {
    color: #ffcc76;
    border-color: #e4a94b;
    background: #262016;
}
.aureum-profile .profile-logout-btn:disabled { opacity: .55; cursor: wait; }

.aureum-profile .profile-logout-btn {
    transform: translateY(1px);
}