/* Perfil premium, personalizável e adaptável. */
#view-profile { max-width: 1280px; }
#view-profile > .page-heading { margin-bottom: 18px; }
.profile-showcase {
  position: relative; isolation: isolate; overflow: hidden; margin: 0 0 18px;
  padding: clamp(20px,4vw,36px); border: 1px solid rgba(167,139,250,.22);
  border-radius: 22px; background: linear-gradient(115deg,#181624,#151924 70%);
  box-shadow: 0 24px 60px rgba(0,0,0,.24),inset 0 1px rgba(255,255,255,.035);
  transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease;
  animation: profile-enter .55s cubic-bezier(.2,.8,.2,1) both;
}
.profile-showcase > :not(.profile-item-banner) { position:relative; z-index:1; }
.profile-showcase:hover { border-color: rgba(201,255,87,.28); box-shadow: 0 28px 70px rgba(0,0,0,.3),0 0 35px rgba(139,92,246,.08); }
.profile-showcase::before {
  position: absolute; z-index: -1; inset: 0; content: "";
  background: radial-gradient(ellipse at 76% 10%,rgba(139,92,246,.23),transparent 42%),linear-gradient(120deg,transparent 58%,rgba(255,255,255,.025));
  pointer-events: none; transition: background .3s ease;
}
.profile-showcase::after {
  position:absolute; z-index:0; inset:-70% -35%; content:"";
  background:linear-gradient(112deg,transparent 42%,rgba(255,255,255,.025) 48%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.025) 52%,transparent 58%);
  transform:translateX(-70%) rotate(8deg); pointer-events:none;
  animation:profile-card-sheen 9s ease-in-out infinite;
}
.profile-showcase[data-theme="ember"] { border-color: rgba(255,151,87,.3); }
.profile-showcase[data-theme="ember"]::before { background: radial-gradient(ellipse at 76% 10%,rgba(255,119,70,.3),transparent 44%),linear-gradient(120deg,transparent 58%,rgba(255,255,255,.025)); }
.profile-showcase[data-theme="ocean"] { border-color: rgba(77,184,255,.3); }
.profile-showcase[data-theme="ocean"]::before { background: radial-gradient(ellipse at 76% 10%,rgba(38,142,255,.3),transparent 44%),linear-gradient(120deg,transparent 58%,rgba(255,255,255,.025)); }
.profile-showcase[data-theme="lime"] { border-color: rgba(201,255,87,.28); }
.profile-showcase[data-theme="lime"]::before { background: radial-gradient(ellipse at 76% 10%,rgba(150,225,65,.24),transparent 44%),linear-gradient(120deg,transparent 58%,rgba(255,255,255,.025)); }
.profile-showcase[style*="background-image"] { background-size: cover; background-position: center; }
.profile-item-banner { position:absolute; inset:0; z-index:0; overflow:hidden; pointer-events:none; }
.profile-item-banner:not(:empty)::after { position:absolute; inset:0; content:""; background:linear-gradient(90deg,rgba(8,10,20,.89),rgba(8,10,20,.58) 55%,rgba(8,10,20,.24)); }
.profile-item-banner .store-art, .profile-item-banner .store-banner { position:absolute; inset:0; width:100%; height:100%; min-height:0; max-width:none; padding:0; border:0; border-radius:0; }
.profile-item-banner .banner-copy, .profile-item-banner .photo-banner-copy { display:none; }
.profile-item-banner .banner-emblem { right:5%; top:20%; width:180px; height:180px; }
.profile-avatar-wrap { position:relative; flex:none; }
.profile-item-frame { position:absolute; z-index:2; inset:-5px; pointer-events:none; }
.profile-item-frame .store-art { position:absolute; inset:0; display:block; min-height:0; padding:0; overflow:visible; background:transparent; }
.profile-item-frame .store-art::before { display:none; }
.profile-item-frame .art-smoke { opacity:.28; filter:blur(8px); }
.profile-item-frame .art-rays { opacity:.12; }
.profile-item-frame .store-frame { width:100%; height:100%; background:transparent; }
.profile-item-frame .frame-avatar { display:none; }
.profile-item-frame .art-hex .store-frame, .profile-item-frame .art-crystal .store-frame { transform:none; }
.profile-item-frame .art-hex .frame-emblem, .profile-item-frame .art-crystal .frame-emblem { transform:none; top:-26px; right:auto; }
.profile-item-companion { position:relative; flex:none; width:180px; height:180px; }
.profile-item-companion:empty { display:none; }
.profile-item-companion .store-art { width:100%; height:100%; min-height:0; padding:0; border:0; overflow:visible; background:transparent; }
.profile-item-companion .store-art.is-visible:hover { box-shadow:none; }
.profile-item-companion .store-art::before,.profile-item-companion .store-art::after,
.profile-item-companion .art-smoke,.profile-item-companion .art-rays,.profile-item-companion .golden-glint { display:none; }
.profile-item-companion .store-mascot-illustration { height:100%; width:100%; }
.profile-item-companion .golden-ring { width:140px; height:140px; }
.profile-item-companion .golden-mascot-label { font-size:76px; }
.profile-item-companion .store-mascot-illustration { filter:drop-shadow(0 0 12px color-mix(in srgb,var(--art-color) 45%,transparent)) drop-shadow(0 12px 18px rgba(0,0,0,.45)); }
.profile-item-frame .store-art.is-visible .store-frame { box-shadow:0 0 0 4px color-mix(in srgb,var(--art-accent) 70%,#151323),0 0 30px color-mix(in srgb,var(--art-color) 68%,transparent),inset 0 0 22px var(--art-accent); }
.profile-avatar-wrap .showcase-avatar,.profile-avatar-wrap .social-avatar { position:relative; z-index:1; box-shadow:0 12px 32px rgba(0,0,0,.4),0 0 22px rgba(201,255,87,.16); }
.profile-showcase:hover .profile-avatar-wrap .showcase-avatar,.friend-profile-banner:hover .profile-avatar-wrap .social-avatar { transform:translateY(-3px) rotate(-2deg); }
.profile-showcase-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; }
.showcase-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.profile-label { display:inline-flex; align-items:center; gap:8px; color:#d5c6ff; font-size:9px; font-weight:700; letter-spacing:1.6px; }
.profile-label i { width:7px; height:7px; border-radius:50%; background:#c9ff57; box-shadow:0 0 12px rgba(201,255,87,.7); animation: profile-pulse 2.4s ease-in-out infinite; }
.profile-id { color:rgba(255,255,255,.5); font:700 8px 'Space Grotesk',sans-serif; letter-spacing:1.2px; }
.showcase-main { display:flex; align-items:center; gap:20px; margin-top:32px; }
.showcase-avatar { display:grid; flex:none; width:100px; height:100px; place-items:center; overflow:hidden; border:3px solid rgba(255,255,255,.86); border-radius:28px; background:linear-gradient(145deg,#a78bfa,#5437a3); background-position:center; background-size:cover; color:#fff; font:700 42px 'Space Grotesk',sans-serif; box-shadow:0 12px 32px rgba(0,0,0,.35),0 0 0 7px rgba(255,255,255,.06); transition:transform .28s ease,box-shadow .28s ease; }
.profile-showcase:hover .showcase-avatar { transform:translateY(-3px) rotate(-2deg); box-shadow:0 16px 38px rgba(0,0,0,.42),0 0 0 7px rgba(201,255,87,.09); }
.showcase-avatar.has-avatar-image,.user-initial.has-avatar-image { background-position:center; background-size:cover; background-repeat:no-repeat; color:transparent; }
.showcase-identity { flex:1; min-width:0; }
.profile-level { color:#c9ff57; font-size:8px; font-weight:700; letter-spacing:1.4px; }
.showcase-identity h2 { margin:7px 0 4px; font:700 clamp(25px,4vw,36px)/1.08 'Space Grotesk',sans-serif; letter-spacing:-1.2px; overflow-wrap:anywhere; }
.showcase-identity p { max-width:540px; margin:0; color:rgba(255,255,255,.72); font-size:11px; line-height:1.65; overflow-wrap:anywhere; }
.favorite-game { display:inline-flex; flex-direction:column; gap:4px; margin-top:13px; padding:7px 10px; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:rgba(10,10,16,.3); }
.favorite-game span { color:rgba(255,255,255,.48); font-size:7px; font-weight:700; letter-spacing:1px; }
.favorite-game strong { font-size:9px; }
.profile-edit-trigger { flex:none; }
.profile-edit-trigger:hover { box-shadow:0 12px 28px rgba(201,255,87,.28); }
.profile-results { margin:0 0 18px; padding:18px 22px; border:1px solid rgba(255,255,255,.08); border-radius:17px; background:#151924; }
.showcase-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); }
.showcase-stats div { display:grid; gap:5px; padding:2px 12px; border-right:1px solid rgba(255,255,255,.08); }
.showcase-stats div:first-child { padding-left:0; }
.showcase-stats div:last-child { border:0; }
.showcase-stats strong { font:600 24px 'Space Grotesk',sans-serif; transition:color .2s ease; }
.showcase-stats div:hover strong { color:#c9ff57; }
.showcase-stats span { color:rgba(255,255,255,.58); font-size:9px; }
.profile-data-note { margin:15px 0 0; color:rgba(255,255,255,.4); font-size:8px; }
.profile-editor-dialog { width:min(620px,calc(100vw - 28px)); max-height:min(90vh,850px); overflow:auto; padding:0; border:1px solid rgba(255,255,255,.12); border-radius:18px; background:#151821; color:#f5f7fb; box-shadow:0 30px 90px rgba(0,0,0,.55); animation: profile-dialog-enter .22s ease both; }
.profile-editor-dialog::backdrop { background:rgba(4,5,9,.76); backdrop-filter:blur(6px); }
#profile-editor-form { padding:24px; }
.editor-heading { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:20px; }
.editor-heading .eyebrow { margin-bottom:5px; }
.editor-heading h2 { margin:0; font:600 22px 'Space Grotesk',sans-serif; }
.editor-close { width:32px; height:32px; border:1px solid rgba(255,255,255,.1); border-radius:9px; color:#c9cbd4; font-size:20px; transition:background .18s ease,color .18s ease; }
.editor-close:hover { background:rgba(255,255,255,.08); color:#fff; }
.profile-field { display:grid; gap:7px; margin:0 0 14px; color:#e7e8ee; font-size:10px; font-weight:600; }
.profile-field small { color:#9296a4; font-size:8px; font-weight:400; }
.profile-field input,.profile-field select,.profile-field textarea { width:100%; min-height:40px; padding:9px 11px; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:#10131a; color:#f5f7fb; font-size:10px; transition:border-color .18s ease,box-shadow .18s ease; }
.profile-field input:focus,.profile-field select:focus,.profile-field textarea:focus { border-color:rgba(167,139,250,.8); box-shadow:0 0 0 3px rgba(139,92,246,.13); outline:none; }
.profile-field input[type="file"] { padding:8px; }
.profile-field textarea { min-height:78px; resize:vertical; }
.profile-field-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.banner-themes { display:grid; gap:9px; margin:2px 0 14px; color:#e7e8ee; font-size:10px; font-weight:600; }
.banner-themes > div { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.theme-swatch { width:27px; height:27px; border:2px solid rgba(255,255,255,.45); border-radius:50%; transition:transform .18s ease,box-shadow .18s ease; }
.theme-swatch:hover { transform:scale(1.13); box-shadow:0 0 0 4px rgba(255,255,255,.08); }
.theme-swatch.violet { background:linear-gradient(135deg,#a78bfa,#392467); }
.theme-swatch.ember { background:linear-gradient(135deg,#ffad5c,#6c2f31); }
.theme-swatch.ocean { background:linear-gradient(135deg,#49c6ed,#153c78); }
.theme-swatch.lime { background:linear-gradient(135deg,#d9ff66,#3c6841); }
.theme-swatch:focus-visible { outline:2px solid #fff; outline-offset:2px; }
.theme-reset { margin-left:auto; color:#c5b4ff; font-size:8px; text-decoration:underline; text-underline-offset:3px; }
.editor-warning { padding:10px 11px; border:1px solid rgba(255,184,112,.18); border-radius:9px; background:rgba(255,184,112,.05); color:#e6c6a5; font-size:8px; line-height:1.6; }
.editor-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:16px; }
.achievement-panel,.history-panel { transition:border-color .2s ease,transform .2s ease; }
.achievement-card { transition:transform .2s ease,border-color .2s ease,background .2s ease; }
.achievement-card:hover { transform:translateY(-2px); }
.history-row { transition:padding .18s ease,background .18s ease; }
.history-row:hover { padding-right:8px; padding-left:8px; background:rgba(255,255,255,.025); }
@keyframes profile-enter { from { opacity:0; transform:translateY(12px) scale(.99); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes profile-dialog-enter { from { opacity:0; transform:translateY(8px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes profile-pulse { 50% { box-shadow:0 0 18px rgba(201,255,87,.95); opacity:.72; } }
@keyframes profile-card-sheen { 0%,35% { transform:translateX(-70%) rotate(8deg); opacity:0; } 45% { opacity:1; } 65%,100% { transform:translateX(70%) rotate(8deg); opacity:0; } }
@media (max-width:760px) {
  #view-profile > .page-heading { margin-bottom:14px; }
  .profile-showcase { padding:20px; border-radius:17px; }
  #profile-showcase { padding:16px; }
  .showcase-main {
    display:grid; grid-template-columns:64px minmax(0,1fr) clamp(60px,20vw,96px);
    grid-template-areas:"avatar level companion" "avatar name companion" "avatar game companion" "bio bio bio";
    align-items:center; gap:4px 8px; margin-top:18px;
  }
  .showcase-main .profile-avatar-wrap { grid-area:avatar; }
  .showcase-avatar { width:64px; height:64px; border-radius:19px; font-size:28px; }
  .showcase-identity { display:contents; }
  .showcase-identity > * { min-width:0; }
  .showcase-identity .profile-level { grid-area:level; }
  .showcase-identity h2 { grid-area:name; margin:0; }
  .showcase-identity p { grid-area:bio; margin-top:6px; }
  .showcase-identity .favorite-game { grid-area:game; justify-self:start; margin-top:0; }
  #profile-showcase .profile-item-companion { grid-area:companion; width:clamp(60px, 20vw, 96px); height:clamp(60px, 20vw, 96px); }
  .profile-item-companion .golden-ring { width:80%; height:80%; }
  #profile-showcase .profile-item-companion .golden-mascot-label { font-size:clamp(32px, 10vw, 48px); }
  .profile-showcase-actions { margin-top:14px; }
  .profile-showcase-actions .profile-edit-trigger { width:auto; }
  .profile-results { padding:16px; }
  .showcase-stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .showcase-stats div:nth-child(2) { border-right:0; }
  .showcase-stats div:nth-child(n+3) { border-top:1px solid rgba(255,255,255,.08); }
  .showcase-stats div:nth-child(3) { padding-left:0; }
}
@media (max-width:480px) {
  #profile-editor-form { padding:18px; }
  .profile-field-row { grid-template-columns:1fr; gap:0; }
  .profile-id { font-size:7px; }
  .showcase-identity h2 { font-size:19px; letter-spacing:-.4px; }
  .showcase-stats strong { font-size:21px; }
  .editor-actions { flex-direction:column-reverse; }
  .editor-actions button { width:100%; }
}
@media (prefers-reduced-motion: reduce) {
  .profile-showcase,.profile-editor-dialog { animation:none; }
  .profile-showcase::after,.profile-showcase,.profile-showcase *, .profile-showcase *::before,.profile-showcase *::after,.profile-editor-dialog * { animation:none !important; transition:none !important; scroll-behavior:auto !important; }
  .profile-showcase:hover .showcase-avatar,.friend-profile-banner:hover .profile-avatar-wrap .social-avatar { transform:none; }
}
