﻿/*
  PlayRank ambient background, shared desktop and mobile shell.
  Only ordinary tournament/profile pages; excludes TV, Arena fullscreen, print.
  Ambient glow is behind content, not a header/card animation.
*/
html.pr-layout-ambient {
  --pr-ambient-a: rgba(27, 174, 151, .12);
  --pr-ambient-b: rgba(77, 151, 216, .10);
}
html.pr-layout-ambient[data-theme="dark"] {
  --pr-ambient-a: rgba(13, 148, 136, .28);
  --pr-ambient-b: rgba(37, 99, 235, .22);
}
html.pr-layout-ambient body {
  isolation: isolate;
}
html.pr-layout-ambient body::before,
html.pr-layout-ambient body::after {
  content: "";
  position: fixed;
  width: min(88vw, 1100px);
  height: min(88vh, 850px);
  z-index: -1;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(ellipse, var(--pr-ambient-a), transparent 69%);
  top: -24vh;
  left: -25vw;
  transform: translate3d(0, 0, 0);
  animation: pr-ambient-drift-a 16s ease-in-out infinite alternate;
}
html.pr-layout-ambient body::after {
  background: radial-gradient(ellipse, var(--pr-ambient-b), transparent 69%);
  top: 34vh;
  left: 44vw;
  animation-name: pr-ambient-drift-b;
  animation-duration: 21s;
}
@keyframes pr-ambient-drift-a {
  to { transform: translate3d(34vw, 23vh, 0); }
}
@keyframes pr-ambient-drift-b {
  to { transform: translate3d(-29vw, -24vh, 0); }
}
@media (prefers-reduced-motion: reduce) {
  html.pr-layout-ambient body::before,
  html.pr-layout-ambient body::after { animation: none; }
}
@media print {
  html.pr-layout-ambient body::before,
  html.pr-layout-ambient body::after { display: none; }
}
/* Glass on a separate paint layer: do not change dropdown containing blocks. */
@media screen {
  @supports (backdrop-filter: blur(8px)) {
    html.pr-layout-ambient #app-shell-container > .main-content > .pr-unified-header {
      background: transparent !important;
    }
    html.pr-layout-ambient #app-shell-container > .main-content > .pr-unified-header::before {
      content: "";
      position: absolute;
      inset: 0;
      z-index: -1;
      pointer-events: none;
      border-radius: inherit;
      background: color-mix(in srgb, var(--surface) 76%, transparent);
      backdrop-filter: blur(10px);
    }
  }
}

/* Same glass treatment for the shared profile and tournament tab strips. */
@media screen {
  @supports (backdrop-filter: blur(8px)) {
    html.pr-layout-ambient #app-shell-container :is(.profile-nav-links, .tournament-nav-links) {
      background: color-mix(in srgb, var(--surface) 76%, transparent);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
    }
  }
}
