:root { 
  --overlay-dark: rgba(10,10,10,0.65); 
}

/* ========================= */
/* GLOBAL */
/* ========================= */

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #000;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
  "Liberation Mono", "Courier New", monospace;

  /* brak niechcianych efektów mobilnych */
  -webkit-tap-highlight-color: transparent;
}

/* ========================= */
/* BOOT ANIMACJA */
/* ========================= */

@keyframes bootFlash {
  0% { opacity: 1; filter: brightness(1); }
  8% { opacity: 0.15; filter: brightness(1.25); }
  16% { opacity: 1; filter: brightness(1); }
  24% { opacity: 0.25; filter: brightness(1.15); }
  32% { opacity: 1; filter: brightness(1); }
  100% { opacity: 1; filter: brightness(1); }
}

@keyframes bootFade {
  from { opacity: 0; transform: scale(1.01); }
  to   { opacity: 1; transform: scale(1); }
}

body {
  display: grid;
  place-items: center;
  animation: bootFlash 0.7s ease-in-out, bootFade 0.55s ease-out;
  min-height: 100svh; /* stabilniejsze na mobile */
}

/* ========================= */
/* WARSTWY */
/* ========================= */

.layer {
  position: fixed;
  inset: 0;
  pointer-events: none; /* kluczowe – nic nie przechwytuje tapu */
}

/* ========================= */
/* TŁO */
/* ========================= */

.background {
  z-index: 0;
  background-color: black;
  background-image:
    linear-gradient(var(--overlay-dark), var(--overlay-dark)),
    url('../bg/1080p.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.08);
  transition: transform 0.2s ease-out;
  will-change: transform;
}

@supports (background-image: image-set(url("a.jpg") 1x)) {
  .background {
    background-image:
      linear-gradient(var(--overlay-dark), var(--overlay-dark)),
      image-set(
        url('../bg/720p.jpg') 1x,
        url('../bg/1080p.jpg') 1.5x,
        url('../bg/1440p.jpg') 2x
      );
  }
}

/* ========================= */
/* MATRIX */
/* ========================= */

#matrix {
  z-index: 1;
  opacity: 0.28;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none; /* BEZPIECZNIK */
}

/* ========================= */
/* WINIETA */
/* ========================= */

.vignette {
  z-index: 2;
  background: radial-gradient(
    circle at center,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0.55) 80%,
    rgba(0,0,0,0.85) 100%
  );
}

/* ========================= */
/* LOGO */
/* ========================= */

.logo-wrapper {
  position: fixed;
  z-index: 10;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  perspective: 1000px;
  pointer-events: auto;
}

.logo {
  width: min(520px, 78vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.65));
  transition: transform 0.1s ease-out, filter 0.2s ease-out;
  will-change: transform;
  cursor: pointer;
}

/* ========================= */
/* OVERLAY */
/* ========================= */

.enter-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(0,0,0,0.25);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);

  user-select: none;
  pointer-events: auto;
  touch-action: manipulation;
}

.enter-box {
  width: min(1110px, 96vw);
  max-width: 1100px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 18px;
  padding: 20px 18px 16px;
  background: rgba(10,10,10,0.52);
  box-shadow: 0 18px 55px rgba(0,0,0,0.55);
  text-align: center;
  pointer-events: auto;
  touch-action: manipulation;
}

.enter-title {
  font-size: 16px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.95);
  margin: 0 0 12px 0;
  text-transform: uppercase;
}

.enter-sub {
  margin: 0 0 18px 0;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.90);
  text-align: center;
  border-radius: 16px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.14);
}

.enter-sub p { margin: 0 0 10px 0; }
.enter-sub p:last-child { margin-bottom: 0; }

.enter-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.90);
  background: rgba(0,0,0,0.22);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.80);
  box-shadow: 0 0 18px rgba(255,255,255,0.18);
  animation: blink 1.05s infinite;
}

@keyframes blink {
  0%, 45% { opacity: 0.25; }
  55%, 100% { opacity: 1; }
}

.enter-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}

/* ========================= */
/* KURSORY */
/* ========================= */

html, body {
  cursor: url("../cur/1.cur"), auto;
}

#logo-link,
#logo-link img {
  cursor: url("../cur/2.cur"), pointer;
}

/* ========================= */
/* MOBILE DOPASOWANIE */
/* ========================= */

@media (max-width: 768px) {
  .enter-box { padding: 18px; }
  .enter-title { font-size: 14px; letter-spacing: .06em; }
  .logo { width: min(420px, 86vw); }
}