:root{--bg:#0b0b10;--surface:#141425;--ink:#e9d5ff;--muted:#c4b5fd;--edge: rgba(168,85,247,.22);--glow: rgba(168,85,247,.65);}
*{box-sizing:border-box}html,body{height:100%}
body{background:radial-gradient(1200px 600px at 10% -10%, rgba(124,58,237,.18), transparent 60%),radial-gradient(2100px 500px at 100% 0%, rgba(139,63,209,.16), transparent 55%),var(--bg);color:var(--ink);font-family:'Poppins',system-ui, -apple-system, Segoe UI, Roboto, sans-serif;}
.glass{-webkit-backdrop-filter:saturate(160%) blur(10px);backdrop-filter:saturate(160%) blur(10px);background:linear-gradient(180deg, rgba(15,15,20,.86), rgba(15,15,20,.64));border:1px solid rgba(167,139,250,.18);box-shadow:0 10px 30px -18px rgba(124,58,237,.45);backface-visibility:hidden;transform:translateZ(0);}
.card{background:linear-gradient(180deg, rgba(124,58,237,.10), rgba(124,58,237,.05)),#131322;border:1px solid rgba(167,139,250,.18);border-radius:16px;box-shadow:0 10px 28px rgba(0,0,0,.35);transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;}
.card:hover{transform:translateY(-4px);border-color:rgba(167,139,250,.35);box-shadow:0 16px 36px -8px rgba(124,58,237,.45);}
.inline-badge{display:inline-flex;align-items:center;justify-content:center;padding:4px 10px;border-radius:9999px;background:rgba(124,58,237,.25);border:1px solid rgba(124,58,237,.45);color:var(--ink);font-weight:600;font-size:12px;}
.pill-balance{display:inline-flex;align-items:center;gap:.4rem;padding:.4rem .7rem;border-radius:9999px;border:1px solid rgba(124,58,237,.35);background:rgba(124,58,237,.15);font-weight:700;}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.6rem .9rem;border-radius:.8rem;font-weight:700;transition:transform .12s ease, opacity .12s ease, box-shadow .12s ease;}
.btn:disabled{opacity:.6;cursor:not-allowed}.btn:hover{transform:translateY(-1px)}.btn:active{transform:translateY(0)}
.btn-primary{color:white;background:linear-gradient(90deg,#8b5cf6,#7c3aed);box-shadow:0 10px 30px -10px rgba(124,58,237,.6);}
.btn-secondary{color:#e9d5ff;background:rgba(124,58,237,.18);border:1px solid rgba(167,139,250,.3);}
.btn-danger{color:white;background:#ef4444;}
.input-wrap{position:relative;display:flex;align-items:center;background:#0f0f16;border:1px solid rgba(255,255,255,.08);border-radius:.9rem;padding-left:2.2rem;}
.input-wrap input{outline:none;border:none;background:transparent;color:var(--ink);height:42px;width:100%;padding:0 .9rem;}
.input-icon{position:absolute;left:10px;width:20px;height:20px;opacity:.75;}
.text-muted{color:var(--muted);}

/* =========================
   GLOBAL THEME: Glass + Spotlight
   (migrado desde earn.html)
========================= */

.glass{
  background: linear-gradient(135deg, rgba(24,18,43,0.82), rgba(88,28,135,0.70));
  border: 1px solid rgba(196,181,253,0.22);
  box-shadow: 0 18px 45px rgba(15,23,42,0.65), 0 0 38px rgba(167,139,250,0.20);
  backdrop-filter: blur(10px);
}

.spotlight{ position: relative; isolation: isolate; }
/* Spotlight en sección — sutil, sin límites visibles */
.spotlight::after{
  content:"";
  position:absolute; inset:0;
  background: radial-gradient(800px circle at var(--mx, 50%) var(--my, -20%), rgba(167,139,250,0.07), transparent 55%);
  pointer-events:none;
  z-index: 0;
  border-radius: inherit;
}
.spotlight > *{ position: relative; z-index: 1; }

/* ── Card spotlight: luz que sigue el mouse dentro de cada card ── */
.card{
  --card-mx: 50%;
  --card-my: 0%;
}
.card::before{
  /* Reemplaza la animación fija por el spotlight del mouse */
  background:
    radial-gradient(260px circle at var(--card-mx) var(--card-my), rgba(167,139,250,.18), transparent 65%),
    linear-gradient(135deg, rgba(167,139,250,.08), rgba(217,70,239,.06), rgba(34,211,238,.04));
  opacity: 1;
  filter: none;
  animation: none;
  transition: opacity .3s ease;
}
.card:hover::before{
  opacity: 1;
}


/* =========================
   GLOBAL BACKGROUND ORBS (wow)
   (migrado desde earn.html)
========================= */

.bg-wow{
  position: fixed; inset: 0; z-index: -10; overflow: hidden;
  background: linear-gradient(to bottom, rgb(2 6 23), rgb(15 23 42), rgb(2 6 23));
}
.bg-wow::before{
  content:""; position:absolute; inset:-20%;
  background:
    radial-gradient(circle at top, rgba(167,139,250,0.25), transparent 55%),
    radial-gradient(circle at 75% 55%, rgba(217,70,239,0.18), transparent 60%),
    radial-gradient(circle at 15% 70%, rgba(124,58,237,0.18), transparent 60%);
}

.bg-grid{
  position:absolute; inset:0;
  background-image:
    linear-gradient(to right, rgba(148,163,184,0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148,163,184,0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, rgba(0,0,0,.9), transparent 68%);
  opacity: .35;
}

@keyframes floatSlow {
  0%{transform:translate(0,0)}
  50%{transform:translate(18px,-28px)}
  100%{transform:translate(0,0)}
}
@keyframes floatReverse {
  0%{transform:translate(0,0)}
  50%{transform:translate(-20px,22px)}
  100%{transform:translate(0,0)}
}

.glow-blob{
  position:absolute;
  border-radius:9999px;
  filter: blur(90px);
  opacity: .45;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce){
  .glow-blob{ display:none; }
}



/* =========================
   GLOBAL REVEAL (from Earn)
========================= */
.reveal{
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity:1; transform:none; transition:none; }
}

/* =========================
   GLOBAL UI HELPERS
========================= */
.wrap{ max-width:1120px; margin-inline:auto; }
.avatar-ring{ box-shadow: 0 0 0 2px rgba(167,139,250,.35), 0 0 18px rgba(124,58,237,.25) inset; }
.tag{ font-size:.70rem; padding:2px 8px; border-radius:9999px; font-weight:700; }

/* =========================
   CARD — rediseño limpio sin spotlight
========================= */

@keyframes cardSheen {
  0%   { transform: translateX(-100%) rotate(25deg); }
  100% { transform: translateX(300%)  rotate(25deg); }
}

.card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  /* Fondo: oscuro con un toque de morado muy sutil arriba */
  background:
    linear-gradient(160deg,
      rgba(109,40,217,.13) 0%,
      rgba(10,8,20,.0)    45%),
    rgba(12,10,26,.92);
  /* Borde: línea superior más brillante, resto casi invisible */
  border: 1px solid rgba(139,92,246,.20);
  box-shadow:
    0 1px 0 0 rgba(167,139,250,.12) inset, /* línea top brillante */
    0 12px 40px rgba(0,0,0,.45);
  backdrop-filter: blur(12px);
  transition:
    transform  .4s cubic-bezier(.2,.8,.2,1),
    box-shadow .4s cubic-bezier(.2,.8,.2,1),
    border-color .4s ease;
  will-change: transform;
}

/* Sheen — reflejo diagonal que cruza al hacer hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(167,139,250,.07) 50%,
    transparent 65%
  );
  transform: translateX(-100%) rotate(25deg);
  pointer-events: none;
  z-index: 1;
}
.card:hover::before {
  animation: cardSheen .65s ease forwards;
}

/* Sin ::after — el fondo lo maneja el background directamente */
.card > * { position: relative; z-index: 2; }

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(139,92,246,.38);
  box-shadow:
    0 1px 0 0 rgba(167,139,250,.22) inset,
    0 20px 50px rgba(0,0,0,.55),
    0 0 28px rgba(109,40,217,.12);
}

.btn-sheen{ position: relative; overflow: hidden; }
.btn-sheen::after{
  content:"";
  position:absolute;
  top:-60%;
  left:-40%;
  width: 42%;
  height: 240%;
  transform: rotate(18deg) translateX(-160%);
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.18), transparent);
  pointer-events:none;
  opacity: .55;
  animation: luxeSheen 7.5s ease-in-out infinite;
}
.btn-sheen:hover::after{ opacity: .75; animation-duration: 5.8s; }
@media (prefers-reduced-motion: reduce){ .btn-sheen::after{ display:none; } }

/* CTA chip (used in minigames, etc.) */
.cta-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.45rem;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  box-shadow: 0 16px 42px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.05) inset;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: rgba(255,255,255,.94);
  transition: transform .35s ease, background .35s ease, border-color .35s ease;
}
.cta-chip:hover{
  transform: translateY(-2px);
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.20);
}

/* Profile helpers */
.tab{
  border-radius: 999px;
  padding: .55rem .85rem;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.90);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
  user-select:none;
}
.tab:hover{ background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.18); transform: translateY(-1px); }
.tab-active{ background: rgba(168,85,247,.22); border-color: rgba(168,85,247,.35); }

.pill{
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  padding: .35rem .6rem;
}
.row{
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* =========================
   GLOBAL UTILITY — shared across all inner pages
========================= */
.no-scroll { overflow: hidden !important; }

/* Nav-link active state — propagate color to children */
.nav-link.bg-white\/7 span,
.nav-link.text-white span { color: inherit; }
.nav-link span { color: inherit; }
aside .nav-link span { font-weight: 300 !important; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }

/* =========================
   GLOBAL LUXE DETAILS
   Aplica en todas las páginas automáticamente
========================= */

/* ── Card mejorada con sheen correcto ── */
.card {
  border: 1px solid rgba(139,92,246,.18);
  box-shadow:
    0 1px 0 0 rgba(167,139,250,.10) inset,
    0 -1px 0 0 rgba(0,0,0,.25) inset,
    0 12px 40px rgba(0,0,0,.48);
}
.card::before {
  background: linear-gradient(
    108deg,
    transparent 30%,
    rgba(167,139,250,.055) 48%,
    rgba(255,255,255,.035) 52%,
    transparent 70%
  );
  transform: translateX(-120%);
}
@keyframes cardSheen {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(220%);  }
}
.card:hover { border-color: rgba(139,92,246,.30); }

/* ── KPI box — stat destacada ── */
.kpi {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025);
  padding: 14px 16px;
  transition: border-color .2s ease, background .2s ease;
}
.kpi:hover {
  border-color: rgba(139,92,246,.22);
  background: rgba(139,92,246,.04);
}
.kpi-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(167,139,250,.5);
  margin-bottom: 6px;
  display: block;
}
.kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  line-height: 1;
  display: block;
}
.kpi-sub {
  font-size: .7rem;
  font-weight: 500;
  color: rgba(167,139,250,.45);
  display: block;
  margin-top: 3px;
}

/* ── Divider con gradiente ── */
.luxe-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,.2), transparent);
  margin: 14px 0;
  border: none;
}

/* ── Section label — encabezado de sección dentro de card ── */
.section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(167,139,250,.5);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(139,92,246,.2), transparent);
}

/* ── Botones globales mejorados ── */
.btn-primary {
  background: linear-gradient(135deg, rgba(139,92,246,.55) 0%, rgba(109,40,217,.65) 100%) !important;
  border-color: rgba(167,139,250,.32) !important;
  color: #fff !important;
  box-shadow: 0 4px 18px rgba(109,40,217,.32), 0 1px 0 rgba(255,255,255,.10) inset !important;
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease !important;
}
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 28px rgba(109,40,217,.48), 0 1px 0 rgba(255,255,255,.14) inset !important;
  border-color: rgba(167,139,250,.48) !important;
}

/* ── Progress bar con shimmer ── */
.prog {
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.07);
  overflow: hidden;
}
.prog > span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed 0%, #a78bfa 50%, #facc15 100%);
  background-size: 200% 100%;
  animation: progShimmer 2.8s linear infinite;
  transition: width .8s cubic-bezier(.4,0,.2,1);
}
@keyframes progShimmer {
  0%  { background-position: 100% 0; }
  100%{ background-position: -100% 0; }
}

/* ── progress-wrap y progress-bar (tasks.html) ── */
.progress-wrap {
  height: 8px;
  background: rgba(167,139,250,.10);
  border: 1px solid rgba(167,139,250,.18);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a78bfa, #facc15);
  background-size: 200% 100%;
  animation: progShimmer 2.8s linear infinite;
  box-shadow: 0 0 12px rgba(124,58,237,.3);
  transition: width .5s cubic-bezier(.4,0,.2,1);
}

/* ── Pill balance mejorado ── */
.pill-balance {
  border: 1px solid rgba(124,58,237,.28);
  background: rgba(124,58,237,.10);
  color: rgba(196,181,253,.9);
  font-weight: 600;
}

/* ── inline-badge mejorado ── */
.inline-badge {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(124,58,237,.12);
  border: 1px solid rgba(124,58,237,.25);
  color: rgba(196,181,253,.85);
  font-weight: 600; font-size: 12px;
}

/* ── Luxe badge (earn.html) ── */
.luxe-badge {
  display: inline-flex; align-items: center;
  gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .05em;
  border: 1px solid rgba(139,92,246,.25);
  background: rgba(139,92,246,.10);
}

/* ── Row items (profile, historial) ── */
.row {
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025);
  transition: border-color .2s, background .2s;
}
.row:hover {
  border-color: rgba(139,92,246,.18);
  background: rgba(139,92,246,.04);
}

/* ── Footer mejorado ── */
footer {
  border-top: 1px solid rgba(139,92,246,.12) !important;
  background: rgba(6,4,18,.85) !important;
}

/* ── Scrollbar global delgada ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,.3); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(139,92,246,.5); }

/* ── Focus ring global ── */
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid rgba(139,92,246,.6);
  outline-offset: 2px;
}

/* ── Sidebar nav link hover más suave ── */
.nav-link {
  transition: background .2s ease, color .2s ease, transform .15s ease !important;
}
.nav-link:hover { transform: translateX(2px); }

/* ── Glass header más premium ── */
.glass {
  background: linear-gradient(180deg, rgba(10,8,22,.88), rgba(10,8,22,.72)) !important;
  border-bottom: 1px solid rgba(139,92,246,.12) !important;
  box-shadow: 0 4px 24px rgba(0,0,0,.35) !important;
}
