@font-face {
  font-family: "Glitch Inside";
  src: url("../master/fonts/Glitch-inside.otf") format("opentype");
  font-display: swap;
}

@font-face {
  font-family: "Future Z";
  src: url("../master/fonts/Future-Z.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Vipnagorgialla";
  src: url("../master/fonts/Vipnagorgialla-Rg.otf") format("opentype");
  font-display: swap;
}

:root {
  --bg: #07090d;
  --panel: #111820;
  --panel-2: #0d1218;
  --line: #28313b;
  --text: #f6f8fb;
  --muted: #aeb7c2;
  --primary: #e6b844;
  --primary-text: #15120a;
  --green: #28d867;
  --red: #ff2b19;
  font-family: Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  user-select: none;
}

button,
select,
input {
  font: inherit;
}

.lock-screen {
  width: min(100%, 720px);
  min-height: 100svh;
  margin: 0 auto;
  display: grid;
  align-items: center;
  padding:
    max(18px, env(safe-area-inset-top))
    max(18px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(18px, env(safe-area-inset-left));
}

.lock-card {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  padding: 22px;
  text-align: center;
}

.shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 8px;
  padding: 16px;
}

.topbar {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0;
  padding-top: 4px;
}

.lock-button {
  position: absolute;
  top: 0;
  left: 0;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #202833;
  color: var(--text);
  font-weight: 700;
}

.brand-lockup {
  width: min(100%, 420px);
  margin: 4px auto 0;
  text-align: center;
  text-align-last: center;
}

.brand-title {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  color: #ff2300;
  font-family: "Glitch Inside", "Liberation Sans Local", Arial, Helvetica, sans-serif;
  font-size: clamp(27px, 6.8vw, 42px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  position: relative;
  text-align: center;
  text-align-last: center;
  text-shadow:
    0 0 4px rgba(255, 35, 0, 0.38),
    2px 0 0 rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  white-space: nowrap;
}

.brand-title::before,
.brand-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
}

.brand-title::before {
  color: rgba(0, 216, 255, 0.5);
  transform: translate(-1px, 0);
  animation: title-glitch-a 2.7s infinite steps(2, end);
}

.brand-title::after {
  color: rgba(255, 230, 68, 0.42);
  transform: translate(1px, 0);
  animation: title-glitch-b 3.4s infinite steps(2, end);
}

.brand-subtitle {
  display: block;
  width: 100%;
  margin: -2px 0 0;
  color: #dbcb5a;
  font-family: "Future Z", "Liberation Sans Local", Arial, Helvetica, sans-serif;
  font-size: clamp(8px, 2.55vw, 15px);
  line-height: 1;
  text-align: center;
  text-align-last: center;
  text-shadow: 0 0 4px rgba(219, 203, 90, 0.28);
  text-transform: uppercase;
  white-space: nowrap;
}

.lock-card .brand-lockup {
  width: min(100%, 560px);
  text-align: center;
  text-align-last: center;
}

.lock-card .brand-title {
  font-size: clamp(33px, 6.8vw, 54px);
  text-align: center;
  text-align-last: center;
}

.lock-card .brand-subtitle {
  font-size: clamp(10px, 2.35vw, 18px);
}

.mode-title {
  color: var(--green);
  font-family: "Future Z", "Liberation Sans Local", Arial, Helvetica, sans-serif;
  font-size: clamp(28px, 3.7vw, 50px);
  line-height: 1;
  margin-top: 8px;
  text-transform: uppercase;
}

.lock-card .mode-title {
  font-size: clamp(25px, 4.8vw, 42px);
  margin-top: 0;
}

.password-status,
.password-input,
.password-submit {
  font-family: "Vipnagorgialla", "Liberation Sans Local", Arial, Helvetica, sans-serif;
}

.password-status {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.password-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  background: #07090c;
  color: var(--text);
  font-size: 20px;
  text-align: center;
  -webkit-user-select: text;
  user-select: text;
}

.password-input::placeholder {
  color: rgba(246, 248, 251, 0.48);
  font-family: "Vipnagorgialla", "Liberation Sans Local", Arial, Helvetica, sans-serif;
}

.hud,
.controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.hud > div,
.controls {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
}

.hud > div {
  min-height: 66px;
  display: grid;
  place-items: center;
  padding: 8px;
}

.label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

.hud strong {
  font-family: "Future Z", Arial, Helvetica, sans-serif;
  font-size: 28px;
  line-height: 1;
}

.arena {
  position: relative;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: crosshair;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at center, #141d26, #06080b 70%);
  background-size: 42px 42px, 42px 42px, 100% 100%;
}

.center-message {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  pointer-events: none;
}

.center-message strong {
  color: var(--primary);
  font-family: "Future Z", Arial, Helvetica, sans-serif;
  font-size: clamp(34px, 5vw, 76px);
  line-height: 1;
  text-transform: uppercase;
}

.center-message span {
  color: var(--muted);
  font-size: 20px;
}

.target {
  position: absolute;
  width: var(--target-size, 72px);
  height: var(--target-size, 72px);
  border: 3px solid #fff7cf;
  background: radial-gradient(circle, #ffe46c 0 18%, #ff2b19 19% 43%, #111820 44% 61%, #28d867 62% 100%);
  box-shadow: 0 0 22px rgba(255, 35, 0, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 90ms ease;
}

.target.circle {
  border-radius: 50%;
}

.target.square {
  border-radius: 8px;
}

.target.diamond {
  border-radius: 8px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.target.hit {
  transform: translate(-50%, -50%) scale(0.7);
}

@keyframes title-glitch-a {
  0%, 88%, 100% {
    clip-path: inset(0 0 0 0);
    transform: translate(-1px, 0);
  }
  89% {
    clip-path: inset(10% 0 62% 0);
    transform: translate(-5px, -1px);
  }
  91% {
    clip-path: inset(60% 0 12% 0);
    transform: translate(3px, 1px);
  }
}

@keyframes title-glitch-b {
  0%, 80%, 100% {
    clip-path: inset(0 0 0 0);
    transform: translate(1px, 0);
  }
  81% {
    clip-path: inset(44% 0 28% 0);
    transform: translate(4px, 1px);
  }
  83% {
    clip-path: inset(18% 0 58% 0);
    transform: translate(-3px, -1px);
  }
}

[hidden] {
  display: none !important;
}

.controls {
  grid-template-columns: 180px 180px 1fr 1fr;
  padding: 10px;
}

.button,
.controls select {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 0 12px;
  font-family: "Future Z", Arial, Helvetica, sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.primary {
  background: var(--primary);
  color: var(--primary-text);
}

.secondary,
.controls select {
  background: #303945;
  color: var(--text);
}

.controls label {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  body {
    overflow: auto;
  }

  .shell {
    min-height: 100vh;
    height: auto;
  }

  .hud,
  .controls {
    grid-template-columns: repeat(2, 1fr);
  }

  .controls label {
    grid-template-columns: 1fr;
  }
}
