@font-face {
  font-family: "Rainy Hearts";
  src: url("assets/fonts/rainyhearts.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "bluescreen";
  src: url("assets/fonts/Blue Screen Personal Use.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  padding: 0;
  background-color: black;
  background: url('assets/gifs/download.gif') no-repeat center center fixed;
  background-size: cover;
  cursor: url("white cross.cur"), auto;
  overflow: hidden;
  font-family: "bluescreen", monospace;
  color: #ccc;
}

#container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  touch-action: none;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 1s ease-in-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.cross-container {
  text-align: center;
}

.cross-logo {
  width: 200px;
  height: auto;
  margin-bottom: 30px;
}

.enter-text {
  font-family: "bluescreen", monospace;
  color: #fff;
  font-size: 1.5rem;
  letter-spacing: 2px;
  animation: blink 2s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}

.main-content {
  min-height: 100vh;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  position: relative;
  z-index: 1;
}

.main-content.show {
  opacity: 1;
}

.crt {
  animation: textShadow 1.6s infinite;
}

.crt::after {
  content: " ";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: rgba(18, 16, 16, 0.1);
  opacity: 0;
  z-index: 2;
  pointer-events: none;
  animation: flicker 0.15s infinite;
}

.crt::before {
  content: " ";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
              linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
  background-size: 100% 2px, 3px 100%;
  z-index: 2;
  pointer-events: none;
}

@keyframes flicker {
  0% { opacity: 0.27861; }
  5% { opacity: 0.34769; }
  10% { opacity: 0.23604; }
  15% { opacity: 0.90626; }
  20% { opacity: 0.18128; }
  25% { opacity: 0.83891; }
  30% { opacity: 0.65583; }
  35% { opacity: 0.67807; }
  40% { opacity: 0.26559; }
  45% { opacity: 0.84693; }
  50% { opacity: 0.96019; }
  55% { opacity: 0.08594; }
  60% { opacity: 0.20313; }
  65% { opacity: 0.71988; }
  70% { opacity: 0.53455; }
  75% { opacity: 0.37288; }
  80% { opacity: 0.71428; }
  85% { opacity: 0.70419; }
  90% { opacity: 0.7003; }
  95% { opacity: 0.36108; }
  100% { opacity: 0.24387; }
}

@keyframes textShadow {
  0%, 100% {
    text-shadow: 0.5px 0 1px rgba(0,30,255,0.5), -0.5px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
  50% {
    text-shadow: 2.5px 0 1px rgba(0,30,255,0.5), -2.5px 0 1px rgba(255,0,80,0.3), 0 0 3px;
  }
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  10% { transform: translate(-1px, -1px); }
  20% { transform: translate(1px, 1px); }
  30% { transform: translate(-1px, 1px); }
  40% { transform: translate(1px, -1px); }
  50% { transform: translate(-1px, 0); }
  60% { transform: translate(1px, 0); }
  70% { transform: translate(0, 1px); }
  80% { transform: translate(0, -1px); }
  90% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.centered-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 1;
  opacity: 1;
}

.centered-logo h1 {
  font-family: "Rainy Hearts", cursive;
  font-size: 6vw;
  font-weight: normal;
  color: #fff;
  margin: 0;
  margin-bottom: 1rem;
  letter-spacing: 2px;
}

.subtitle {
  font-family: "bluescreen", monospace;
  font-size: 1.4vw;
  color: #ccc;
  letter-spacing: 1px;
}

.links {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: absolute;
  top: 70%;
  color: #fff;
  font-family: "bluescreen", monospace;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  justify-content: center;
}

.links a {
  text-decoration: none;
  margin: 0 -20px;
  width: 15vw;
  font-size: 1.7vw;
  transition: color 0.3s ease;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.links a:hover {
  color: red;
}

.links2 {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: absolute;
  top: 86%;
  color: #fff;
  font-family: "bluescreen", monospace;
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
  justify-content: center;
}

.links2 a {
  text-decoration: none;
  margin: 0 -20px;
  width: 15vw;
  font-size: 1.7vw;
  transition: color 0.3s ease;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.links2 a:hover {
  color: red;
}

.skull-decoration {
  position: fixed;
  right: 25%;
  top: 10%;
  z-index: 0;
  width: 40vh;
}

.raven-decoration {
  position: fixed;
  left: 6%;
  bottom: 10%;
  z-index: 0;
  width: 40vh;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 20%;
  height: 50%;
  background-color: rgba(255, 255, 255, 0.9);
  border: 1px solid #000;
  display: none;
  z-index: 10;
  padding: 20px;
  box-sizing: border-box;
}

.popup-content {
  text-align: center;
  font-family: "bluescreen", monospace;
}

.popup-content a {
  color: black;
  text-decoration: none;
}

.popup-content a:visited {
  color: black;
}

.popup-content a:hover,
.popup-content a:focus {
  color: black;
  text-decoration: underline;
}

@keyframes flashRedBlack {
  0%, 100% {
    color: #900c3f;
  }
  50% {
    color: black;
  }
}

.blinking {
  animation: flashRedBlack 2.5s infinite;
}

@media (max-width: 600px) {
  body {
    background-attachment: scroll;
    overflow: visible;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 0;
  }

  .centered-logo {
    position: relative !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 10px 0 20px 0 !important;
    z-index: 1 !important;
    opacity: 1 !important;
  }

  .centered-logo h1 {
    font-size: 15vw !important;
  }

  .subtitle {
    font-size: 4vw !important;
  }

  .links, .links2 {
    position: relative !important;
    top: 0 !important;
    width: 100% !important;
    flex-direction: column !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .links a, .links2 a {
    margin: 6px 0 !important;
    width: 90% !important;
    font-size: 5vw !important;
  }

  .links {
    margin-bottom: 8px !important;
  }
  .links2 {
    margin-top: 0 !important;
  }

  .skull-decoration, .raven-decoration {
    position: fixed !important;
    width: 25vh !important;
  }

  .skull-decoration {
    right: 10% !important;
    top: 5% !important;
  }

  .raven-decoration {
    left: 10% !important;
    bottom: 5% !important;
  }

  .popup {
    width: 90% !important;
    height: auto !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
  }
}