/* ---------- Animación de inicio (al abrir Fichado.gg) ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: var(--bg) radial-gradient(700px 380px at 50% 40%, rgba(0, 215, 194, 0.16), transparent 70%);
  transition: opacity 0.5s ease, visibility 0.5s;
}
.splash.done { opacity: 0; visibility: hidden; }
.splash.done .splash-logo { transform: scale(1.08); }
.no-splash .splash { display: none; }
.splash-logo { display: grid; justify-items: center; gap: 14px; transition: transform 0.5s ease; }
.splash-logo img { animation: splash-in 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both, splash-glow 1.8s ease-in-out 0.75s infinite; }
.splash-name { font-weight: 800; font-size: 30px; letter-spacing: -0.02em; animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both; }
.splash-name b { color: var(--brand); text-shadow: 0 0 18px rgba(0, 215, 194, 0.6); }
.splash-bar { width: 170px; height: 3px; margin-top: 4px; border-radius: 3px; overflow: hidden; background: rgba(255, 255, 255, 0.08); animation: fade-in 0.4s ease 0.5s both; }
.splash-bar span { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); animation: splash-load 1.1s ease-in-out infinite; }
@keyframes splash-in { from { opacity: 0; transform: scale(0.5) rotate(-90deg); } }
@keyframes splash-glow { 50% { filter: drop-shadow(0 0 20px rgba(0, 215, 194, 0.75)); } }
@keyframes splash-load { from { transform: translateX(-100%); } to { transform: translateX(260%); } }

/* Si Windows pide menos movimiento, casi sin animaciones */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Tutorial de bienvenida ---------- */
.tut { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 20px; animation: tut-in 0.3s ease-out; }
.tut.closing { animation: tut-out 0.26s ease-in forwards; }
.tut-lock { overflow: hidden; }
.tut-backdrop { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(0, 215, 194, 0.1), transparent 60%), rgba(4, 5, 6, 0.82); backdrop-filter: blur(8px); }
.tut-box { position: relative; display: flex; flex-direction: column; width: min(920px, 100%); max-height: calc(100vh - 40px); overflow: hidden; border: 1px solid var(--border-strong); border-radius: 16px; background: linear-gradient(180deg, #171717, #111); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 215, 194, 0.06); animation: tut-pop 0.4s cubic-bezier(0.2, 0.9, 0.25, 1.1); }
.tut-skip { position: absolute; top: 14px; right: 16px; z-index: 2; padding: 4px 8px; border: 0; border-radius: 6px; background: none; color: var(--dim-fg); font: 600 12.5px var(--font); cursor: pointer; }
.tut-skip:hover { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.tut-stage { flex: 1; min-height: 0; overflow: auto; }
.tut-pane { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 410px; animation: tut-step 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); }
.tut-visual { position: relative; display: grid; place-items: center; padding: 34px 28px; border-right: 1px solid var(--border); background: radial-gradient(ellipse at 30% 20%, rgba(0, 215, 194, 0.08), transparent 60%), #0d0d0d; overflow: hidden; }
.tut-text { display: flex; flex-direction: column; justify-content: center; padding: 40px 38px 30px; }
.tut-count { margin-bottom: 8px; color: var(--brand); font: 700 12px var(--font); letter-spacing: 0.08em; text-transform: uppercase; }
.tut-text h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; }
.tut-body { color: var(--muted-fg); font-size: 14.5px; line-height: 1.6; }
.tut-body p { margin: 0 0 10px; }
.tut-body b { color: var(--fg); }
.tut-body a { color: var(--brand-light); }
.tut-body kbd, .tut-keys kbd { display: inline-block; padding: 1px 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; background: #1d1d1d; color: var(--fg); font: 600 12px var(--mono); }
.tut-steps { margin: 4px 0 12px; padding-left: 20px; line-height: 1.75; }
.tut-form { display: flex; gap: 8px; margin: 4px 0 6px; }
.tut-form input { flex: 1; min-width: 0; }
.tut-later { font-size: 12.5px; }
.tut-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--border); background: #121212; }
.tut-dots { display: flex; gap: 7px; }
.tut-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.18); cursor: pointer; transition: width 0.25s, background 0.25s; }
.tut-dots button.on { width: 22px; background: var(--brand); }
.tut-nav { display: flex; gap: 8px; }

/* Dibujos de cada paso */
.tut-art { position: relative; width: 100%; max-width: 330px; }
.tut-mock { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: #151515; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45); animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.05s backwards; }
.tut-champ { width: 26px; height: 26px; border-radius: 6px; }

.tut-hello { display: grid; place-items: center; gap: 22px; min-height: 280px; }
.tut-halo { position: absolute; top: 18%; left: 50%; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 215, 194, 0.35), transparent 65%); transform: translateX(-50%); filter: blur(10px); animation: tut-breathe 3s ease-in-out infinite; }
.tut-logo { position: relative; width: 104px; height: 104px; filter: drop-shadow(0 10px 30px rgba(0, 215, 194, 0.45)); animation: tut-float 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-chips { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tut-chips span { padding: 4px 10px; border: 1px solid var(--brand-line); border-radius: 999px; background: var(--brand-soft); color: var(--brand-light); font-size: 12px; font-weight: 700; animation: tut-float 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-chips span:nth-child(2) { animation-delay: 0.08s; }
.tut-chips span:nth-child(3) { animation-delay: 0.16s; }
.tut-chips span:nth-child(4) { animation-delay: 0.24s; }

.tut-rank { display: flex; align-items: center; gap: 12px; }
.tut-rank b { display: block; font-size: 16px; }
.tut-rank span { color: var(--muted-fg); font-size: 12px; }
.tut-ring { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: conic-gradient(#e3b85b 0 58%, rgba(255, 255, 255, 0.08) 0); }
.tut-ring span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #151515; color: #e3b85b; font: 800 13px var(--mono); }
.tut-lp { width: 100%; height: 56px; }
.tut-match { display: flex; align-items: center; gap: 9px; padding: 6px 9px; border-radius: 8px; border-left: 3px solid; background: rgba(255, 255, 255, 0.025); font-size: 12.5px; }
.tut-match .mono { margin-left: auto; color: var(--muted-fg); }
.tut-match.win { border-color: var(--win); }
.tut-match.win b { color: var(--win); }
.tut-match.loss { border-color: var(--loss); }
.tut-match.loss b { color: var(--loss); }

.tut-bar, .tut-score { display: flex; align-items: center; gap: 7px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #111; font-size: 12px; }
.tut-bar .live-dot, .tut-score .live-dot { width: 7px; height: 7px; }
.tut-time { margin-left: auto; color: var(--brand); font-weight: 700; }
.tut-teams { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.tut-team { display: flex; gap: 3px; padding: 6px; border-radius: 8px; border-top: 2px solid; background: rgba(255, 255, 255, 0.025); }
.tut-team.blue { border-color: var(--blue); }
.tut-team.red { border-color: var(--red); }
.tut-team .tut-champ { width: 100%; max-width: 24px; height: auto; aspect-ratio: 1; }
.tut-score { border-top: 2px solid var(--brand); }
.tut-score .mono { margin-left: 4px; color: var(--fg); }
.tut-more { margin-left: auto; padding: 2px 7px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted-fg); }
.tut-import { padding: 9px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 12.5px; text-align: center; box-shadow: 0 6px 18px rgba(0, 215, 194, 0.25); }

.tut-game { min-height: 280px; border-radius: 12px; border: 1px solid var(--border-strong); background: radial-gradient(ellipse at 70% 30%, rgba(80, 110, 160, 0.35), transparent 60%), linear-gradient(160deg, #1e2a36, #0f151c); overflow: hidden; animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-ov { position: absolute; top: 14px; left: 14px; width: 132px; border: 1px solid var(--border-strong); border-radius: 8px; background: rgba(12, 12, 12, 0.88); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); }
.tut-ov-bar { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px; border-bottom: 1px solid var(--border); font-size: 9.5px; letter-spacing: 0.06em; }
.tut-ov-lock { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.tut-ov-lock svg { width: 10px; height: 10px; }
.tut-ov-row { display: flex; align-items: center; gap: 5px; padding: 5px 8px; }
.tut-ov-row .tut-champ { width: 22px; height: 22px; margin-right: auto; }
.tut-spell { position: relative; display: block; width: 22px; height: 22px; overflow: hidden; border-radius: 5px; }
.tut-spell img { width: 100%; height: 100%; }
.tut-spell.cd img { filter: grayscale(1) brightness(0.45); }
.tut-spell.cd i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 8.5px; font-style: normal; font-weight: 700; }
.tut-cards { position: absolute; right: 14px; bottom: 34px; left: 160px; display: flex; justify-content: center; gap: 8px; }
.tut-card-mini { position: relative; display: flex; justify-content: center; width: 44px; height: 70px; border: 2px solid rgba(200, 180, 240, 0.6); border-radius: 6px; background: #0d161b; }
.tut-card-mini .aug-tier { width: 26px; height: 18px; margin-top: -10px; font-size: 10.5px; }
.tut-best { position: absolute; top: -28px; padding: 0 4px; border: 1px solid #ffcd50; border-radius: 3px; background: #1a160c; color: #ffcd50; font-size: 7.5px; font-weight: 800; white-space: nowrap; }
.tut-keys { position: absolute; bottom: 10px; left: 14px; color: var(--muted-fg); font-size: 11px; }

.tut-key { display: grid; place-items: center; min-height: 240px; }
.tut-key-card { display: flex; flex-direction: column; gap: 9px; width: 100%; padding: 18px; border: 1px solid var(--border-strong); border-radius: 12px; background: #151515; font-size: 12px; animation: tut-float 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) backwards; }
.tut-key-field { padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: #0d0d0d; color: var(--brand-light); }
.tut-key-btn { align-self: flex-start; padding: 6px 10px; border-radius: 7px; background: #c53030; color: #fff; font-weight: 700; }

.tut-ai { padding: 12px 13px; border: 1px solid rgba(138, 120, 255, 0.35); border-radius: 10px; background: linear-gradient(135deg, rgba(110, 90, 255, 0.1), rgba(0, 215, 194, 0.05)); font-size: 12px; line-height: 1.5; }
.tut-ai-title { margin-bottom: 6px; font-weight: 700; }
.tut-ai p { margin: 0 0 4px; color: var(--muted-fg); }
.tut-ai p b { color: var(--brand-light); }
.tut-ai-note { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted-fg); font-size: 12px; }

.tut-done { display: grid; place-items: center; min-height: 260px; }
.tut-check { display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 10px rgba(0, 215, 194, 0.12), 0 0 50px rgba(0, 215, 194, 0.45); animation: tut-pop 0.5s cubic-bezier(0.2, 0.9, 0.25, 1.3) backwards; }
.tut-check svg { width: 50px; height: 50px; }
.tut-spark { position: absolute; top: 50%; left: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-light); opacity: 0; animation: tut-spark 0.9s ease-out 0.15s forwards; transform: rotate(calc(var(--i) * 25.7deg)) translateY(0); }
.tut-spark:nth-child(3n) { background: #ffcd50; }
.tut-spark:nth-child(3n + 1) { background: #ff6478; }

@keyframes tut-in { from { opacity: 0; } }
@keyframes tut-out { to { opacity: 0; } }
@keyframes tut-pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } }
@keyframes tut-step { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 18px)); } }
@keyframes tut-float { from { opacity: 0; transform: translateY(12px); } }
@keyframes tut-breathe { 50% { opacity: 0.6; transform: translateX(-50%) scale(1.08); } }
@keyframes tut-spark { 0% { opacity: 1; transform: rotate(calc(var(--i) * 25.7deg)) translateY(0); } 100% { opacity: 0; transform: rotate(calc(var(--i) * 25.7deg)) translateY(-90px); } }

@media (max-width: 760px) {
  .tut-pane { grid-template-columns: 1fr; }
  .tut-visual { padding: 22px; border-right: 0; border-bottom: 1px solid var(--border); }
  .tut-text { padding: 24px 22px; }
  .tut-text h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .tut, .tut-box, .tut-pane, .tut-mock, .tut-logo, .tut-chips span, .tut-halo, .tut-game, .tut-key-card, .tut-check, .tut-spark { animation: none; }
}
