/* Cosméticos: arte (avatar, moldura, tag, título, banner) e as janelas Personalizar e Loja VIP. */

@font-face { font-family: "Kaushan Script"; src: url("/assets/cosmetics/fonts/KaushanScript-Regular.ttf"); font-display: swap; }
@font-face { font-family: "Russo One"; src: url("/assets/cosmetics/fonts/RussoOne-Regular.ttf"); font-display: swap; }
@font-face { font-family: "Orbitron"; src: url("/assets/cosmetics/fonts/Orbitron.ttf"); font-display: swap; }

/* ---- Avatar e moldura ---- */
.cav { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 10%), inset 0 -6px 12px rgb(0 0 0 / 45%); }
.cav canvas { display: block; }
.cframe { position: relative; display: inline-grid; place-items: center; flex: none; }
.cframe-av { position: relative; z-index: 1; }
.cframe-fx { position: absolute; z-index: 2; pointer-events: none; }
.cmini { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 50%; padding: 2px; vertical-align: middle;
  background: conic-gradient(from var(--cm-a, 0deg), var(--c3), var(--c2), var(--c1), var(--c2), var(--c3));
  box-shadow: 0 0 6px color-mix(in srgb, var(--c2) 70%, transparent); animation: cmspin 4s linear infinite; }
.cmini .cav { box-shadow: none; }
@property --cm-a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes cmspin { to { --cm-a: 360deg; } }

/* ---- Tag de nome (placa neon) ---- */
.cplate {
  --c1: #7fb2ff; --c2: #3a6fd8;
  position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; vertical-align: middle;
  padding: 4px 14px 4px 8px; border-radius: 999px; color: var(--c1); white-space: nowrap;
  background: linear-gradient(180deg, rgb(8 10 22 / 92%), rgb(3 4 10 / 95%));
  border: 1.5px solid var(--c1);
  box-shadow: 0 0 6px color-mix(in srgb, var(--c1) 70%, transparent), inset 0 0 10px color-mix(in srgb, var(--c2) 45%, transparent);
  animation: cpglow 2.6s ease-in-out infinite;
}
@keyframes cpglow { 50% { box-shadow: 0 0 14px color-mix(in srgb, var(--c1) 90%, transparent), inset 0 0 14px color-mix(in srgb, var(--c2) 60%, transparent); } }
.cplate-name { overflow: hidden; text-overflow: ellipsis; text-shadow: 0 0 6px var(--c2), 0 0 2px var(--c1); color: color-mix(in srgb, var(--c1) 55%, #fff); }
.cplate-icon { display: inline-grid; width: 1.35em; height: 1.35em; flex: none; filter: drop-shadow(0 0 4px var(--c1)); }
.cplate-icon svg { width: 100%; height: 100%; }
.cpf-sans .cplate-name { font: 700 1em "Segoe UI", Tahoma, sans-serif; }
.cpf-bold .cplate-name { font: 1em "Russo One", Impact, sans-serif; font-style: italic; letter-spacing: 0.02em; }
.cpf-mono .cplate-name { font: 700 0.95em "Orbitron", Consolas, monospace; letter-spacing: 0.04em; }
.cpf-script .cplate-name { font: 1.08em "Kaushan Script", "Segoe Script", cursive; }
.cpfr-tech { border-radius: 4px; clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px); }
.cpfr-ornate { outline: 1px solid color-mix(in srgb, var(--c1) 45%, transparent); outline-offset: 2px; }
.cplate-orn { position: absolute; top: 50%; width: 7px; height: 7px; background: var(--c1); transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 6px var(--c1); }
.cplate-orn.l { left: -5px; } .cplate-orn.r { right: -5px; }
.cp-rainbow { animation: cpglow 2.6s ease-in-out infinite, cphue 6s linear infinite; }
@keyframes cphue { to { filter: hue-rotate(360deg); } }
.cp-sm { font-size: 12px; padding: 2px 10px 2px 5px; gap: 4px; }
.cp-md { font-size: 15px; }
.cp-lg { font-size: 22px; padding: 7px 22px 7px 12px; gap: 9px; }
.cp-xs { font-size: 11px; padding: 0 7px 0 3px; gap: 3px; border-width: 1px; animation: none; box-shadow: 0 0 4px color-mix(in srgb, var(--c1) 60%, transparent); }
.cplate .cprefix { display: inline-flex; align-items: center; }

/* ---- Título ---- */
.ctitle {
  --c1: #fff; --c2: #ffd25a; --c3: #ff7ad8;
  position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 3px 14px 3px 8px; border-radius: 999px; white-space: nowrap; vertical-align: middle;
  background: linear-gradient(180deg, rgb(24 16 44 / 92%), rgb(6 8 18 / 95%)); isolation: isolate;
  box-shadow: 0 0 10px color-mix(in srgb, var(--c2) 55%, transparent);
}
.ctitle::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; z-index: -1;
  background: linear-gradient(90deg, var(--c2), var(--c1), var(--c3), var(--c2)); background-size: 300% 100%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ctborder 3s linear infinite;
}
@keyframes ctborder { to { background-position: 300% 0; } }
.ctitle-icon { display: inline-grid; width: 1.3em; height: 1.3em; filter: drop-shadow(0 0 4px var(--c2)); }
.ctitle-icon svg { width: 100%; height: 100%; }
.ctitle-text {
  font: 1em "Russo One", Tahoma, sans-serif; letter-spacing: 0.03em;
  background: linear-gradient(100deg, var(--c2) 0 40%, #fff 48%, var(--c1) 52%, var(--c2) 60% 100%); background-size: 260% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: ctshine 2.8s linear infinite;
  filter: drop-shadow(0 0 3px color-mix(in srgb, var(--c2) 70%, transparent));
}
@keyframes ctshine { from { background-position: 130% 0; } to { background-position: -130% 0; } }
.ctfx-rainbow .ctitle-text { background: linear-gradient(90deg, #ff4d4d, #ffd25a, #5aff8a, #4dd2ff, #b06aff, #ff4d8d, #ff4d4d); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; animation: ctborder 3s linear infinite; }
.ctitle-p { position: absolute; left: calc(8% + var(--i) * 16%); bottom: 40%; width: 4px; height: 4px; border-radius: 50%; pointer-events: none;
  background: var(--c1); box-shadow: 0 0 6px var(--c2); opacity: 0; animation: ctp 2.2s ease-out infinite; animation-delay: calc(var(--i) * -0.37s); }
.ctfx-sparkle .ctitle-p, .ctfx-celestial .ctitle-p, .ctfx-rainbow .ctitle-p { width: 6px; height: 6px; border-radius: 0; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); background: #fff; }
.ctfx-embers .ctitle-p { background: var(--c2); }
.ctfx-bubbles .ctitle-p { background: transparent; border: 1px solid #bfefff; }
.ctfx-runes .ctitle-p { width: 5px; height: 5px; border-radius: 1px; transform: rotate(45deg); }
@keyframes ctp { 0% { opacity: 0; transform: translateY(6px) scale(0.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scale(1); } }
.ctr-mitico { box-shadow: 0 0 16px color-mix(in srgb, var(--c2) 70%, transparent), 0 0 30px color-mix(in srgb, var(--c3) 35%, transparent); }
.ct-sm { font-size: 11px; padding: 2px 10px 2px 6px; }
.ct-md { font-size: 14px; }
.ct-lg { font-size: 19px; padding: 5px 18px 5px 10px; }

/* ---- Banner de anúncio ---- */
.cbanner { --b1: #2a3a5a; --b2: #121a2b; --ring: #7fa6d8; position: relative; width: 100%; max-width: 620px; height: 74px; padding-left: 30px; }
.cbanner-bar {
  position: absolute; left: 30px; right: 0; top: 10px; bottom: 10px; overflow: hidden; border-radius: 6px 999px 999px 6px;
  background: linear-gradient(90deg, var(--b1), color-mix(in srgb, var(--b2) 80%, #000) 85%, rgb(0 0 0 / 0));
  border: 2px solid color-mix(in srgb, var(--ring) 85%, #fff); border-left: 0;
  box-shadow: 0 0 14px color-mix(in srgb, var(--b1) 60%, transparent), inset 0 2px 0 rgb(255 255 255 / 25%);
}
.cbanner-fx { position: absolute; inset: 0; width: 100%; height: 100%; }
.cbanner-body { position: relative; display: grid; align-content: center; gap: 2px; height: 100%; padding: 0 22px 0 48px; min-width: 0; }
.cbanner-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cbanner-kind { font: 700 10px "Segoe UI", sans-serif; letter-spacing: 0.12em; text-transform: uppercase; color: #fff; opacity: 0.85; text-shadow: 0 1px 2px #000; }
.cbanner-text { font: 600 13px "Segoe UI", sans-serif; color: #fff; text-shadow: 0 1px 2px #000, 0 0 6px rgb(0 0 0 / 60%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cbanner-av { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 2; width: 62px; height: 62px; display: grid; place-items: center;
  border-radius: 50%; background: radial-gradient(#0b1020, #000); box-shadow: 0 0 0 2px var(--ring), 0 0 14px var(--ring); }
.cbanner-decor { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.cbanner-decor > span { position: absolute; display: block; }
.cbanner-decor svg { width: 100%; height: 100%; filter: drop-shadow(0 0 4px rgb(0 0 0 / 60%)); }
.cbd-crown { left: 16px; top: -12px; width: 30px; height: 30px; animation: cbfloat 2.4s ease-in-out infinite; }
.cbd-laurel { right: -12px; top: 8px; width: 46px; height: 58px; }
.cbd-wing { top: 4px; width: 44px; height: 44px; }
.cbd-wing.l { left: -16px; transform: scaleX(-1) rotate(-20deg); animation: cbflap 1.8s ease-in-out infinite; }
.cbd-wing.r { right: -20px; transform: rotate(-20deg); animation: cbflapr 1.8s ease-in-out infinite; }
.cbd-bat { right: -40px; top: -6px; width: 90px; height: 70px; opacity: 0.85; animation: cbfloat 3s ease-in-out infinite; }
.cbd-bfly { right: 10px; top: -14px; width: 30px; height: 30px; animation: cbfloat 1.6s ease-in-out infinite; }
@keyframes cbfloat { 50% { transform: translateY(-4px); } }
@keyframes cbflap { 50% { transform: scaleX(-1) rotate(-6deg); } }
@keyframes cbflapr { 50% { transform: rotate(-6deg); } }

/* Anúncio global sobre o palco */
.announce-layer { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); z-index: 30; width: min(620px, 92%); pointer-events: none; display: grid; gap: 6px; }
.announce-layer .cbanner { animation: anin 0.5s cubic-bezier(.2,1.4,.4,1) both; }
.announce-layer .cbanner.out { animation: anout 0.45s ease-in both; }
@keyframes anin { from { opacity: 0; transform: translateY(-24px) scale(0.92); } }
@keyframes anout { to { opacity: 0; transform: translateY(-14px); } }

/* Nome com avatar (chat, ranking, perfil, mercado) */
.cname { display: inline-flex; align-items: center; gap: 6px; min-width: 0; vertical-align: middle; }
.cname .cmini { margin-right: 1px; }
.cname-badges { display: inline-flex; align-items: center; gap: 3px; }
.msg .cname { margin-right: 4px; }
.msg .cname .cplate { font-size: 11px; }

/* Diamantes no HUD */
.diamondline { display: flex; align-items: center; gap: 6px; padding: 0 12px 6px; font-weight: 700; color: #9fe8ff; cursor: pointer; }
.diamondline .dicon, .dicon { display: inline-block; width: 15px; height: 15px; flex: none; }
.diamondline small { color: var(--muted); font-weight: 600; }
.dicon svg { width: 100%; height: 100%; filter: drop-shadow(0 0 3px rgb(79 216 255 / 70%)); }

/* ---- Janela Personalizar ---- */
.cosmwin { width: min(1080px, 97vw); height: min(760px, 95vh); }
.cosmwin .wbody { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
.cosmbonus { color: #ffd166; border-color: var(--gold-dim); font-weight: 700; white-space: nowrap; }
body.playing .cosmtabs { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 0; padding: 3px; border-radius: 9px; background: #0a141c; border: 1px solid var(--edge); }
body.playing .cosmtabs button { padding: 7px 4px; font-size: 13px; }
.cosmtabs em { margin-left: 4px; font-style: normal; font-size: 10px; color: var(--muted); }
.cosmmain { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; min-height: 0; }
.cosmpreview {
  position: relative; display: grid; align-content: start; justify-items: center; gap: 9px; padding: 14px 12px; min-height: 0; overflow-y: auto; border-radius: 12px;
  background: radial-gradient(circle at 50% 22%, #1d2e48, #0a1220 60%, #060a12); border: 1px solid #2a4a6a; box-shadow: inset 0 0 30px rgb(79 216 232 / 8%);
}
.cosmpreview .cframe { margin: 10px 0 4px; }
.cosmstage { position: relative; width: 100%; height: 150px; border-radius: 10px; overflow: hidden; background: linear-gradient(rgba(0, 0, 0, 0.16) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgba(0, 0, 0, 0.16) 1px, transparent 1px) 0 0 / 32px 32px, radial-gradient(ellipse at 50% 85%, #3a7a3f, #1d4a28 62%, #0f2817); border: 1px solid #23394b; }
.cosmstage canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; }
.cosmtotal { width: 100%; display: grid; gap: 4px; padding: 10px; border-radius: 10px; background: #0a141c; border: 1px solid var(--edge); }
.cosmtotal .bar span { background: linear-gradient(90deg, #c9a24a, #ffe08a); }
.cosmstats { display: flex; flex-wrap: wrap; gap: 4px; }
.cosmstats .chip { font-size: 11px; }
.cosmside { display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; min-height: 0; }
.cosmdetail input { width: 100%; margin-top: 6px; }
.cosmfilters { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cosmfilters .seg { display: inline-flex; gap: 3px; padding: 2px; border-radius: 8px; background: #0a141c; border: 1px solid var(--edge); }
body.playing .cosmfilters .seg button { padding: 4px 10px; font-size: 12px; border: 0; background: transparent; }
body.playing .cosmfilters .seg button.active { background: linear-gradient(#1a2a38, #0f1b26); color: var(--gold); }
.cosmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; overflow-y: auto; min-height: 0; padding: 4px 6px 4px 2px; }
.cosmgrid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
body.playing .ccard {
  --rc: #a9b6c8; position: relative; display: grid; justify-items: center; align-content: start; gap: 6px; padding: 12px 8px 9px; text-align: center; color: var(--text);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--rc) 14%, #0c1824), #08111a 75%);
  border: 1px solid color-mix(in srgb, var(--rc) 45%, #1a2a38); border-bottom: 3px solid var(--rc); border-radius: 10px; overflow: visible; cursor: pointer; font-size: 12px;
}
body.playing .ccard:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
body.playing .ccard:hover { filter: brightness(1.12); }
body.playing .ccard.sel { box-shadow: 0 0 0 2px var(--gold), 0 0 18px color-mix(in srgb, var(--rc) 50%, transparent); }
.ccard.locked .cthumb { filter: grayscale(0.75) brightness(0.55); }
.ccard .cthumb { display: grid; place-items: center; min-height: 86px; width: 100%; }
.ccard b { font-size: 12px; line-height: 1.2; }
.ccard .crar, .vipcard .crar { font: 700 10px "Segoe UI", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: var(--rc); text-shadow: 0 0 6px color-mix(in srgb, var(--rc) 60%, transparent); }
.ccard .cbon { font-size: 11px; color: #9ff2b8; }
.ccard .cstate { position: absolute; top: 6px; right: 6px; font: 700 9px "Segoe UI", sans-serif; padding: 1px 6px; border-radius: 999px; background: #0b1f12; color: var(--green); border: 1px solid #1e5a30; }
.ccard .cstate.eq { background: #2a2410; color: var(--gold); border-color: var(--gold-dim); }
.ccard .cstate.lock { background: #1c1016; color: #ff9aa8; border-color: #6a2a3a; }
.ccard .cnew { position: absolute; top: 6px; left: 6px; font: 900 9px "Segoe UI", sans-serif; padding: 1px 6px; border-radius: 4px; background: linear-gradient(#ff5a8a, #c4215a); color: #fff; box-shadow: 0 0 8px rgb(255 77 141 / 60%); }
.cosmdetail { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 14px; border-radius: 10px; background: #0a141c; border: 1px solid var(--edge); }
.cosmdetail h4 { margin: 0 0 3px; font-size: 15px; }
.cosmdetail .how { font-size: 12px; color: var(--muted); }
.cosmdetail .how b { color: var(--text); }
.cosmdetail .acts { display: flex; gap: 6px; }
.cprice { display: inline-flex; align-items: center; gap: 4px; font-weight: 800; color: #9fe8ff; }
.cosmpokes { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
body.playing .cosmpokes button { padding: 3px 8px; font-size: 11px; }
body.playing .cosmpokes button.active { color: var(--gold); border-color: var(--gold-dim); }

/* ---- Loja VIP ---- */
.vipwin { width: min(1040px, 97vw); height: min(760px, 95vh); }
.vipwin .wbody { display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; gap: 10px; overflow: hidden; }
.vipdiam { display: inline-flex; align-items: center; gap: 6px; color: #9fe8ff; border-color: #2a7ab8; font-weight: 800; white-space: nowrap; box-shadow: 0 0 10px rgb(79 216 255 / 25%); }
.viphero {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 14px 18px; border-radius: 12px; overflow: hidden;
  background: linear-gradient(110deg, #2a1050, #0f2a5a 55%, #0a3a4a); border: 1px solid #5a4aa8; box-shadow: inset 0 0 40px rgb(176 106 255 / 20%);
}
.viphero h3 { margin: 0; font: 22px "Russo One", sans-serif; background: linear-gradient(90deg, #fff, #9fe8ff, #e2c4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.viphero p { margin: 2px 0 0; color: #c8d8f0; font-size: 12px; }
.viphero .shards { display: grid; gap: 6px; justify-items: end; }
body.playing .viptabs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin: 0; padding: 3px; border-radius: 9px; background: #0a141c; border: 1px solid var(--edge); }
.vipgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; align-content: start; overflow-y: auto; min-height: 0; padding: 6px 6px 6px 2px; }
.vipcard {
  --rc: #4aa3ff; position: relative; display: grid; grid-template-rows: auto auto auto 1fr auto; justify-items: center; min-width: 0; gap: 5px; padding: 14px 10px 10px; text-align: center; border-radius: 12px;
  background: radial-gradient(circle at 50% 25%, color-mix(in srgb, var(--rc) 22%, #0c1824), #08111a 70%);
  border: 1px solid color-mix(in srgb, var(--rc) 55%, #1a2a38); box-shadow: inset 0 0 22px color-mix(in srgb, var(--rc) 10%, transparent);
}
.vipcard.feat { box-shadow: 0 0 0 1px var(--rc), 0 0 22px color-mix(in srgb, var(--rc) 40%, transparent); }
.vipcard .vthumb { display: grid; place-items: center; min-height: 92px; width: 100%; min-width: 0; overflow: hidden; }
.vipcard .vthumb .cbanner { zoom: 0.62; }
.vipcard b { font-size: 13px; }
.vipcard .vdesc { font-size: 11px; color: var(--muted); line-height: 1.3; }
.vipcard .vlimit { font-size: 10px; color: #ffb3c0; }
.vipcard .vbuy { display: flex; gap: 6px; align-items: center; justify-content: center; width: 100%; }
body.playing .vipcard .vbuy button { flex: 1; }
.vipcard .vtag { position: absolute; top: 8px; left: 8px; font: 900 9px "Segoe UI", sans-serif; padding: 2px 7px; border-radius: 4px; color: #fff; }
.vipcard .vtag.new { background: linear-gradient(#ff5a8a, #c4215a); }
.vipcard .vtag.sale { background: linear-gradient(#3ddc84, #1a8a4a); }
.vipcard .vold { text-decoration: line-through; color: var(--muted); font-size: 11px; }
.vipcard.owned { opacity: 0.6; }
.vipbig { font-size: 40px; line-height: 1; filter: drop-shadow(0 0 8px rgb(255 210 90 / 60%)); }
.boxart { width: 74px; height: 74px; border-radius: 14px; display: grid; place-items: center; position: relative;
  background: linear-gradient(145deg, var(--rc), color-mix(in srgb, var(--rc) 30%, #000)); box-shadow: 0 0 18px var(--rc), inset 0 0 0 2px rgb(255 255 255 / 25%); animation: boxbob 2.4s ease-in-out infinite; }
.boxart .cicon { width: 44px; height: 44px; }
@keyframes boxbob { 50% { transform: translateY(-4px) rotate(-3deg); } }
.vipodds { font-size: 10px; color: var(--muted); }
.vipsynth { display: flex; align-items: center; gap: 8px; }

@media (max-width: 860px) {
  .cosmmain { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); overflow-y: auto; }
  body.playing .cosmtabs { grid-template-columns: repeat(4, 1fr); }
}
