/* ── Portal animations ────────────────────────────────── */
@keyframes spin-cw  { to { transform: rotate(360deg); } }
@keyframes spin-ccw { to { transform: rotate(-360deg); } }

@keyframes portal-glow-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.72; }
    50%       { transform: scale(1.06); opacity: 1;    }
}
@keyframes portal-inner-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.55; }
    50%       { transform: scale(1.08); opacity: 0.9;  }
}

/* Entering transition */
@keyframes portal-enter-bg {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes portal-enter-scale {
    0%   { transform: scale(0.3); }
    100% { transform: scale(9);   }
}
@keyframes portal-enter-flash {
    0%, 55% { opacity: 0; }
    100%    { opacity: 1; }
}

.portal-ring-1    { animation: spin-cw  34s linear infinite; }
.portal-ring-2    { animation: spin-ccw 22s linear infinite; }
.portal-ring-3    { animation: spin-cw  14s linear infinite; }
.portal-conic     { animation: spin-ccw  9s linear infinite; }
.portal-glow      { animation: portal-glow-pulse  3.1s ease-in-out infinite; }
.portal-inner     { animation: portal-inner-pulse 2.4s ease-in-out infinite; }

.portal-enter-overlay {
    position: fixed; inset: 0; z-index: 50;
    display: grid; place-items: center; overflow: hidden;
    background: black;
    animation: portal-enter-bg 0.25s ease-in-out forwards;
}
.portal-enter-portal {
    position: absolute;
    width: 42vmin; aspect-ratio: 1;
    display: grid; place-items: center;
    animation: portal-enter-scale 1.2s ease-in-out forwards;
}
.portal-enter-flash {
    position: absolute; inset: 0;
    background: white;
    animation: portal-enter-flash 1.2s ease-in-out forwards;
}

/* ── Logo spinner (V badge rotating) ─────────────────── */
@keyframes logo-spin-glow {
    0%   { transform: rotate(0deg);   filter: drop-shadow(0 0 8px rgba(155,92,246,.55)); }
    50%  { transform: rotate(180deg); filter: drop-shadow(0 0 18px rgba(201,168,76,.70)); }
    100% { transform: rotate(360deg); filter: drop-shadow(0 0 8px rgba(155,92,246,.55)); }
}
.portal-logo-spin {
    animation: logo-spin-glow 2.8s linear infinite;
}

/* ── Blazor error UI ──────────────────────────────────── */
#blazor-error-ui {
    background: rgba(7,7,16,.95);
    border-top: 1px solid rgba(155,92,246,.3);
    color: #c4bae8;
    bottom: 0; left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed; width: 100%;
    display: none; z-index: 1000;
    font-family: Inter, sans-serif; font-size: 0.875rem;
}
#blazor-error-ui .reload  { color: #d4bbff; margin-left: .5rem; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: .75rem; top: .5rem; }

.blazor-error-boundary {
    background: rgba(169,50,50,.15);
    border: 1px solid rgba(169,50,50,.35);
    border-radius: 12px;
    color: #fca5a5;
    padding: 1rem 1.5rem;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

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

/* ── Win-rate bar gradient ────────────────────────────── */
.winrate-bar { background: linear-gradient(to right, #8b5cf6, #d97706); }
