:root {
  --bg: #07070d;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --text: #f8fafc;
  --muted: #a7a7b3;
  --green: #1ed47b;
  --green-hot: #21f592;
  --blue: #36a2eb;
  --blue-hot: #5bc0ff;
  --red: #e91e55;
  --red-hot: #ff2d66;
  --yellow: #ffd166;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 20% 0%, rgba(54, 162, 235, 0.18), transparent 32%),
    radial-gradient(circle at 85% 12%, rgba(30, 212, 123, 0.14), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(233, 30, 85, 0.12), transparent 34%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overscroll-behavior: none;
  user-select: none;
}

body::before {
  content: "";
  position: fixed;
  inset: -40%;
  pointer-events: none;
  background: conic-gradient(
    from 160deg,
    transparent,
    rgba(255, 255, 255, 0.055),
    transparent,
    rgba(255, 255, 255, 0.035),
    transparent
  );
  animation: slowSpin 26s linear infinite;
  opacity: 0.45;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 37px 37px;
  mask-image: radial-gradient(circle, black, transparent 76%);
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding:
    max(20px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
  overflow: hidden;
}

.screen {
  width: min(100%, 760px);
  animation: fadeIn 240ms ease-out;
}

.hidden {
  display: none !important;
}

.brand-card {
  width: min(100%, 560px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 34px;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.035)),
    rgba(10, 10, 18, 0.7);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.hero-card {
  position: relative;
  overflow: hidden;
  text-align: center;
}

.hero-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.brand-logo {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 0 auto;
}

.hud-logo-wrap {
  display: grid;
  place-items: center;
  padding: 0;
  background: transparent !important;
  border: 0 !important;
}

.hud-logo {
  display: block;
  width: 48px;
  height: 48px;
}

.result-logo {
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto 12px;
}

.centered-text,
.centered-card {
  text-align: center;
}

.logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.prezzit-mark {
  --mark-size: 92px;
  width: var(--mark-size);
  height: var(--mark-size);
  flex: 0 0 var(--mark-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle, var(--red) 0 57%, transparent 58%),
    conic-gradient(from 0deg, var(--blue) 0 49%, transparent 49% 51%, var(--green) 51% 99%, transparent 99% 100%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28), inset 0 0 0 8px rgba(255, 255, 255, 0.95);
}

.prezzit-mark span {
  color: white;
  font-size: calc(var(--mark-size) * 0.58);
  font-weight: 1000;
  letter-spacing: -0.08em;
  transform: translateY(-1px);
}

.prezzit-mark.small {
  --mark-size: 66px;
  margin: 0 auto 12px;
}

.eyebrow {
  color: var(--yellow);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 900;
  text-align: center;
}

h1,
h2 {
  margin: 8px 0 8px;
  line-height: 0.92;
  letter-spacing: -0.085em;
  text-align: center;
}

h1 {
  font-size: clamp(3.45rem, 13vw, 7.5rem);
}

h2 {
  font-size: clamp(2.25rem, 8vw, 4.7rem);
}

.tagline {
  color: var(--muted);
  font-size: 1.06rem;
  margin: 0 0 22px;
  text-align: center;
}

.quick-rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.quick-rules div {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 5px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
}

.quick-rules strong,
.quick-rules small {
  display: block;
}

.quick-rules small {
  color: var(--muted);
  margin-top: 1px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
}

.dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  margin: 0;
  box-shadow: 0 0 18px currentColor;
}

.green-dot {
  background: var(--green-hot);
  color: var(--green-hot);
}

.blue-dot {
  background: var(--blue-hot);
  color: var(--blue-hot);
}

.red-dot {
  background: var(--red-hot);
  color: var(--red-hot);
}

.profile-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-align: center;
}

.profile-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
  color: var(--text);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  text-align: center;
}

.profile-input:focus {
  border-color: var(--yellow);
  box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.1);
}

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 16px 0 12px;
}

.mode-button,
.ghost-button,
.primary-button,
.tiny-button {
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 950;
  transition:
    transform 120ms ease,
    background 120ms ease,
    opacity 120ms ease,
    box-shadow 120ms ease;
}

.mode-button {
  padding: 12px 10px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  text-align: center;
}

.mode-button span,
.mode-button small {
  display: block;
}

.mode-button small {
  margin-top: 4px;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.8;
}

.mode-button.active {
  background: var(--text);
  color: #09090f;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.13);
}

.mode-card {
  margin: 0 0 16px;
  padding: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.2);
  text-align: center;
}

.mode-card strong {
  display: block;
  font-size: 1.04rem;
}

.mode-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.38;
}

.daily-info {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.13);
  color: var(--yellow);
  font-weight: 950;
  font-size: 0.84rem;
}

.primary-button {
  width: 100%;
  padding: 16px 18px;
  background: var(--yellow);
  color: #16130a;
  box-shadow: 0 16px 42px rgba(255, 209, 102, 0.18);
  text-align: center;
}

.primary-button:hover,
.mode-button:hover,
.ghost-button:hover,
.tiny-button:hover {
  transform: translateY(-1px);
}

.primary-button:active,
.mode-button:active,
.ghost-button:active,
.tiny-button:active {
  transform: translateY(0) scale(0.99);
}

.profile-card,
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}

.profile-card > div,
.result-grid > div,
.hud > div {
  padding: 14px;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.26);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: center;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

strong {
  font-size: 1.55rem;
}

.settings-row {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  text-align: center;
}

.tiny-button {
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.78rem;
  text-align: center;
}

.danger-text {
  color: #ff97aa;
}

.game-screen {
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
}

.hud {
  display: grid;
  grid-template-columns: 1fr auto 1fr 1fr;
  gap: 12px;
  align-items: center;
}

.top-strip {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-weight: 850;
  font-size: 0.85rem;
  text-align: center;
}

.top-strip span,
.combo-toast {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  padding: 8px 11px;
}

.combo-toast {
  align-self: center;
  color: var(--yellow);
  font-weight: 1000;
  letter-spacing: 0.08em;
  animation: pop 520ms ease-out;
  text-align: center;
}

.instruction {
  text-align: center;
  font-size: clamp(2.25rem, 8vw, 6.2rem);
  font-weight: 1000;
  line-height: 0.9;
  letter-spacing: -0.07em;
  min-height: 1.05em;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.35);
}

.prezz-button {
  width: min(86vw, 450px);
  aspect-ratio: 1 / 1;
  align-self: center;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-content: center;
  gap: 10px;
  color: white;
  box-shadow:
    inset 0 -24px 60px rgba(0, 0, 0, 0.36),
    0 24px 90px rgba(0, 0, 0, 0.48);
  cursor: pointer;
  transition:
    transform 90ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    filter 160ms ease;
  touch-action: none;
  position: relative;
  overflow: hidden;
  text-align: center;
}

.prezz-button::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.prezz-button::after {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.24), transparent 60%);
  transform: translateX(-55%) rotate(10deg);
  transition: transform 240ms ease;
}

.prezz-button:hover::after {
  transform: translateX(55%) rotate(10deg);
}

.prezz-button:active {
  transform: scale(0.965);
}

.prezz-button span {
  position: relative;
  z-index: 1;
}

.prezz-button span:first-child {
  font-size: clamp(2.5rem, 12vw, 5.9rem);
  font-weight: 1000;
  letter-spacing: -0.08em;
}

.prezz-button span:last-child {
  font-size: clamp(0.78rem, 2.4vw, 1rem);
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.prezz-button.idle {
  background: radial-gradient(circle at 35% 25%, #666675, #1a1a25 65%, #0c0c12 100%);
}

.prezz-button.green {
  background: radial-gradient(circle at 35% 25%, #a7ffce, var(--green-hot) 42%, #079b55 100%);
  box-shadow:
    0 0 66px rgba(25, 245, 138, 0.44),
    inset 0 -24px 60px rgba(0, 0, 0, 0.28);
}

.prezz-button.blue {
  background: radial-gradient(circle at 35% 25%, #c9ebff, var(--blue-hot) 42%, #075bb3 100%);
  box-shadow:
    0 0 66px rgba(55, 167, 255, 0.44),
    inset 0 -24px 60px rgba(0, 0, 0, 0.28);
}

.prezz-button.red {
  background: radial-gradient(circle at 35% 25%, #ffb0c0, var(--red-hot) 42%, #9f1239 100%);
  box-shadow:
    0 0 70px rgba(255, 45, 85, 0.48),
    inset 0 -24px 60px rgba(0, 0, 0, 0.32);
}

.prezz-button.warning {
  filter: saturate(1.9) contrast(1.22);
}

.prezz-button.green,
.prezz-button.blue {
  animation: breathe 700ms ease-in-out infinite;
}

.prezz-button.red {
  animation: redThrob 520ms ease-in-out infinite;
}

.timer-wrap {
  height: 14px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.timer-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--green-hot), var(--yellow), var(--red-hot));
  transform-origin: left;
}

.timer-bar.running {
  animation-name: drain;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.game-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-weight: 850;
  gap: 12px;
  text-align: center;
}

.ghost-button {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  text-align: center;
}

.ghost-button.full {
  margin-top: 12px;
  width: 100%;
}

.result-card {
  text-align: center;
}

.rank-message {
  margin: 0 0 16px;
  padding: 12px;
  color: var(--yellow);
  border-radius: 16px;
  background: rgba(255, 209, 102, 0.1);
  font-weight: 900;
}

.achievement-list {
  display: grid;
  gap: 8px;
  margin: 14px 0 16px;
}

.achievement {
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  color: var(--text);
  font-weight: 850;
  text-align: center;
}

.scare-flash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: #000;
  z-index: 20;
  animation: scare 780ms ease-out forwards;
}

.scare-flash.panic {
  animation-duration: 980ms;
  background: repeating-linear-gradient(0deg, #000 0 14px, #210009 15px 19px);
}

.scare-flash.daily {
  background: radial-gradient(circle, #250022, #000 55%);
}

.scare-face {
  width: min(70vw, 430px);
  aspect-ratio: 1 / 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  font-size: clamp(5.5rem, 22vw, 15rem);
  font-weight: 1000;
  background: radial-gradient(circle, #fff 0 6%, var(--red-hot) 7% 18%, #050505 19% 100%);
  text-shadow: 0 0 16px red;
  filter: contrast(1.4);
}

.shake {
  animation: shake 220ms linear infinite;
}

.glitch {
  animation: glitch 160ms linear infinite;
}

.pulse-danger {
  animation: dangerPulse 420ms ease-in-out infinite;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drain {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

@keyframes pop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.94);
  }

  20% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translateY(-8px) scale(1.04);
  }
}

@keyframes slowSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.015);
  }
}

@keyframes redThrob {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.025);
  }
}

@keyframes shake {
  0%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }

  20% {
    transform: translate(-7px, 5px) rotate(-1deg);
  }

  40% {
    transform: translate(6px, -4px) rotate(1deg);
  }

  60% {
    transform: translate(-4px, -6px) rotate(0.5deg);
  }

  80% {
    transform: translate(5px, 6px) rotate(-0.5deg);
  }
}

@keyframes glitch {
  0%,
  100% {
    filter: hue-rotate(0deg) contrast(1);
  }

  33% {
    filter: hue-rotate(70deg) contrast(1.8);
  }

  66% {
    filter: hue-rotate(-90deg) contrast(1.5);
  }
}

@keyframes dangerPulse {
  0%,
  100% {
    filter: brightness(1);
  }

  50% {
    filter: brightness(1.3);
  }
}

@keyframes scare {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  12% {
    opacity: 1;
    transform: scale(1.08);
  }

  55% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.15);
    visibility: hidden;
  }
}

.reduce-motion *,
.reduce-motion *::before,
.reduce-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}

.brand-credit {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 26px;
  opacity: 0.9;
}

.brand-credit-text {
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.brand-credit-logo {
  display: block;
  width: min(110px, 28%);
  height: auto;
  opacity: 0.92;
}

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

@media (max-width: 540px) {
  .app {
    padding: 14px;
  }

  .brand-card {
    border-radius: 26px;
  }

  .brand-logo {
    width: min(100%, 430px);
  }

  .quick-rules {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .quick-rules div {
    padding: 12px;
  }

  .profile-card,
  .result-grid {
    gap: 8px;
  }

  .hud {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .hud-logo-wrap {
    display: none;
  }

  .profile-card > div,
  .result-grid > div,
  .hud > div {
    padding: 10px;
  }

  strong {
    font-size: 1.22rem;
  }

  .mode-row {
    gap: 8px;
  }

  .mode-button {
    padding: 10px 8px;
    text-align: center;
  }

  .mode-button small {
    display: none;
  }

  .game-screen {
    min-height: calc(100dvh - 28px);
    gap: 12px;
  }

  .prezz-button {
    width: min(88vw, 390px);
  }

  .brand-credit {
    margin-top: 16px;
  }

  .brand-credit-logo {
  width: min(100px, 50%);
}