/* =====================================================================
   THE CRIAS TV — MOLDURAS, EFEITOS, PLACAS E TEMAS DE PERFIL
   ---------------------------------------------------------------------
   Camada visual inspirada na Loja de decorações do Discord.
   ===================================================================== */

/* ---------------- botões do editor ---------------- */
.epLooks { display: flex; flex-direction: column; gap: 6px; }
.epLookBtn {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  background: #1e1f22;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #efeff1;
  text-align: left;
  cursor: pointer;
}
.epLookBtn:hover { background: #2c2d32; border-color: #4e5058; }
.epLookIc { width: 24px; flex: none; text-align: center; font-size: 14px; }
.epLookTx { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.epLookTx b { font-size: 12px; font-weight: 600; color: #efeff1; }
.epLookTx small { font-size: 11px; color: #96979e; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epLookArr { color: #96979e; font-size: 16px; flex: none; }

/* ---------------- camada de efeito ---------------- */
.meEffect, .pEffect, .epEffect, .lookFx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  border-radius: inherit;
  z-index: 0;
}
.meEffect, .pEffect, .epEffect { display: none; }
.pcard, .epPreview { position: relative; }
.meCard { position: fixed; }
.meCard > *:not(.meEffect),
.pcard > *:not(.pEffect),
.epPreview > *:not(.epEffect) { position: relative; z-index: 1; }
.meCard[data-effect]:not([data-effect=""]) .meEffect,
.pcard[data-effect]:not([data-effect=""]) .pEffect,
.epPreview[data-effect]:not([data-effect=""]) .epEffect { display: block; }

/* ---------------- efeitos ---------------- */
.meCard[data-effect="noir"] .meEffect,
.pcard[data-effect="noir"] .pEffect,
.epPreview[data-effect="noir"] .epEffect,
.lookFx[data-effect="noir"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(139, 107, 255, .38), transparent 42%),
    radial-gradient(circle at 82% 74%, rgba(201, 184, 255, .24), transparent 48%),
    radial-gradient(circle at 50% 100%, rgba(88, 101, 242, .18), transparent 55%);
  animation: fxDrift 8s ease-in-out infinite alternate;
}
.meCard[data-effect="aurora"] .meEffect,
.pcard[data-effect="aurora"] .pEffect,
.epPreview[data-effect="aurora"] .epEffect,
.lookFx[data-effect="aurora"] {
  background: linear-gradient(115deg, rgba(61, 158, 96, .28), rgba(88, 101, 242, .26), rgba(201, 184, 255, .22), rgba(61, 158, 96, .28));
  background-size: 300% 300%;
  animation: fxAurora 10s ease-in-out infinite;
}
.meCard[data-effect="sakura"] .meEffect,
.pcard[data-effect="sakura"] .pEffect,
.epPreview[data-effect="sakura"] .epEffect,
.lookFx[data-effect="sakura"] {
  background-image:
    radial-gradient(circle, rgba(255, 158, 199, .85) 0 2px, transparent 2.5px),
    radial-gradient(circle, rgba(255, 209, 230, .65) 0 1.5px, transparent 2px);
  background-size: 46px 46px, 68px 68px;
  background-position: 0 0, 20px 30px;
  animation: fxFall 9s linear infinite;
}
.meCard[data-effect="embers"] .meEffect,
.pcard[data-effect="embers"] .pEffect,
.epPreview[data-effect="embers"] .epEffect,
.lookFx[data-effect="embers"] {
  background-image:
    radial-gradient(circle, rgba(255, 176, 58, .9) 0 1.5px, transparent 2px),
    radial-gradient(circle, rgba(218, 62, 68, .7) 0 1.2px, transparent 1.8px);
  background-size: 34px 52px, 48px 70px;
  background-position: 0 0, 18px 26px;
  animation: fxRise 6s linear infinite;
}
.meCard[data-effect="glitch"] .meEffect,
.pcard[data-effect="glitch"] .pEffect,
.epPreview[data-effect="glitch"] .epEffect,
.lookFx[data-effect="glitch"] {
  background:
    repeating-linear-gradient(0deg, rgba(0, 229, 255, .08) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 47, 208, .06) 0 2px, transparent 2px 7px);
  animation: fxGlitch 2.6s steps(2) infinite;
}
.meCard[data-effect="stars"] .meEffect,
.pcard[data-effect="stars"] .pEffect,
.epPreview[data-effect="stars"] .epEffect,
.lookFx[data-effect="stars"] {
  background-image:
    radial-gradient(circle, rgba(239, 239, 241, .95) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(201, 184, 255, .8) 0 1.2px, transparent 1.8px);
  background-size: 40px 40px, 64px 64px;
  background-position: 0 0, 22px 12px;
  animation: fxTwinkle 3.4s ease-in-out infinite;
}
.meCard[data-effect="snow"] .meEffect,
.pcard[data-effect="snow"] .pEffect,
.epPreview[data-effect="snow"] .epEffect,
.lookFx[data-effect="snow"] {
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .9) 0 1.4px, transparent 2px),
    radial-gradient(circle, rgba(201, 243, 255, .7) 0 1px, transparent 1.5px);
  background-size: 52px 52px, 74px 74px;
  background-position: 0 0, 28px 16px;
  animation: fxFall 12s linear infinite;
}
.meCard[data-effect="void"] .meEffect,
.pcard[data-effect="void"] .pEffect,
.epPreview[data-effect="void"] .epEffect,
.lookFx[data-effect="void"] {
  background:
    radial-gradient(circle at 50% 120%, rgba(88, 101, 242, .28), transparent 55%),
    radial-gradient(circle at 50% 50%, transparent 35%, rgba(0, 0, 0, .55) 100%);
  animation: fxPulse 5s ease-in-out infinite;
}
.meCard[data-effect="hearts"] .meEffect,
.pcard[data-effect="hearts"] .pEffect,
.epPreview[data-effect="hearts"] .epEffect,
.lookFx[data-effect="hearts"] {
  background-image:
    radial-gradient(circle, rgba(255, 107, 125, .85) 0 2px, transparent 2.6px),
    radial-gradient(circle, rgba(255, 179, 189, .65) 0 1.4px, transparent 2px);
  background-size: 44px 58px, 62px 80px;
  background-position: 0 0, 20px 30px;
  animation: fxRise 8s linear infinite;
}
.meCard[data-effect="matrix"] .meEffect,
.pcard[data-effect="matrix"] .pEffect,
.epPreview[data-effect="matrix"] .epEffect,
.lookFx[data-effect="matrix"] {
  background:
    repeating-linear-gradient(90deg, rgba(61, 158, 96, .12) 0 2px, transparent 2px 9px),
    repeating-linear-gradient(0deg, rgba(61, 158, 96, .08) 0 3px, transparent 3px 12px);
  background-size: 100% 100%, 100% 200%;
  animation: fxMatrix 4.5s linear infinite;
}
.meCard[data-effect="sparks"] .meEffect,
.pcard[data-effect="sparks"] .pEffect,
.epPreview[data-effect="sparks"] .epEffect,
.lookFx[data-effect="sparks"] {
  background-image:
    radial-gradient(circle, rgba(255, 233, 168, .95) 0 1.2px, transparent 1.8px),
    radial-gradient(circle, rgba(124, 212, 255, .75) 0 1px, transparent 1.5px);
  background-size: 30px 30px, 46px 46px;
  background-position: 0 0, 15px 20px;
  animation: fxTwinkle 1.8s ease-in-out infinite;
}

@keyframes fxDrift {
  0% { transform: translate3d(-2%, -1%, 0) scale(1); opacity: .9; }
  100% { transform: translate3d(2%, 1%, 0) scale(1.06); opacity: 1; }
}
@keyframes fxAurora {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes fxFall {
  0% { background-position: 0 -40px, 20px -60px; }
  100% { background-position: 0 80px, 20px 120px; }
}
@keyframes fxRise {
  0% { background-position: 0 80px, 18px 110px; }
  100% { background-position: 0 -40px, 18px -50px; }
}
@keyframes fxGlitch {
  0%, 100% { transform: translate(0, 0); opacity: .8; }
  48% { transform: translate(-2px, 1px); opacity: 1; }
  52% { transform: translate(2px, -1px); opacity: .7; }
}
@keyframes fxTwinkle {
  0%, 100% { opacity: .45; }
  50% { opacity: 1; }
}
@keyframes fxPulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
@keyframes fxMatrix {
  0% { background-position: 0 0, 0 -100%; }
  100% { background-position: 0 0, 0 100%; }
}

/* ---------------- temas de perfil ---------------- */
.meCard[data-theme="noir"], .pcard[data-theme="noir"], .epPreview[data-theme="noir"] { background: linear-gradient(180deg, #241b3a, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #241b3a, #1a1a1e 55%, #121214); }
.meCard[data-theme="aurora"], .pcard[data-theme="aurora"], .epPreview[data-theme="aurora"] { background: linear-gradient(180deg, #0f2e2a, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #0f2e2a, #1a1a1e 55%, #121214); }
.meCard[data-theme="sakura"], .pcard[data-theme="sakura"], .epPreview[data-theme="sakura"] { background: linear-gradient(180deg, #3a1b2e, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #3a1b2e, #1a1a1e 55%, #121214); }
.meCard[data-theme="ember"], .pcard[data-theme="ember"], .epPreview[data-theme="ember"] { background: linear-gradient(180deg, #3a1714, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #3a1714, #1a1a1e 55%, #121214); }
.meCard[data-theme="ocean"], .pcard[data-theme="ocean"], .epPreview[data-theme="ocean"] { background: linear-gradient(180deg, #0b2740, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #0b2740, #1a1a1e 55%, #121214); }
.meCard[data-theme="forest"], .pcard[data-theme="forest"], .epPreview[data-theme="forest"] { background: linear-gradient(180deg, #102a1b, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #102a1b, #1a1a1e 55%, #121214); }
.meCard[data-theme="royal"], .pcard[data-theme="royal"], .epPreview[data-theme="royal"] { background: linear-gradient(180deg, #241b4a, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #241b4a, #1a1a1e 55%, #121214); }
.meCard[data-theme="sunset"], .pcard[data-theme="sunset"], .epPreview[data-theme="sunset"] { background: linear-gradient(180deg, #3a2214, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #3a2214, #1a1a1e 55%, #121214); }
.meCard[data-theme="ice"], .pcard[data-theme="ice"], .epPreview[data-theme="ice"] { background: linear-gradient(180deg, #102c3a, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #102c3a, #1a1a1e 55%, #121214); }
.meCard[data-theme="void"], .pcard[data-theme="void"], .epPreview[data-theme="void"] { background: linear-gradient(180deg, #0b0912, #121214 60%, #000); --profile-card-bg: linear-gradient(180deg, #0b0912, #121214 60%, #000); }
.meCard[data-theme="crimson"], .pcard[data-theme="crimson"], .epPreview[data-theme="crimson"] { background: linear-gradient(180deg, #3a0f1c, #1a1a1e 55%, #121214); --profile-card-bg: linear-gradient(180deg, #3a0f1c, #1a1a1e 55%, #121214); }

/* ---------------- picker estilo Loja ---------------- */
.lookOverlay {
  position: fixed;
  inset: 0;
  z-index: 270;
  background: rgba(0, 0, 0, .72);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lookModal {
  width: min(760px, 96vw);
  max-height: 86vh;
  background: #242429;
  border: 1px solid #2c2d32;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  color: #efeff1;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .65);
  overflow: hidden;
}
.lookModal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 12px;
}
.lookModal h2 { margin: 0; font-size: 20px; font-weight: 700; color: #efeff1; }
.lookModal header p { margin: 4px 0 0; font-size: 13px; color: #96979e; }
.lookX {
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #1e1f22;
  color: #96979e;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}
.lookX:hover { background: #2c2d32; color: #efeff1; }
.lookTabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 24px 12px; border-bottom: 1px solid #2c2d32; }
.lookTabs button {
  height: 32px;
  padding: 4px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #96979e;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.lookTabs button:hover { background: rgba(151, 151, 159, .08); color: #efeff1; }
.lookTabs button.on { background: rgba(151, 151, 159, .12); color: #efeff1; }
.lookBody {
  flex: 1;
  overflow-y: auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  align-content: start;
  scrollbar-width: thin;
}
.lookBody::-webkit-scrollbar { width: 8px; }
.lookBody::-webkit-scrollbar-thumb { background: #121214; border-radius: 4px; }
.lookCard {
  position: relative;
  min-height: 112px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #1e1f22;
  border: 2px solid transparent;
  border-radius: 8px;
  color: #efeff1;
  cursor: pointer;
  text-align: center;
}
.lookCard:hover { border-color: #6d6f78; }
.lookCard.on { border-color: #e3e4e8; background: #2c2d32; }
.lookCard.lock { opacity: .5; }
.lookCard b { font-size: 12px; font-weight: 600; line-height: 1.15; color: #efeff1; }
.lookCard small { font-size: 10px; color: #96979e; line-height: 1.15; }
.lookCard em { position: absolute; right: 4px; top: 4px; font-style: normal; font-size: 10px; }
.lookPrev { width: 64px; height: 64px; flex: none; display: grid; place-items: center; border-radius: 6px; overflow: hidden; }
.lookPlate {
  width: 100%;
  height: 32px;
  padding: 0 6px;
  border-radius: 4px;
  background: #2c2d32;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lookTheme { width: 100%; height: 56px; border-radius: 4px; background: #2c2d32; }
.lookColor { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #ffffff1a; }
.lookFx { width: 100%; height: 56px; border-radius: 4px; background: #1a1a1e; position: relative; overflow: hidden; }
.lookEmpty { grid-column: 1 / -1; padding: 40px; text-align: center; color: #96979e; }
.lookModal footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-top: 1px solid #2c2d32;
  color: #96979e;
  font-size: 12px;
}
.lookDone {
  height: 32px;
  padding: 0 16px;
  border: 0;
  border-radius: 4px;
  background: #e3e4e8;
  color: #111113;
  font-weight: 600;
  cursor: pointer;
}
.lookDone:hover { background: #f2f3f6; }

@media (max-width: 600px) {
  .lookOverlay { padding: 8px; }
  .lookModal { width: 100%; max-height: 94vh; }
  .lookBody { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); padding: 12px; }
  .lookModal header, .lookTabs, .lookModal footer { padding-left: 14px; padding-right: 14px; }
}

/* ---------------- Cria-Points ---------------- */
.lookHeadRight { display: flex; align-items: center; gap: 10px; flex: none; }
.lookPoints {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #1e1f22;
  border: 1px solid #2c2d32;
  color: #c9b6ff;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.lookPoints b { color: #efeff1; font-size: 13px; }
.lookCard.lock { opacity: .78; }
.lookCard em.lookPrice {
  position: absolute;
  right: 5px;
  top: 5px;
  font-style: normal;
  font-size: 9.5px;
  font-weight: 800;
  color: #d9c7ff;
  background: #1b1728;
  border: 1px solid #3a2f5c;
  border-radius: 999px;
  padding: 2px 6px;
  line-height: 1.2;
}
.lookCard.lock:hover em.lookPrice { color: #fff; background: #6c4bd8; border-color: #8b6bff; }
.pointsModal { width: min(440px, calc(100vw - 32px)); }
.pointsBody { padding: 6px 24px 24px; }
.pointsBig {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 50% 0%, #2a2140, #1b1c20 70%);
  border: 1px solid #2c2d32;
}
.pointsBig b { font-size: 40px; line-height: 1; color: #d9c7ff; }
.pointsBig small { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #96979e; }
.pointsBody p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.55; color: #b5bac1; }
.pointsBody p b { color: #efeff1; }
.pointsBody .pointsHint { color: #7e8088; font-size: 12px; }
.pointsActions { display: flex; gap: 8px; margin-top: 16px; }
.pointsActions button, .buyActions button {
  height: 40px;
  padding: 0 18px;
  border-radius: 8px;
  border: 1px solid #2c2d32;
  background: #1e1f22;
  color: #efeff1;
  font-weight: 600;
  cursor: pointer;
}
.pointsActions .pri, .buyActions .pri { flex: 1; background: #8b6bff; border-color: #8b6bff; color: #fff; }
.pointsActions .ghost, .buyActions .ghost { flex: none; }
.buyModal { width: min(400px, calc(100vw - 32px)); }
.buyBody { padding: 6px 24px 24px; }
.buyPrice {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  background: #1e1f22;
  border: 1px solid #2c2d32;
  color: #d9c7ff;
  font-size: 30px;
  font-weight: 800;
}
.buyPrice small { font-size: 11px; color: #96979e; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.buyBody p { margin: 12px 0 0; font-size: 13px; color: #b5bac1; text-align: center; }
.buyBody p b { color: #efeff1; }
.buyBody .buyWarn { color: #ffb86b; }
.buyActions { display: flex; gap: 8px; margin-top: 18px; }
.buyActions .pri[disabled] { opacity: .45; cursor: not-allowed; }
