/* Acabado visual. El layout y los tamaños de los reproductores viven en style.css.
   Animamos entradas e interacciones; los iframes conservan su posición y sesión. */
:root {
  --motion-fast: 180ms;
  --motion-enter: 460ms;
  --ease-out: cubic-bezier(0.2, 0.75, 0.25, 1);
  --edge-light: #ffe3ab35;
}

body {
  background-image:
    radial-gradient(ellipse at 12% 12%, #ffce8330, transparent 34%),
    radial-gradient(ellipse at 90% 65%, #692f3735, transparent 40%),
    repeating-linear-gradient(
      125deg,
      transparent 0 110px,
      #fff5df05 110px 111px
    ),
    linear-gradient(155deg, #51494b, #876b60 54%, #ac8469);
}
:root[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 12% 12%, #aa743218, transparent 34%),
    radial-gradient(ellipse at 90% 65%, #74394314, transparent 40%),
    repeating-linear-gradient(
      125deg,
      transparent 0 110px,
      #fff5df03 110px 111px
    ),
    linear-gradient(155deg, #24211f, #191817 65%);
}
.site-header {
  box-shadow:
    0 1px 0 #ffe3ab12,
    0 12px 32px #21161314;
}
nav a {
  transition:
    color var(--motion-fast),
    background-color var(--motion-fast);
}
nav a:hover {
  color: var(--gold);
}
nav a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
.card,
.media-card,
.multi-tile,
.player-stat,
.player-medals {
  box-shadow:
    inset 0 1px 0 var(--edge-light),
    0 8px 24px #21161314;
  border-color: var(--line);
}
.media-card,
.player-stat,
.player-medals {
  transition:
    border-color var(--motion-fast),
    background-color var(--motion-fast);
}
.media-card:hover,
.player-stat:hover,
.player-medals:hover {
  border-color: var(--gold);
}
.multi-tile.focused {
  border-color: var(--gold);
  box-shadow:
    0 0 0 1px #ffd88925,
    0 12px 36px #0003;
}
.plain-button {
  transition:
    background-color var(--motion-fast),
    color var(--motion-fast),
    box-shadow var(--motion-fast);
}
.plain-button:hover {
  background: var(--gold);
  color: #302827;
  box-shadow: 0 4px 18px #ffd88920;
}
.plain-button:active {
  box-shadow: inset 0 2px 5px #30282740;
}
.version-label {
  border-radius: 4px;
  background: #ffd8890c;
  white-space: nowrap;
}
.multi-chat-head {
  background: linear-gradient(125deg, #ffd8890c, transparent);
}

/* Las entradas animadas se aplican a la interfaz sin mover los reproductores. */
@media (prefers-reduced-motion: no-preference) {
  .section-heading {
    animation: section-arrive var(--motion-enter) var(--ease-out) both;
  }
  .media-card {
    animation: surface-arrive var(--motion-enter) var(--ease-out) both;
  }
  .media-card:nth-child(3n + 2) {
    animation-delay: 45ms;
  }
  .media-card:nth-child(3n + 3) {
    animation-delay: 90ms;
  }
  dialog[open] {
    animation: dialog-arrive 280ms var(--ease-out) both;
  }
  dialog[open]::backdrop {
    animation: surface-arrive 220ms ease both;
  }
  .version-label {
    animation: surface-arrive 700ms ease both;
  }
  .theme-toggle:active {
    transform: scale(0.92);
  }
}
@keyframes section-arrive {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes surface-arrive {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes dialog-arrive {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* Multistream: las tarjetas no heredan la altura del chat vacío. */
.multi-workspace.without-chat {
  grid-template-columns: minmax(0, 1fr);
}
.multi-chat[hidden] {
  display: none;
}
.multi-workspace,
.multi-grid {
  align-items: start;
}
.multi-grid:not(.has-focus) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
}
main:has(.multi-workspace) {
  width: min(2200px, calc(100% - 64px));
}
.profile-sheet {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 32px;
  padding: 24px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(130deg, #191719aa, #59474177);
}
.skin-stage {
  display: grid;
  place-items: center;
  min-height: 420px;
  background: radial-gradient(ellipse at center, #ffd88918, transparent 70%);
}
.skin-stage canvas {
  max-width: 100%;
  object-fit: contain;
}
.profile-facts {
  align-self: center;
}
.profile-facts small {
  display: block;
  margin-top: 20px;
  color: var(--muted);
}
.minecraft-rank,
.medal-line,
.prank-symbol {
  font-family: "Pixelify Sans", monospace;
  font-weight: 700;
  font-size: 28px;
  text-shadow: 2px 2px #111;
}
.ink-green {
  color: #55ff55;
}
.ink-red {
  color: #ff5555;
}
.ink-gold {
  color: #ffaa00;
}
.ink-yellow {
  color: #ffff55;
}
.ink-white {
  color: #fff;
}
.ink-aqua {
  color: #55ffff;
}
.ink-blue {
  color: #5555ff;
}
.ink-purple {
  color: #aa55ff;
}
@media (max-width: 650px) {
  .profile-sheet {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .skin-stage {
    min-height: 340px;
  }
  main:has(.multi-workspace) {
    width: calc(100% - 24px);
  }
}
/* Ficha completa: misma familia pixelada en títulos, etiquetas, enlaces y avisos. */
.profile-sheet,
.profile-sheet * {
  font-family: "Minecraft", "Segoe UI Symbol", monospace;
}
.profile-facts {
  font-size: 21px;
  line-height: 1.55;
}
.profile-facts h2 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.profile-facts .eyebrow,
.profile-facts small {
  font-size: 15px;
  line-height: 1.5;
}
.profile-facts strong,
.minecraft-rank {
  font-weight: 700;
}
.medal-line,
.prank-symbol {
  font-variant-emoji: text;
}
.prank-icon {
  display: inline-block;
  width: 52px;
  height: 52px;
  margin-inline: 4px;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: middle;
}
.medal-line span {
  display: inline-block;
  font-size: 32px;
  margin-right: 5px;
}
.medal-line .minecraft-star {
  display: inline-block;
  width: 1.1em;
  height: 1em;
  object-fit: contain;
  image-rendering: pixelated;
  vertical-align: -0.12em;
}
.medal-line .minecraft-star--sparkles {
  width: 1.5em;
}
.skin-stage p {
  font-size: 18px;
  text-align: center;
  line-height: 1.5;
}

/* Entrada: luz esmeralda, órbitas y emblema con profundidad. */
.elite-entrance {
  position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh;
  max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden;
  background: transparent;
  color: #f5f1df; text-align: center;
}
.elite-entrance::backdrop { background: transparent; }
.entrance-backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 42%, #214d3e 0, #101e1b 38%, #070c0b 78%); }
.entrance-destination { visibility: hidden; }
.entrance-emblem { position: absolute; width: min(70vw, 500px); height: min(64dvh, 620px); left: 50%; top: 42%; transform: translate(-50%, -50%); animation: emblem-arrive 1.8s cubic-bezier(.16,1,.3,1) both; }
.entrance-emblem img, .entrance-emblem canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.entrance-emblem img { filter: drop-shadow(0 12px 38px #6cf3bb30); transition: opacity .5s; }
.entrance-emblem canvas { opacity: 0; transition: opacity .65s; }
.entrance-emblem.model-ready img { opacity: 0; }
.entrance-emblem.model-ready canvas { opacity: 1; }
.entrance-halo { position: absolute; width: 160vmax; height: 160vmax; border-radius: 50%; mask-image: radial-gradient(circle, #000 30%, transparent 70%); left: 50%; top: 40%; transform: translate(-50%, -50%); background: conic-gradient(from 0deg, transparent, #8afac912, transparent 25%, #e8dcbf0d, transparent 55%, #8afac912, transparent); animation: entrance-light 18s linear infinite; }
.entrance-rings { position: absolute; width: min(76vw, 650px); aspect-ratio: 1; border: 1px solid #a0e6c928; border-radius: 50%; left: 50%; top: 42%; transform: translate(-50%, -50%); box-shadow: 0 0 0 34px #8afac904, 0 0 0 35px #8afac911, 0 0 100px #84ffc116; animation: rings-arrive 2s ease-out both; }
.entrance-caption { position: absolute; bottom: 12%; width: 100%; animation: caption-arrive 1.2s .5s both; }
.entrance-caption p { font-size: 10px; letter-spacing: .3em; color: #b5d4c6; }
.entrance-caption strong { display: block; font-family: 'Minecraft', monospace; font-size: clamp(28px, 5vw, 48px); letter-spacing: .08em; margin: 12px 0; }
.entrance-caption span { font-size: 12px; color: #adbbb2; }
.entrance-skip { position: absolute; right: 26px; bottom: 25px; padding: 12px 18px; border: 1px solid #b4d5c54d; border-radius: 24px; background: #13231de0; color: #e1eee6; font-size: 13px; }
.entrance-skip:hover { background: #284638; border-color: #b4d5c5; }
.elite-entrance.entrance-leaving { pointer-events: none; }
.elite-entrance.entrance-leaving .entrance-emblem img { filter: none; }
@keyframes emblem-arrive { from { opacity: 0; transform: translate(-50%, -46%) scale(.7) rotate(-7deg); filter: blur(10px); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0); } }
@keyframes rings-arrive { from { opacity: 0; transform: translate(-50%, -50%) scale(.65); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes entrance-light { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes caption-arrive { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* El PNG original conserva su transparencia y se encaja según sus límites visibles. */
.farfa-frame { position: relative; isolation: isolate; aspect-ratio: 3227 / 1922; }
.farfa-frame-content { position: absolute; inset: 5.5% 10.8% 17.4% 4.5%; overflow: hidden; background: #1a1917; }
.farfa-frame-content > .preview, .farfa-frame-content > .detail-preview { width: 100%; height: 100%; aspect-ratio: auto; margin: 0; }
.farfa-frame-art { position: absolute; width: 116.52%; max-width: none; height: 112.38%; left: -12.89%; top: -10.51%; pointer-events: none; z-index: 3; }
.farfa-frame-profile { margin-block: 24px; }
@media (prefers-reduced-motion: reduce) { .elite-entrance, .elite-entrance * { animation: none !important; transition: none !important; } }

/* La miniatura ocupa el hueco entero sin crear filas con los controles. */
.farfa-frame-content > .preview { display: block; border: 0; }
.farfa-frame-content .preview .scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; }
.farfa-frame-facts { aspect-ratio: auto; margin-block: 24px; padding: 6% 12% 19% 5%; }
.farfa-frame-facts > .farfa-frame-content { position: relative; inset: auto; overflow: visible; background: transparent; }
.farfa-frame-facts .profile-sheet { margin: 0; padding: 16px; border: 0; background: transparent; grid-template-columns: minmax(180px, .85fr) minmax(0, 1fr); gap: 20px; }
.farfa-frame-facts .profile-facts { overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .farfa-frame-facts .profile-sheet { grid-template-columns: 1fr; padding: 12px; }
  .farfa-frame-facts .skin-stage { min-height: 280px; }
}
