/* BrickyProcky: dark glass UI */

:root {
  --bg: #07071a;
  --text: #f3f4ff;
  --muted: rgba(226, 229, 255, 0.66);
  --faint: rgba(226, 229, 255, 0.42);
  --glass: rgba(255, 255, 255, 0.062);
  --glass-hi: rgba(255, 255, 255, 0.1);
  --stroke: rgba(255, 255, 255, 0.11);
  --stroke-hi: rgba(255, 255, 255, 0.24);
  --violet: #8b5cf6;
  --cyan: #22d3ee;
  --pink: #f472b6;
  --accent: linear-gradient(135deg, #9b7bff 0%, #7c3aed 45%, #22d3ee 100%);
  --radius: 22px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Outfit", "Inter", system-ui, sans-serif;
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --nav-h: 60px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 1em; height: 1em; flex: none; }
[hidden] { display: none !important; }
::selection { background: rgba(139, 92, 246, 0.45); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ------------------------------------------------------------ background */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(1100px 700px at 50% -12%, rgba(88, 60, 200, 0.42), transparent 62%),
    radial-gradient(900px 600px at 50% 120%, rgba(14, 116, 144, 0.28), transparent 60%),
    var(--bg);
}
.bg i {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform;
  animation: drift 26s var(--ease) infinite alternate;
}
.bg i:nth-child(1) { width: 58vmax; height: 58vmax; left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(124, 58, 237, 0.75), transparent 62%); }
.bg i:nth-child(2) { width: 52vmax; height: 52vmax; right: -20vmax; top: -6vmax; background: radial-gradient(circle, rgba(6, 182, 212, 0.55), transparent 62%); animation-duration: 32s; animation-delay: -8s; }
.bg i:nth-child(3) { width: 46vmax; height: 46vmax; left: 18vmax; bottom: -26vmax; background: radial-gradient(circle, rgba(219, 39, 119, 0.42), transparent 62%); animation-duration: 38s; animation-delay: -14s; }
.bg i:nth-child(4) { width: 36vmax; height: 36vmax; right: 6vmax; bottom: -12vmax; background: radial-gradient(circle, rgba(37, 99, 235, 0.5), transparent 62%); animation-duration: 30s; animation-delay: -20s; }
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(6vmax, 4vmax, 0) scale(1.08); }
  100% { transform: translate3d(-4vmax, 7vmax, 0) scale(0.96); }
}

/* ------------------------------------------------------------ glass */

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.045));
  border: 1px solid var(--stroke);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 18px 50px -22px rgba(0, 0, 0, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(22px) saturate(165%);
  backdrop-filter: blur(22px) saturate(165%);
}

/* ------------------------------------------------------------ nav */

.nav {
  position: fixed;
  top: 12px;
  left: 50%;
  z-index: 30;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--nav-h);
  width: min(760px, calc(100vw - 24px));
  padding: 0 10px 0 14px;
  border-radius: 999px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 700 17px/1 var(--display);
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.brand img { border-radius: 9px; box-shadow: 0 4px 14px rgba(124, 58, 237, 0.45); }
.tabs {
  position: relative;
  display: flex;
  margin: 0 auto;
  padding: 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.tabs a {
  position: relative;
  z-index: 1;
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 600;
  font-size: 14px;
  transition: color 0.25s;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: #fff; }
.tab-glider {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.85), rgba(34, 211, 238, 0.7));
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: transform 0.45s var(--ease), width 0.45s var(--ease), opacity 0.3s;
  opacity: 0;
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.icon-btn:hover { background: var(--glass-hi); color: #fff; border-color: var(--stroke); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn.on { color: #ffd166; }

/* ------------------------------------------------------------ views */

main { padding: calc(var(--nav-h) + 34px) 20px 60px; }
.view { animation: view-in 0.55s var(--ease) both; }
@keyframes view-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--nav-h) - 94px);
  max-width: 1040px;
  margin: 0 auto;
  text-align: center;
}
.hero > * { animation: rise 0.8s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: 0.06s; }
.hero > :nth-child(3) { animation-delay: 0.12s; }
.hero > :nth-child(4) { animation-delay: 0.18s; }
.hero > :nth-child(5) { animation-delay: 0.24s; }
.hero > :nth-child(6) { animation-delay: 0.3s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero-mark {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  filter: drop-shadow(0 16px 40px rgba(124, 58, 237, 0.55));
}
.hero-mark img { width: 84px; height: 84px; animation: float 6s ease-in-out infinite; }
.hero-mark.small img { width: 64px; height: 64px; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}
.title {
  margin: 0;
  font: 800 clamp(3.1rem, 10.5vw, 7.6rem)/0.95 var(--display);
  letter-spacing: -0.05em;
  background: linear-gradient(180deg, #ffffff 18%, #d5ceff 58%, #8ee8ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 10px 40px rgba(139, 92, 246, 0.35));
  padding-bottom: 0.08em;
}
.title.mid { font-size: clamp(2.6rem, 7.5vw, 5.2rem); }
.tagline {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.2rem);
}

/* two big choices */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  margin-top: 44px;
}
.choice {
  --mx: 50%;
  --my: 0%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 26px 26px 22px;
  border-radius: 26px;
  text-align: left;
  overflow: hidden;
  transition: transform 0.45s var(--ease), border-color 0.3s, box-shadow 0.45s var(--ease);
}
.choice::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx) var(--my), rgba(255, 255, 255, 0.13), transparent 45%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
.choice:hover {
  transform: translateY(-5px);
  border-color: var(--stroke-hi);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 30px 70px -26px rgba(124, 58, 237, 0.65), 0 2px 8px rgba(0, 0, 0, 0.2);
}
.choice:hover::before { opacity: 1; }
.choice-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  font-size: 27px;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 10px 24px -8px var(--glow);
}
.choice-icon.games { --glow: rgba(236, 72, 153, 0.8); background: linear-gradient(135deg, #f472b6, #8b5cf6); }
.choice-icon.proxy { --glow: rgba(34, 211, 238, 0.8); background: linear-gradient(135deg, #22d3ee, #6366f1); }
.choice-title { margin-top: 6px; font: 700 28px/1.1 var(--display); letter-spacing: -0.02em; }
.choice-desc { color: var(--muted); font-size: 15px; line-height: 1.55; }
.choice-desc b { color: var(--text); font-weight: 600; }
.choice-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #fff;
}
.choice-cta svg { font-size: 16px; transition: transform 0.3s var(--ease); }
.choice:hover .choice-cta svg { transform: translateX(4px); }

/* suggested apps */
.suggest { width: 100%; margin-top: 40px; }
.section-label {
  margin-bottom: 14px;
  color: var(--faint);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.apps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 10px;
}
.app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 92px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.2s;
}
.app-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 19px;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.3s;
}
.app-icon::after {
  content: "";
  width: 28px;
  height: 28px;
  background: var(--brand);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
.app:hover { color: #fff; }
.app:hover .app-icon {
  transform: translateY(-4px) scale(1.04);
  border-color: color-mix(in srgb, var(--brand) 55%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 16px 34px -12px color-mix(in srgb, var(--brand) 70%, transparent);
}

/* ------------------------------------------------------------ games */

.games-wrap { max-width: 1320px; margin: 0 auto; }
.games-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-title { margin: 0; font: 800 44px/1 var(--display); letter-spacing: -0.035em; }
.page-sub { margin: 8px 0 0; color: var(--muted); }
.page-sub b { color: var(--text); }
.search {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(380px, 100%);
  height: 48px;
  padding: 0 14px 0 16px;
  border-radius: 16px;
  color: var(--faint);
  font-size: 18px;
}
.search:focus-within { border-color: rgba(139, 92, 246, 0.6); color: var(--text); }
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 15px;
}
.search input::-webkit-search-cancel-button { filter: invert(1) opacity(0.5); }
kbd {
  padding: 2px 7px;
  border-radius: 7px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.25);
  color: var(--faint);
  font: 600 12px var(--ui);
}

/* featured banner */
.feature {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 250px;
  margin-bottom: 26px;
  padding: 28px;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #0c0b1e center / cover no-repeat;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  isolation: isolate;
}
.feature::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(7, 7, 26, 0.92) 0%, rgba(7, 7, 26, 0.55) 45%, rgba(7, 7, 26, 0.05) 80%),
    linear-gradient(0deg, rgba(7, 7, 26, 0.7), transparent 55%);
}
.feature-body { max-width: 460px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.badge svg { color: #ffd166; }
.feature h3 { margin: 12px 0 6px; font: 800 42px/1 var(--display); letter-spacing: -0.035em; }
.feature p { margin: 0 0 18px; color: rgba(236, 238, 255, 0.8); }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: var(--glass-hi);
  font-weight: 600;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); border-color: var(--stroke-hi); }
.btn.primary {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--accent);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 12px 30px -10px rgba(124, 58, 237, 0.85);
}
.btn.primary:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 18px 40px -12px rgba(124, 58, 237, 0.95); }
.btn.ghost { background: transparent; }

/* recently played strip */
.strip { margin-bottom: 26px; }
.strip-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}
.strip-row .card { width: 172px; flex: none; }

/* category chips */
.chips {
  display: flex;
  gap: 8px;
  margin: 0 -20px 20px;
  padding: 4px 20px 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.chip:hover { color: #fff; border-color: var(--stroke-hi); }
.chip small { color: var(--faint); font-weight: 600; }
.chip.active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(34, 211, 238, 0.55));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 8px 22px -10px rgba(139, 92, 246, 0.9);
}
.chip.active small { color: rgba(255, 255, 255, 0.8); }

/* game cards: no backdrop-filter here, there can be hundreds of them */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 18px 16px;
}
.card {
  position: relative;
  display: block;
  content-visibility: auto;
  contain-intrinsic-size: auto 190px;
}
.thumb {
  position: relative;
  aspect-ratio: 1.27;
  border-radius: 18px;
  overflow: hidden;
  background: #151331;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease), opacity 0.4s;
}
.thumb img.pending { opacity: 0; }
.gen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background:
    radial-gradient(120% 90% at 100% 0%, hsla(var(--h2), 90%, 62%, 0.55), transparent 60%),
    linear-gradient(145deg, hsl(var(--h), 70%, 36%), hsl(var(--h2), 72%, 20%));
}
.gen::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.9) 2px, transparent 2px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.9) 2px, transparent 2px);
  background-size: 44px 22px, 44px 22px;
  background-position: 0 0, 0 0;
  -webkit-mask: linear-gradient(200deg, #000, transparent 70%);
  mask: linear-gradient(200deg, #000, transparent 70%);
}
.gen span {
  position: relative;
  font: 800 21px/1.05 var(--display);
  letter-spacing: -0.02em;
  text-align: left;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.play-hint {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(10, 8, 30, 0.35), rgba(10, 8, 30, 0.1));
  opacity: 0;
  transition: opacity 0.3s;
}
.play-hint span {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 22px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: scale(0.8);
  transition: transform 0.4s var(--ease);
}
.card:hover .thumb, .card:focus-visible .thumb {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 22px 44px -18px rgba(124, 58, 237, 0.75);
}
.card:hover .thumb img { transform: scale(1.06); }
.card:hover .play-hint, .card:focus-visible .play-hint { opacity: 1; }
.card:hover .play-hint span { transform: scale(1); }
.tag {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 3px 8px;
  border-radius: 8px;
  background: rgba(8, 7, 24, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.9);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 2px 0;
}
.card-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-weight: 600;
  font-size: 14px;
}
.fav {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -4px -4px -4px 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: rgba(255, 255, 255, 0.28);
  font-size: 15px;
  transition: color 0.2s, background 0.2s, transform 0.2s;
}
.fav:hover { background: rgba(255, 255, 255, 0.08); color: rgba(255, 255, 255, 0.7); }
.fav.on { color: #ffd166; }
.fav:active { transform: scale(0.85); }
.empty { padding: 60px 0; text-align: center; color: var(--muted); }

/* ------------------------------------------------------------ proxy */

.proxy-hero { justify-content: center; }
.omni {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(680px, 100%);
  height: 64px;
  margin-top: 34px;
  padding: 0 8px 0 22px;
  border-radius: 22px;
  transition: border-color 0.2s, box-shadow 0.3s;
}
.omni:focus-within {
  border-color: rgba(139, 92, 246, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 0 5px rgba(139, 92, 246, 0.16), 0 24px 60px -24px rgba(124, 58, 237, 0.9);
}
.omni-ico { color: var(--faint); font-size: 21px; }
.omni input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  font-size: 17px;
}
.omni input::placeholder, .search input::placeholder { color: var(--faint); }
.go {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: var(--accent);
  font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 10px 24px -10px rgba(124, 58, 237, 0.9);
  transition: transform 0.25s var(--ease);
}
.go:hover { transform: scale(1.05); }
.relay {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--faint);
  font-size: 13px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); }
.relay.ok .dot { background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.18); }
.relay.busy .dot { background: #fbbf24; animation: pulse 1s ease-in-out infinite; }
.relay.bad .dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.18); }
.relay.bad { color: #fca5a5; }
@keyframes pulse { 50% { opacity: 0.35; } }
.proxy-hero .apps { max-width: 760px; margin: 0 auto; }

/* ------------------------------------------------------------ player / browser layers */

.layer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: rgba(5, 5, 18, 0.72);
  -webkit-backdrop-filter: blur(26px) saturate(140%);
  backdrop-filter: blur(26px) saturate(140%);
  animation: layer-in 0.45s var(--ease) both;
}
@keyframes layer-in {
  from { opacity: 0; transform: scale(0.985); }
  to { opacity: 1; transform: none; }
}
.layer-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 56px;
  padding: 6px 8px;
  border-radius: 20px;
}
.layer-title { display: flex; align-items: center; gap: 12px; min-width: 0; margin-left: 6px; }
.layer-title b { display: block; font: 700 17px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-title span:not(.layer-thumb) { display: block; color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.layer-thumb {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #1a1840 center / cover;
  border: 1px solid var(--stroke);
}
.spacer { flex: 1; }
.stage {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 20px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--stroke);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}
#browserStage iframe { background: #fff; }
.stage:fullscreen { border-radius: 0; border: 0; }
.loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: radial-gradient(circle at 50% 40%, #16133a, #07071a 70%);
  color: var(--muted);
  font-weight: 500;
  transition: opacity 0.35s;
}
.loading.done { opacity: 0; pointer-events: none; }
.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--cyan);
  border-right-color: var(--violet);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.progress {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  opacity: 0;
  transition: width 0.4s var(--ease), opacity 0.4s;
}
.progress.run { opacity: 1; width: 75%; transition: width 8s cubic-bezier(0.1, 0.7, 0.2, 1), opacity 0.2s; }
.progress.end { opacity: 0; width: 100%; transition: width 0.25s, opacity 0.5s 0.25s; }
.stage-error {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 50% 40%, #1b1236, #07071a 70%);
  text-align: center;
}
.stage-error h4 { margin: 0 0 8px; font: 700 24px var(--display); }
.stage-error p { margin: 0 auto 18px; max-width: 460px; color: var(--muted); }
.stage-error .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.address {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 42px;
  margin: 0 6px;
  padding: 0 14px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: #6ee7b7;
  font-size: 15px;
}
.address:focus-within { border-color: rgba(139, 92, 246, 0.6); }
.address input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: none;
  color: var(--text);
  font-size: 14px;
}

/* ------------------------------------------------------------ settings */

.modal {
  width: min(460px, calc(100vw - 32px));
  padding: 22px;
  border-radius: 26px;
  color: var(--text);
  background: linear-gradient(180deg, rgba(30, 27, 70, 0.9), rgba(16, 14, 40, 0.9));
}
.modal::backdrop { background: rgba(3, 3, 12, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: layer-in 0.35s var(--ease) both; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head h3 { margin: 0; font: 700 22px var(--display); }
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.field span { color: var(--muted); font-size: 13px; font-weight: 600; }
.field select, .field input {
  height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.3);
  outline: 0;
}
.field select:focus, .field input:focus { border-color: rgba(139, 92, 246, 0.7); }
.field option { background: #16143a; }
.modal-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; }
.fineprint { margin: 18px 0 0; color: var(--faint); font-size: 12px; line-height: 1.6; }
.fineprint a { color: var(--muted); text-decoration: underline; text-decoration-color: rgba(255, 255, 255, 0.25); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(24, 22, 56, 0.92);
  border: 1px solid var(--stroke);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.9);
  font-weight: 500;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.35s var(--ease), opacity 0.35s;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 760px) {
  :root { --nav-h: 56px; }
  .brand span { display: none; }
  .tabs a { padding: 8px 14px; }
  main { padding-left: 16px; padding-right: 16px; }
  .choices { grid-template-columns: 1fr; margin-top: 32px; }
  .choice { padding: 22px; }
  .page-title { font-size: 36px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px 12px; }
  .chips { margin: 0 -16px 16px; padding: 4px 16px 8px; }
  .feature { min-height: 220px; padding: 20px; }
  .feature h3 { font-size: 34px; }
  .layer { padding: 0; gap: 0; }
  .layer-bar { border-radius: 0; border-left: 0; border-right: 0; border-top: 0; }
  .stage { border-radius: 0; border: 0; }
  .layer-title { display: none; }
  .address { margin: 0 2px; }
  .app { width: 76px; }
}
@media (max-width: 420px) {
  .browser-hide-sm { display: none; }
}

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

/* ------------------------------------------------------------ panic screen */
/* A decoy "new tab" page. Its own light palette so the site theme never shows. */

.newtab {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  color: #202124;
  font-family: Arial, "Helvetica Neue", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  cursor: default;
}
@media (prefers-color-scheme: dark) {
  /* Chromebooks are usually in light mode; keep the decoy light regardless. */
  .newtab { background: #ffffff; color: #202124; }
}
.nt-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 15px 22px;
  font-size: 13px;
}
.nt-link { color: #3c4043; text-decoration: none; }
.nt-link:hover { text-decoration: underline; }
.nt-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: none;
}
.nt-icon:hover { background: rgba(60, 64, 67, 0.08); }
.nt-avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #7b1fa2;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.nt-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px;
  margin-top: min(22vh, 190px);
}
.nt-logo {
  font-size: clamp(52px, 9vw, 88px);
  font-weight: 500;
  letter-spacing: -3px;
  line-height: 1;
  margin-bottom: 26px;
  user-select: none;
}
.nt-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(560px, 92%);
  height: 46px;
  padding: 0 16px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
}
.nt-search:hover, .nt-search:focus-within {
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
  border-color: transparent;
}
.nt-s-ico { flex: none; }
.nt-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: none;
  color: #202124;
  font-size: 16px;
  font-family: inherit;
}
.nt-search input::placeholder { color: #5f6368; }
.nt-mic, .nt-lens { flex: none; cursor: pointer; }
.nt-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 4px;
  width: min(560px, 92%);
  margin-top: 40px;
}
.nt-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  width: 76px;
  padding: 16px 0 10px;
  border-radius: 8px;
  text-decoration: none;
  color: #3c4043;
}
.nt-tile:hover { background: rgba(60, 64, 67, 0.08); }
.nt-mono {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #f1f3f4;
  font-size: 22px;
  font-weight: 500;
}
.nt-name {
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
}
@media (max-width: 500px) {
  .nt-body { margin-top: 16vh; }
  .nt-shortcuts { max-width: 340px; }
}
/* A custom hiding-screen image, when set, covers the default start page. */
.nt-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
  z-index: 1;
}
/* Settings: hiding-screen controls */
.hs-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hs-row .btn { height: 38px; padding: 0 14px; }
.hs-note { color: var(--faint); font-size: 12px; }

/* ------------------------------------------------------------ passcode lock */

.lock {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  place-items: center;
  padding: 20px;
  background: rgba(7, 7, 26, 0.72);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
}
:root.locked .lock { display: grid; }
:root.locked main, :root.locked .nav { display: none !important; }
.lock-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(340px, 100%);
  padding: 34px 28px 26px;
  border-radius: 24px;
  text-align: center;
}
.lock-card img { filter: drop-shadow(0 12px 28px rgba(124, 58, 237, 0.6)); animation: float 6s ease-in-out infinite; }
.lock-card h2 { margin: 2px 0 0; font: 800 26px/1 var(--display); letter-spacing: -0.02em; }
.lock-card > p { margin: 0; color: var(--muted); font-size: 14px; }
.lock-card form { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 8px; }
.lock-card input {
  height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.3);
  color: var(--text);
  text-align: center;
  letter-spacing: 0.4em;
  font-size: 22px;
  outline: 0;
}
.lock-card input:focus { border-color: rgba(139, 92, 246, 0.7); }
.lock-card .btn.primary { justify-content: center; height: 46px; }
.lock-error { min-height: 16px; margin: 0; color: #fca5a5; font-size: 13px; font-weight: 500; }
.lock-card.shake { animation: lock-shake 0.4s; }
@keyframes lock-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(9px); }
  60% { transform: translateX(-5px); }
  80% { transform: translateX(5px); }
}

/* Visitor code list (owner only) */
.code-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 8px;
  max-height: 190px;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}
.code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}
.code-row code { font: 600 14px/1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 0.08em; }
.code-row.used { opacity: 0.45; }
.code-row.used code { text-decoration: line-through; }
.code-copy {
  border: 0;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  background: var(--glass-hi);
  color: var(--muted);
  cursor: pointer;
}
.code-copy:hover:not([disabled]) { color: #fff; }
.code-copy[disabled] { cursor: default; }

/* ------------------------------------------------------------ lite mode (weak Chromebooks) */
/* Drops the costly blur + animated background so low-end devices stay smooth. */

html { -webkit-tap-highlight-color: transparent; }
button, a, .chip, .card, .app, .nt-tile { touch-action: manipulation; }

:root.lite .bg i { animation: none !important; opacity: 0.4; }
:root.lite .bg::after { display: none; }
:root.lite .glass,
:root.lite .chip,
:root.lite .search,
:root.lite .omni,
:root.lite .layer,
:root.lite .loading,
:root.lite .lock,
:root.lite .badge { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
:root.lite .glass { background: rgba(26, 24, 60, 0.92); }
:root.lite .nav { background: rgba(18, 16, 46, 0.95); }
:root.lite .chip { background: rgba(32, 30, 64, 0.95); }
:root.lite .layer { background: rgba(8, 7, 24, 0.97); }
:root.lite .lock { background: rgba(7, 7, 26, 0.93); }
:root.lite .title { filter: none; }
:root.lite .lock-card img, :root.lite .hero-mark img { animation: none; }
:root.lite .choice:hover { transform: none; }
:root.lite .card:hover .thumb { transform: none; }
