/* ✦ BLOXSOCIETY · estética compartida — vidrio estilo iOS sobre galaxia morada y dorada
   Optimizado: nada de animaciones infinitas pesadas, sin filtros animados, vidrio solo en superficies grandes. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --fondo: #07041a;
  --vidrio-bg: linear-gradient(180deg, rgba(255, 255, 255, .085), rgba(255, 255, 255, .035));
  --vidrio-tinte: rgba(34, 18, 72, .38);
  --vidrio-borde: rgba(255, 255, 255, .11);
  --vidrio-brillo: inset 0 1px 0 rgba(255, 255, 255, .14);
  --borde: rgba(255, 255, 255, .09);
  --borde-oro: rgba(232, 194, 90, .42);
  --relleno: rgba(118, 118, 140, .2);
  --relleno-2: rgba(118, 118, 140, .3);
  --morado: #8b5cf6; --morado-2: #b39dff; --morado-3: #6d28d9; --magenta: #c026d3;
  --oro: #e0b84e; --oro-2: #f7d98b;
  --texto: #f4f0ff; --texto-2: rgba(235, 228, 255, .72); --texto-3: rgba(235, 228, 255, .48);
  --exito: #34d399; --peligro: #ff4d6d; --aviso: #ffbf47; --info: #64a8ff;
  --radio: 22px;
  --sombra: 0 24px 60px -24px rgba(0, 0, 0, .7);
  --fuente: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Segoe UI', system-ui, sans-serif;
  --fuente-titulo: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif;
  --fuente-marca: 'Cinzel', serif;
  --resorte: cubic-bezier(.32, 1.28, .5, 1);
  --suave: cubic-bezier(.25, .8, .25, 1);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--fuente); color: var(--texto); background: var(--fondo); -webkit-font-smoothing: antialiased; overflow-x: hidden; letter-spacing: -.01em; }

/* nebulosa ESTÁTICA (antes se pintaba en cada cuadro) */
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 15% 20%, rgba(124, 58, 237, .34), transparent 70%),
    radial-gradient(45% 40% at 85% 15%, rgba(192, 38, 211, .2), transparent 70%),
    radial-gradient(55% 45% at 80% 85%, rgba(224, 184, 78, .14), transparent 70%),
    radial-gradient(50% 50% at 20% 90%, rgba(76, 29, 149, .35), transparent 70%),
    linear-gradient(180deg, #0a0524 0%, #07041a 100%);
}
#galaxia { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.capa { position: relative; z-index: 1; }

a { color: var(--oro-2); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(224, 184, 78, .35); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .16); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }

/* ── títulos ── */
.titulo-oro {
  font-family: var(--fuente-titulo); font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(180deg, #fff6d8 0%, #f7d98b 45%, #d9a93c 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ── VIDRIO iOS ── */
.vidrio {
  background: var(--vidrio-bg), var(--vidrio-tinte);
  border: 1px solid var(--vidrio-borde); border-radius: var(--radio);
  -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  box-shadow: var(--vidrio-brillo), var(--sombra);
}
/* borde con reflejo dorado-morado (estático = barato) */
.borde-magico { position: relative; }
.borde-magico::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(150deg, rgba(247, 217, 139, .55), rgba(255, 255, 255, .06) 35%, rgba(255, 255, 255, .02) 60%, rgba(179, 157, 255, .45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ── BOTONES: sombra del mismo color, unida al fondo ── */
.btn {
  --c1: #7c3aed; --c2: #9b6bff; --s: rgba(139, 92, 246, .55);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 18px; border-radius: 14px; border: 0; cursor: pointer;
  font: 600 15px var(--fuente); letter-spacing: -.01em; color: #fff; white-space: nowrap; text-decoration: none !important;
  background: linear-gradient(180deg, var(--c2), var(--c1));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 10px 26px -10px var(--s), 0 2px 6px -2px var(--s);
  transition: transform .35s var(--resorte), box-shadow .3s var(--suave), filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 -1px 0 rgba(0, 0, 0, .18), 0 16px 34px -12px var(--s), 0 3px 8px -2px var(--s); }
.btn:active { transform: scale(.96); transition-duration: .12s; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.oro { --c1: #c99a32; --c2: #f4d27f; --s: rgba(224, 184, 78, .6); color: #2a1a05; }
.btn.peligro { --c1: #e11d48; --c2: #ff5c7a; --s: rgba(255, 77, 109, .55); }
.btn.exito { --c1: #10b981; --c2: #4ee0aa; --s: rgba(52, 211, 153, .5); color: #032016; }
.btn.fantasma { background: var(--relleno); color: var(--texto); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn.fantasma:hover { background: var(--relleno-2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1); }
.btn.mini { min-height: 32px; padding: 6px 12px; font-size: 13px; border-radius: 10px; }
.btn.grande { min-height: 54px; padding: 14px 26px; font-size: 17px; border-radius: 16px; }
.destello { position: relative; }

/* ── FORMULARIOS iOS ── */
.campo { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.campo > label { font-size: 13px; font-weight: 600; color: var(--texto-3); padding-left: 4px; }
input, textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid transparent; outline: none;
  background: var(--relleno); color: var(--texto); font: 15px var(--fuente);
  transition: background .2s, box-shadow .25s var(--suave), border-color .2s;
}
input::placeholder, textarea::placeholder { color: var(--texto-3); }
textarea { resize: vertical; min-height: 84px; line-height: 1.5; }
input:focus, textarea:focus, select:focus { background: var(--relleno-2); border-color: rgba(179, 157, 255, .5); box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); }
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b39dff' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
select option, select optgroup { background: #1b1236; color: var(--texto); }
input[type=color] { padding: 3px; height: 40px; width: 52px; cursor: pointer; }
/* interruptor iOS */
input[type=checkbox] {
  appearance: none; -webkit-appearance: none; width: 46px; height: 28px; flex-shrink: 0; padding: 0; margin: 0;
  border-radius: 999px; background: var(--relleno-2); position: relative; cursor: pointer; border: 0; box-shadow: none;
  transition: background .25s var(--suave);
}
input[type=checkbox]::before {
  content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .3), 0 1px 1px rgba(0, 0, 0, .16); transition: transform .35s var(--resorte);
}
input[type=checkbox]:checked { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
input[type=checkbox]:checked::before { transform: translateX(18px); }
input[type=checkbox]:focus { box-shadow: 0 0 0 4px rgba(139, 92, 246, .22); }

/* ── chips ── */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(139, 92, 246, .18); color: var(--morado-2); box-shadow: inset 0 0 0 1px rgba(179, 157, 255, .18); }
.chip.oro { background: rgba(224, 184, 78, .15); color: var(--oro-2); box-shadow: inset 0 0 0 1px rgba(224, 184, 78, .28); }
.chip.verde { background: rgba(52, 211, 153, .14); color: var(--exito); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, .28); }
.chip.rojo { background: rgba(255, 77, 109, .14); color: var(--peligro); box-shadow: inset 0 0 0 1px rgba(255, 77, 109, .28); }

/* ── avisos tipo notificación iOS (arriba, al centro) ── */
#toasts { position: fixed; top: max(14px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  width: 100%; padding: 12px 16px; border-radius: 18px; font-size: 14.5px; font-weight: 500; display: flex; gap: 10px; align-items: center; pointer-events: auto;
  background: rgba(40, 26, 78, .72); -webkit-backdrop-filter: blur(24px) saturate(180%); backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 16px 40px -12px rgba(0, 0, 0, .6); border: 1px solid var(--vidrio-borde);
  animation: toastIn .5s var(--resorte) both;
}
.toast.error { background: rgba(90, 20, 40, .75); }
.toast.saliendo { animation: toastOut .28s var(--suave) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-24px) scale(.92); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-16px) scale(.96); } }

/* ── animaciones (solo transform/opacity → fluidas) ── */
.aparecer { animation: aparecer .6s var(--suave) both; }
@keyframes aparecer { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.flotar { animation: flotar 6s ease-in-out infinite; }
@keyframes flotar { 50% { transform: translateY(-8px); } }
.girar { animation: girar 20s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.cargando { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(224, 184, 78, .25); border-top-color: var(--oro); animation: girar .8s linear infinite; }
.vacio { text-align: center; padding: 40px 20px; color: var(--texto-3); }
.vacio .icono { display: block; margin-bottom: 10px; color: var(--oro-2); }

/* ── iconos propios ── */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex-shrink: 0; fill: none; stroke: currentColor; }
.ic.oro { color: var(--oro-2); }
.ic.grande { width: 1.8em; height: 1.8em; }

/* ── markdown discord (compartido) ── */
.md-mencion { background: rgba(88, 101, 242, .3); color: #c9cdfb; border-radius: 4px; padding: 0 3px; font-weight: 500; }
.md-code { background: rgba(0, 0, 0, .35); border-radius: 5px; padding: 1px 5px; font: 85% ui-monospace, 'SF Mono', Consolas, monospace; }
.md-pre { background: rgba(0, 0, 0, .35); border: 1px solid rgba(255, 255, 255, .06); border-radius: 8px; padding: 8px 10px; overflow-x: auto; margin: 4px 0; }
.md-pre code { font: 13px ui-monospace, 'SF Mono', Consolas, monospace; white-space: pre; }
.md-quote { border-left: 4px solid #4e5058; margin: 2px 0; padding: 0 8px 0 12px; }
.md-h1 { font-size: 1.5em; margin: 8px 0 4px; font-weight: 700; line-height: 1.25; }
.md-h2 { font-size: 1.25em; margin: 8px 0 4px; font-weight: 700; line-height: 1.25; }
.md-h3 { font-size: 1.05em; margin: 8px 0 2px; font-weight: 700; }
.md-sub { font-size: .8em; color: #949ba4; }
.md-li { display: flex; gap: 6px; }
.md-emoji { width: 1.375em; height: 1.375em; vertical-align: bottom; object-fit: contain; }
.md-spoiler { background: #1e1f22; color: transparent; border-radius: 3px; cursor: pointer; transition: .2s; }
.md-spoiler.visto { background: rgba(255, 255, 255, .1); color: inherit; }
.md-tiempo { background: rgba(255, 255, 255, .06); border-radius: 3px; padding: 0 2px; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
