:root {
  --color-black: #000000;
  --color-white: #ffffff;

  --font-druk-wide: "Druk Wide Super", "DrukCyr Heavy", sans-serif;
  --font-helvetica-bold: "HelveticaNeueCyr", sans-serif;
  --font-helvetica-medium: "HelveticaNeueCyr", sans-serif;
  --font-helvetica-light: "HelveticaNeueCyr", sans-serif;
  --font-helvetica-black-condensed: "HelveticaNeueBlackCondensed", sans-serif;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;

  --z-canvas-under: 1;
  --z-overlay: 100;
  --z-canvas-over: 1000;
  --z-ui: 10000;
  --z-modal: 15000;
}

@font-face {
  font-family: "Druk Wide Super";
  src: url("./assets/fonts/Druk-Wide-Super-Desktop.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Heavy";
  src: url("./assets/fonts/DrukCyr-Heavy.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Heavy";
  src: url("./assets/fonts/DrukCyr-HeavyItalic.woff2") format("woff2");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Super";
  src: url("./assets/fonts/DrukCyr-Super.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Super";
  src: url("./assets/fonts/DrukCyr-SuperItalic.woff2") format("woff2");
  font-weight: 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Bold";
  src: url("./assets/fonts/DrukCyr-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Bold";
  src: url("./assets/fonts/DrukCyr-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Medium";
  src: url("./assets/fonts/DrukCyr-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "DrukCyr Medium";
  src: url("./assets/fonts/DrukCyr-MediumItalic.woff2") format("woff2");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("./assets/fonts/HelveticaNeueCyr-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("./assets/fonts/HelveticaNeueCyr-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueCyr";
  src: url("./assets/fonts/HelveticaNeueCyr-Light.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "HelveticaNeueBlackCondensed";
  src: url("./assets/fonts/HelveticaNeueBlackCondensed.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  color: var(--color-white-87);
  background: linear-gradient(90deg,
      var(--color-white) 0 50%,
      var(--color-black) 50% 100%);
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

#app {
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-canvas-over);
}

#app.main-screen-ready {
  z-index: var(--z-canvas-under);
}

#app.game-started {
  z-index: var(--z-canvas-over);
}

canvas {
  display: block;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
}

#react-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-modal);
  overflow: visible;
}

#react-root > * {
  pointer-events: none;
}

#react-root a,
#react-root button {
  pointer-events: auto;
}

.no-pointer-events {
  pointer-events: none;
}

.no-select {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.fixed-full {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

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

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

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes eyeBlinkLeft {

  0%,
  8%,
  25%,
  100% {
    fill: var(--color-black);
  }

  16.5% {
    fill: var(--color-white);
  }
}

@keyframes eyeBlinkRight {

  0%,
  41%,
  58%,
  100% {
    fill: var(--color-white);
  }

  49.5% {
    fill: var(--color-black);
  }
}

@keyframes textDisappear {
  0% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

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

@keyframes eyeMoveAndRotateLeft {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  41% {
    transform: translateY(300px) rotate(0deg);
  }

  100% {
    transform: translateY(300px) rotate(70.5deg);
  }
}

@keyframes eyeMoveAndRotateRight {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  41% {
    transform: translateY(300px) rotate(0deg);
  }

  100% {
    transform: translateY(300px) rotate(-70.5deg);
  }
}

@keyframes eyesFadeOut {
  0% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

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

  60% {
    opacity: 1;
    transform: scale(1.2);
  }

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

@keyframes miniEyeBlinkLeft {

  0%,
  8%,
  25%,
  100% {
    fill: var(--color-white);
  }

  16.5% {
    fill: var(--color-black);
  }
}

@keyframes miniEyeBlinkRight {

  0%,
  41%,
  58%,
  100% {
    fill: var(--color-white);
  }

  49.5% {
    fill: var(--color-black);
  }
}

.health-bar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--z-ui);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.6s ease-out;
}

.health-bar.visible {
  opacity: 1;
}

.health-bar-container {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 22px;
  background: var(--color-black);
  border: 1px solid var(--color-white);
  border-top: none;
  transition: transform 0.3s ease;
  will-change: transform;
}

.heart-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.heart {
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.heart-full path {
  fill: var(--color-white);
}

.heart-empty path {
  fill: var(--color-black);
}

.gameOverScreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  pointer-events: auto;
  animation: fadeIn 0.6s ease-out;
}

.gameOverContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.gameOverTitle {
  font-family: var(--font-druk-wide);
  font-size: 96px;
  font-weight: bold;
  color: var(--color-white);
  letter-spacing: 8px;
  margin: 0;
  text-align: center;
  line-height: 1;
  animation: fadeInSlide 0.6s ease-out;
}

.playAgainButton {
  font-family: var(--font-druk-wide);
  font-size: 32px;
  font-weight: bold;
  color: var(--color-white);
  background: transparent;
  border: none;
  cursor: pointer;
  letter-spacing: 4px;
  padding: 20px 40px;
  transition: all 0.3s ease;
  position: relative;
  animation: fadeInSlide 0.6s ease-out 0.2s;
}

.playAgainButton::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--color-white);
  transition: width 0.3s ease;
}

.playAgainButton:hover {
  transform: scale(1.1);
  /* text-shadow: 0 0 20px rgba(255, 255, 255, 0.8); */
}

.playAgainButton:hover::after {
  width: 100%;
}

.playAgainButton:active {
  transform: scale(1.05);
}

.gameOverlay {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  width: 100vw;
  height: 100vh;
  animation: fadeInSlide 0.6s ease-out;
  z-index: var(--z-ui);
  overflow: visible;
}

.game-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: var(--z-ui);
}

.overlayContent {
  position: fixed;
  top: 33px;
  left: 17px;
  max-width: 490px;
  padding: 20px;
  color: var(--color-black);
  pointer-events: none;
  z-index: var(--z-canvas-under);
}

.overlayTitle {
  margin: 0 0 22px 0;
  color: var(--color-black);
  font-family: var(--font-druk-wide);
  font-size: 18px;
  font-weight: 1000;
  line-height: 120%;
}

.overlayDescription {
  margin: 0;
  color: var(--color-black);
  font-family: var(--font-helvetica-medium);
  font-size: 18px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
}

.overlayHint {
  display: block;
  color: var(--color-black);
  font-family: var(--font-helvetica-bold);
  font-size: 18px;
  font-weight: 700;
  line-height: 120%;
  opacity: 1;
  transition: opacity 0.4s ease-out;
}

.overlayHint.hiding {
  opacity: 0;
}

.counterWrapperBlack,
.counterWrapperWhite {
  position: fixed;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  pointer-events: none;
  animation: fadeIn 0.8s ease-out;
  z-index: var(--z-canvas-under);
}

.counterWrapperBlack {
  left: 37px;
  align-items: flex-start;
}

.counterWrapperWhite {
  right: 40px;
  align-items: flex-end;
}

.counterLabelWhite,
.counterLabelBlack {
  font-family: var(--font-druk-wide);
  font-size: 18px;
  font-weight: 1000;
  line-height: 120%;
}

.counterLabelWhite {
  color: var(--color-black);
}

.counterLabelBlack {
  color: var(--color-white);
}

.counterBlack,
.counterWhite {
  font-family: var(--font-druk-wide);
  font-size: 40px;
  font-weight: 1000;
  line-height: 60px;
  text-transform: uppercase;
}

.counterBlack {
  color: var(--color-black);
}

.counterWhite {
  color: var(--color-white);
}



.logoCenter {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: var(--z-canvas-under);
  pointer-events: auto;
  max-width: 100vw;
  height: auto;
  transition: opacity 0.3s ease;
  overflow: visible !important;
}

.logoCenter.transforming {
  z-index: var(--z-canvas-over);
}

.clickable-eye {
  cursor: pointer;
  transition: all 0.3s ease;
  transform-origin: center;
}

.clickable-eye:hover {
  opacity: 0.8;
}

.logoCenter.hidden,
.logoCenter.hidden * {
  opacity: 0 !important;
  pointer-events: none;
  animation: none !important;
  visibility: hidden;
  z-index: -1 !important;
  display: none !important;
}

.main-logo-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.logo-arc-left {
  fill: var(--color-black);
}

.logo-arc-right {
  fill: var(--color-white);
}

.logoCenter.blinking .logo-arc-left {
  animation: eyeBlinkLeft 6s ease-in-out infinite;
}

.logoCenter.blinking .logo-arc-right {
  animation: eyeBlinkRight 6s ease-in-out infinite;
}

.logoCenter.transforming .logo-text {
  animation: textDisappear 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
  transform-origin: 406.5px 400px;
  will-change: transform, opacity;
}

.logoCenter.transforming .logo-arc-left {
  animation: eyeMoveAndRotateLeft 1.7s ease-in-out forwards;
  transform-origin: 406.5px 132px;
  will-change: transform;
}

.logoCenter.transforming .logo-arc-right {
  animation: eyeMoveAndRotateRight 1.7s ease-in-out forwards;
  transform-origin: 406.5px 132px;
  will-change: transform;
}

.logoCenter.transforming .logo-arc-left,
.logoCenter.transforming .logo-arc-right {
  animation-name: eyeMoveAndRotateLeft, eyesFadeOut;
  animation-duration: 1.7s, 0.4s;
  animation-timing-function: ease-in-out, ease-out;
  animation-delay: 0s, 2.1s;
  animation-fill-mode: forwards, forwards;
}

.logoCenter.transforming .logo-arc-right {
  animation-name: eyeMoveAndRotateRight, eyesFadeOut;
}

.ball-circle {
  opacity: 0;
  transition: none;
}

.miniLogo {
  position: fixed;
  width: 250px;
  height: auto;
  top: 34px;
  right: 39px;
  z-index: var(--z-ui);
  pointer-events: none;
  opacity: 0;
  transform: scale(0);
  transition: none;
}

.miniLogo svg {
  width: 100%;
  height: auto;
  display: block;
}

.miniLogo.show {
  animation: miniLogoBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.miniLogo.show .mini-eye-left {
  animation: miniEyeBlinkLeft 6s ease-in-out infinite 0.8s;
}

.miniLogo.show .mini-eye-right {
  animation: miniEyeBlinkRight 6s ease-in-out infinite 0.8s;
}

.jamiLupButton {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%) scale(0);
  z-index: var(--z-modal);
  pointer-events: none;
  opacity: 0;
  transition: none;
  cursor: pointer;
  text-decoration: none;
  display: block;
  width: 172px;
  height: 67px;
}

.jamiLupButton.show {
  pointer-events: auto;
  animation: jamiLupBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes jamiLupBounce {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0);
  }

  60% {
    opacity: 1;
    transform: translateX(-50%) scale(1.2);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

.jamiLupSvg {
  width: 100%;
  height: auto;
  display: block;
}

.jamiLupBg {
  fill: black;
  transition: fill 0.4s ease;
}

.jamiLupBorder {
  fill: none;
  stroke: white;
  transition: stroke 0.4s ease;
}

.jamiLupText {
  fill: white;
  transition: fill 0.4s ease;
}

.jamiLupButton:hover .jamiLupBg {
  fill: white;
}

.jamiLupButton:hover .jamiLupBorder {
  stroke: black;
}

.jamiLupButton:hover .jamiLupText {
  fill: black;
}

.orientationLockOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: white;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease-in-out;
  pointer-events: auto;
}

.orientationContent {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.phoneIcon {
  width: 120px;
  height: auto;
}

.orientationTitle {
  font-size: 40px;
  font-weight: bold;
  color: black;
  margin: 0;
}

.orientationSubtitle {
  color: #000;
  text-align: center;
  font-family: var(--font-druk-wide);
  font-size: 14px;
  font-style: normal;
  font-weight: 1000;
  line-height: 120%;
  margin: 0;
}

@media screen and (max-width: 768px) {
  body {
    -webkit-appearance: none;
    appearance: none;
    -webkit-text-size-adjust: 100%;
  }

  #app {
    width: 100dvw;
    height: 100dvh;
  }

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

  .health-bar-container {
    padding: 3px 10px;
    gap: 3px;
  }

  .heart {
    width: 14px;
    height: 14px;
  }

  .gameOverTitle {
    font-size: 36px;
    letter-spacing: 2.5px;
  }

  .playAgainButton {
    font-size: 14px;
    letter-spacing: 1.5px;
    padding: 10px 20px;
  }

  .gameOverContent {
    gap: 18px;
  }

  .phoneIcon {
    width: 80px;
  }

  .orientationSubtitle {
    font-size: 11px;
    line-height: 115%;
  }

  .orientationContent {
    gap: 14px;
  }
}

@media screen and (max-width: 640px) and (max-height: 400px) and (orientation: landscape) {
  body {
    font-size: 12px;
  }
}

@media screen and (min-width: 641px) and (max-width: 768px) and (orientation: landscape) {
  body {
    font-size: 14px;
  }
}

@media (max-height: 768px) and (max-width: 1024px) {
  .overlayContent {
    top: 10px;
    left: 10px;
    padding: 6px 10px;
  }

  .overlayTitle {
    font-size: 8px;
    margin-bottom: 8px;
  }

  .overlayDescription,
  .overlayHint {
    font-size: 8px;
  }

  .counterWrapperBlack,
  .counterWrapperWhite {
    bottom: 12px;
    gap: 2px;
  }

  .counterWrapperBlack {
    left: 24px;
  }

  .counterWrapperWhite {
    right: 24px;
  }

  .counterLabelWhite,
  .counterLabelBlack {
    font-size: 8px;
  }

  .counterBlack,
  .counterWhite {
    font-size: 18px;
    line-height: 28px;
  }

  .miniLogo {
    width: 120px;
    top: 12px;
    right: 12px;
  }

  .jamiLupButton {
    width: 80px;
    bottom: -20px;
  }
}

@media screen and (min-width: 769px) and (max-width: 1440px) {
  #app {
    width: 100dvw;
    height: 100dvh;
  }

  .health-bar-container {
    padding: 6px 16px;
    gap: 6px;
  }

  .heart {
    width: 20px;
    height: 20px;
  }

  .gameOverTitle {
    font-size: 50px;
    letter-spacing: 6px;
  }

  .playAgainButton {
    font-size: 20px;
    letter-spacing: 3px;
    padding: 16px 32px;
  }

  .gameOverContent {
    gap: 32px;
  }

  .phoneIcon {
    width: 100px;
  }

  .orientationSubtitle {
    font-size: 12px;
  }

  .orientationContent {
    gap: 17px;
  }
}

@media (min-width: 769px) and (max-width: 1680px) and (min-height: 769px) {
  .overlayContent {
    top: 20px;
    left: 14px;
    padding: 10px 14px;
  }

  .overlayTitle {
    font-size: 14px;
    margin-bottom: 14px;
  }

  .overlayDescription,
  .overlayHint {
    font-size: 14px;
  }

  .counterWrapperBlack,
  .counterWrapperWhite {
    bottom: 20px;
    gap: 2px;
  }

  .counterWrapperBlack {
    left: 22px;
  }

  .counterWrapperWhite {
    right: 22px;
  }

  .counterLabelWhite,
  .counterLabelBlack {
    font-size: 14px;
  }

  .counterBlack,
  .counterWhite {
    font-size: 32px;
    line-height: 48px;
  }

  .miniLogo {
    width: 250px;
    top: 34px;
    right: 39px;
  }

  .jamiLupButton {
    width: 150px;
    bottom: 20px;
  }
}

@media (min-width: 1681px) {
  .health-bar-container {
    padding: 8px 22px;
    gap: 8px;
  }

  .heart {
    width: 24px;
    height: 24px;
  }

  .gameOverTitle {
    font-size: 96px;
    letter-spacing: 8px;
  }

  .playAgainButton {
    font-size: 32px;
    letter-spacing: 4px;
    padding: 20px 40px;
  }

  .gameOverContent {
    gap: 40px;
  }

  .overlayContent {
    top: 32px;
    left: 17px;
    padding: 20px;
  }

  .overlayTitle {
    font-size: 18px;
    margin-bottom: 22px;
  }

  .overlayDescription,
  .overlayHint {
    font-size: 18px;
  }

  .counterWrapperBlack,
  .counterWrapperWhite {
    bottom: 30px;
    gap: 3px;
  }

  .counterWrapperBlack {
    left: 37px;
  }

  .counterWrapperWhite {
    right: 40px;
  }

  .counterLabelWhite,
  .counterLabelBlack {
    font-size: 18px;
  }

  .counterBlack,
  .counterWhite {
    font-size: 40px;
    line-height: 60px;
  }

  .miniLogo {
    width: 315px;
    top: 50px;
    right: 39px;
  }

  .jamiLupButton {
    width: 172px;
    bottom: 30px;
  }

  .phoneIcon {
    width: 120px;
  }

  .orientationSubtitle {
    font-size: 14px;
  }

  .orientationContent {
    gap: 20px;
  }
}

@media screen and (orientation: landscape),
screen and (orientation: portrait) {

  body,
  #app {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  canvas {
    will-change: transform;
    transform: translateZ(0);
  }
}