@font-face {
  font-family: 'modeseven';
  src: url('./modeseven.ttf') format('truetype');
}

:root {
  --primary-color: #550783;
  --primary-color-rgb: 85, 7, 131;
  --secondary-color: #8107c7;
  --secondary-color-rgb: 129, 7, 199;
  --accent-color: #9f02fa;
  --accent-color-rgb: 159, 2, 250;

  --text-shadow: 0 0 6px rgba(var(--primary-color-rgb), 0.7);
}

* {
  text-shadow: var(--text-shadow);
}

html,
body {
  font-size: 200%;
  background-color: #000;
  height: 100%;
  width: 100%;
  overflow: hidden;
  font-family: 'modeseven';
  user-select: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  touch-action: manipulation;
}

center {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

#hidden-link {
  position: fixed;
  bottom: 10px;
  right: 10px;
  opacity: 0.1;
  width: 20px;
  height: 20px;
  z-index: 1000;
  cursor: pointer;
}

#hidden-link:hover {
  opacity: 0.3;
}

a {
  text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'modeseven', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blocky-btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 10px;
  border: 1px solid var(--primary-color);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--primary-color);
  font-size: 24px;
  border-radius: 8px;
  transition: background-color 0.3s, transform 0.2s, box-shadow 0.3s;
  font-family: 'modeseven', monospace;
  box-shadow: none;
  text-align: center;
  text-shadow: var(--text-shadow);
  cursor: pointer;
}

.blocky-btn:hover {
  background-color: rgba(0, 0, 0, 0.7);
  transform: scale(1.03);
  box-shadow: inset 0 0 8px rgba(var(--primary-color-rgb), 0.6),
    inset 0 0 16px rgba(var(--primary-color-rgb), 0.4),
    0 0 15px rgba(var(--primary-color-rgb), 0.3),
    0 0 25px rgba(var(--primary-color-rgb), 0.2);
}

.animated-text {

  color: var(--primary-color);

}

#loading-screen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 650px;
  border: 1px solid var(--primary-color);
  border-radius: 8px;
  box-shadow:
    0 0 30px rgba(var(--primary-color-rgb), 0.3),
    0 0 60px rgba(var(--primary-color-rgb), 0.1);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(var(--primary-color-rgb), 0.1));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 1000;
  box-sizing: border-box;
  padding: 20px;
  padding-top: 50px;
  position: relative;
  overflow: hidden;
  animation: loadingScreenPulse 3s ease-in-out infinite;
}

#loading-screen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 7px 7px 0 0;
  opacity: 0.8;
  z-index: 3;
}

#loading-screen::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#loading-message {
  display: block;
  color: var(--primary-color);
  font-size: 24px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
  font-family: 'modeseven', monospace;
  font-weight: bold;

  text-shadow: var(--text-shadow);
  max-width: 90%;
  word-wrap: break-word;
  white-space: pre-wrap;
  min-height: 3em;
  position: relative;
  z-index: 3;
}

#loading-logo,
#loading-title,
#loading-status {
  display: none;
}

#loading-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: 20px;
  min-height: 70px;
}

#progress-bar {
  display: block;
  width: 80%;
  height: 20px;

  border: 1px solid var(--primary-color);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: rgba(0, 0, 0, 0.05);
  box-shadow: inset 0 0 10px var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out;
  position: relative;
  z-index: 3;
}

#progress-bar-inner {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color), var(--accent-color));
  transition: width 0.3s ease-out;
  border-radius: 7px;
}

@keyframes entice-bob {

  0%,
  100% {
    transform: translateY(0);
    box-shadow: none;
  }

  50% {
    transform: translateY(-3px);
    box-shadow: none;
  }
}

#proceed-text {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  display: none;
  opacity: 0;
  transition: opacity 1s ease-in, transform 0.2s ease-out, background-color 0.3s ease-out, box-shadow 0.3s ease-out;
  animation: entice-bob 1.6s ease-in-out infinite;
  margin-top: -10px;

  padding: 10px 20px;
  border: 1px solid var(--primary-color);
  background-color: rgba(0, 0, 0, 0.5);
  color: var(--primary-color);
  font-size: 24px;
  border-radius: 8px;
  font-family: 'modeseven', monospace;
  box-shadow: none;
  text-shadow: var(--text-shadow);
  position: relative;
  z-index: 3;
  overflow: hidden;
}

#proceed-text::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#proceed-text:hover {
  animation: none;
  background-color: rgba(0, 0, 0, 0.7);
  box-shadow: inset 0 0 8px rgba(var(--primary-color-rgb), 0.6),
    inset 0 0 16px rgba(var(--primary-color-rgb), 0.4),
    0 0 15px rgba(var(--primary-color-rgb), 0.3),
    0 0 25px rgba(var(--primary-color-rgb), 0.2);
}

#blackhole-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

#terminal-container {
  position: fixed;
  width: 90%;
  max-width: 650px;
  z-index: 10;
  cursor: default;
  transition: opacity 0.5s ease-out;
  display: none;
  border-radius: 8px;
  border: 1px solid var(--primary-color);

  box-shadow: inset 0 0 10px var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin: 0;
  padding: 0;

  overflow: hidden;
}

#terminal-container::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#terminal {
  display: flex;
  flex-direction: column;
  height: 400px;
  padding: 20px;
  color: var(--primary-color);
  font-family: 'modeseven', monospace;
  box-sizing: border-box;
  font-size: 0.7rem;
  position: relative;
  border-radius: 7px 7px 0 0;
  opacity: 0.8;

  z-index: 2;
}

#terminal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 7px 7px 0 0;
  opacity: 0.8;
}

#terminal::after {
  content: "";
}

#terminal-minimize {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 20px;
  height: 20px;
  background-color: transparent;
  border: none;
  color: #000;
  font-size: 16px;
  line-height: 16px;
  text-align: center;
  cursor: pointer;
  z-index: 11;
  display: flex;
  justify-content: center;
  align-items: center;
}

#terminal-minimize:hover {
  transform: scale(1.1);
}

#terminal-output-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: scroll !important;
  overflow-x: hidden;
  margin-top: 15px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid var(--primary-color);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  max-height: 260px;
  height: 260px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) rgba(0, 0, 0, 0.3);
  transform: translateZ(0);
  will-change: scroll-position;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  backface-visibility: hidden;
  perspective: 1000px;
}

#terminal-output {
  font-family: 'modeseven', monospace;
  width: 100%;
  min-height: 100%;
  padding-bottom: 10px;
  font-size: 0.7rem;
  transform: translateZ(0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeSpeed;
}

#terminal-output div {
  margin-bottom: 5px;
  line-height: 1.2;
  text-shadow: var(--text-shadow);
  animation: textFadeIn 0.3s ease-out;
  word-wrap: break-word;
  white-space: pre-wrap;
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#terminal-output-container::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#terminal-output-container::-webkit-scrollbar-track {
  background: rgba(85, 7, 131, 0.1);
  border-radius: 4px;
}

#terminal-output-container::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color), var(--accent-color));
  border-radius: 4px;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.5);
}

#terminal-output-container::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, var(--secondary-color), var(--accent-color), var(--primary-color));
}

#cursor-follower.hide-on-scrollbar {
  opacity: 0;
  visibility: hidden;
}

#terminal-input-container {
  margin-top: 15px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  border: 1px solid var(--primary-color);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
  cursor: text;
}

#terminal-prompt {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

#terminal-prompt span {
  margin-right: 8px;
  color: var(--accent-color);
  text-shadow: 0 0 8px rgba(159, 2, 250, 0.7);
}

#terminal-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--primary-color);
  font-family: 'modeseven', monospace;
  width: 100%;
  padding: 0;
  margin: 0;
  font-size: 0.7rem;
  caret-color: transparent;
  position: relative;
}

#terminal-input:focus {
  caret-color: transparent;
}

#terminal-input::selection {
  background: rgba(159, 2, 250, 0.8);
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.6);
}

#terminal-input::-moz-selection {
  background: rgba(159, 2, 250, 0.8);
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.6);
}

::selection {
  background: rgba(159, 2, 250, 0.6);
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.9),
    0 0 4px rgba(0, 0, 0, 0.7);
}

::-moz-selection {
  background: rgba(159, 2, 250, 0.6);
  color: #ffffff;
  text-shadow:
    0 0 2px rgba(0, 0, 0, 0.9),
    0 0 4px rgba(0, 0, 0, 0.7);
}

.terminal-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 1em;
  background: linear-gradient(0deg,
      var(--primary-color) 0%,
      var(--accent-color) 50%,
      var(--primary-color) 100%);
  border-radius: 1px;
  animation: terminal-cursor-blink 1.0s ease-in-out infinite;
  pointer-events: none;
  z-index: 10;
  display: none;
  transform-origin: center;
}


#terminal-input::selection+.terminal-cursor,
#terminal-input::-moz-selection+.terminal-cursor {
  background: linear-gradient(0deg,
      #ffffff 0%,
      #f0f0f0 50%,
      #ffffff 100%);
  border: 1px solid var(--primary-color);
  width: 2px;
  height: 0.73em;
}

.terminal-cursor--on-selection {
  background: linear-gradient(0deg,
      #ffffff 0%,
      #f0f0f0 50%,
      #ffffff 100%) !important;
  border: 1px solid var(--primary-color) !important;
  width: 2px !important;
}

.terminal-cursor.focused {
  display: block;
}

@keyframes terminal-cursor-blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}


#terminal-toggle {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg,
      rgba(0, 0, 0, 0.8) 0%,
      rgba(var(--primary-color-rgb), 0.2) 50%,
      rgba(0, 0, 0, 0.8) 100%);
  border: 2px solid var(--primary-color);
  border-radius: 16px;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: none;
  box-sizing: border-box;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow:
    0 0 20px rgba(var(--primary-color-rgb), 0.3),
    0 0 40px rgba(var(--primary-color-rgb), 0.1);
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
}

#terminal-toggle::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#terminal-toggle:hover {
  transform: scale(1.1);
  box-shadow:
    0 0 30px rgba(var(--accent-color-rgb), 0.5),
    0 0 60px rgba(var(--accent-color-rgb), 0.2);
  border-color: var(--accent-color);
  background: linear-gradient(135deg,
      rgba(0, 0, 0, 0.7) 0%,
      rgba(var(--accent-color-rgb), 0.3) 50%,
      rgba(0, 0, 0, 0.7) 100%);
}

#terminal-toggle.active {
  background: linear-gradient(135deg,
      rgba(var(--secondary-color-rgb), 0.8) 0%,
      rgba(var(--primary-color-rgb), 0.5) 50%,
      rgba(var(--secondary-color-rgb), 0.8) 100%);
  box-shadow:
    0 0 25px rgba(var(--secondary-color-rgb), 0.6),
    0 0 50px rgba(var(--secondary-color-rgb), 0.3);
  border-color: var(--secondary-color);
  transform: perspective(1000px) rotateX(2deg) rotateY(-2deg);
}

#terminal-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  fill: var(--primary-color);
  transition: all 0.2s ease-out;
  z-index: 2;
  filter: drop-shadow(0 0 8px rgba(var(--primary-color-rgb), 0.6));
}

#terminal-toggle.active svg {
  fill: var(--primary-color);
  filter: drop-shadow(0 0 12px rgba(var(--primary-color-rgb), 1));
}

#terminal-toggle:hover svg {
  transform: translate(-50%, -50%) scale(1.1) rotateZ(5deg);
  fill: var(--accent-color);
  filter: drop-shadow(0 0 15px rgba(var(--accent-color-rgb), 0.8));
}

#cyac-protocol-status {
  position: fixed;
  bottom: 50px;
  right: 10px;
  font-size: 14px;
  font-family: 'modeseven', monospace;
  color: var(--primary-color);
  text-shadow: var(--text-shadow);
  background: rgba(0, 0, 0, 0.05);
  padding: 4px 8px;
  border-radius: 8px;
  z-index: 1001;
  pointer-events: none;
  box-shadow: inset 0 0 10px var(--primary-color);
  border: 1px solid var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 80px);
  display: none;
  opacity: 1;
  transition: none;
  overflow: hidden;
}

#cyac-protocol-status::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#watermark {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 16px;
  font-family: 'modeseven', monospace;
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 1000;
  pointer-events: none;
  box-shadow: inset 0 0 10px var(--primary-color);
  border: 1px solid var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 80px);
  text-shadow: var(--text-shadow);
}


@keyframes clickRippleExpand {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  50% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

#progress-percentage {
  display: block;
  color: var(--primary-color);
  font-family: 'modeseven', monospace;
  font-size: 16px;
  text-align: center;
  text-shadow: var(--text-shadow);
  height: 20px;
  line-height: 20px;
  margin-bottom: 0px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-out;
  position: relative;
  z-index: 3;
}

@keyframes flash-effect {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.3;
  }
}

#progress-percentage.flash-complete {
  animation: flash-effect 0.25s linear 2;
}

#cosmic-radiation-alert {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%) translateZ(0);
  text-align: center;
  font-size: 24px;
  font-family: 'modeseven', monospace;
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  padding: 10px 20px;
  border-radius: 8px;
  z-index: 10000;
  pointer-events: none;
  box-shadow: inset 0 0 10px var(--primary-color);
  border: 1px solid var(--primary-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#cosmic-radiation-alert::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg,
      rgba(var(--primary-color-rgb), 0.05),
      rgba(var(--primary-color-rgb), 0.05) 1px,
      transparent 1px,
      transparent 3px);
  pointer-events: none;
  z-index: 1;
}

#cosmic-radiation-alert.visible {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 2560px) {

  html,
  body {
    font-size: 250%;
  }

  #terminal-container {
    max-width: 900px;
  }

  #terminal {
    height: 500px;
  }

  #terminal-toggle {
    width: 60px;
    height: 60px;
  }

  #terminal-toggle svg {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 1200px) and (max-width: 2559px) {}

@media (min-width: 768px) and (max-width: 1199px) {

  html,
  body {
    font-size: 180%;
  }

  #terminal-container {
    max-width: 80%;
  }
}

@media (min-width: 481px) and (max-width: 767px) {

  html,
  body {
    font-size: 160%;
  }

  #terminal-container {
    max-width: 90%;
  }

  #terminal {
    height: 350px;
    font-size: 0.7rem;
  }

  #progress-bar {
    width: 50%;
  }
}

@media (max-width: 480px) {

  html,
  body {
    font-size: 140%;
    /* Slightly larger for readability */
  }

  #loading-screen {
    width: 95%;
    padding: 15px;
    /* Reduce padding */
    padding-top: 40px;
  }

  #terminal-container {
    width: 95%;
    max-width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 4px;
    /* Slightly less rounded */
  }

  #terminal {
    height: 60vh;
    /* Use viewport height instead of fixed pixels */
    max-height: 400px;
    padding: 10px;
    font-size: 0.8rem;
    /* Larger text for readability on small screens */
  }

  #terminal-output-container {
    padding: 5px;
  }

  #progress-bar {
    width: 85%;
    /* Wider on mobile */
  }

  #terminal-toggle {
    bottom: 20px;
    left: 20px;
    width: 50px;
    /* Larger touch target */
    height: 50px;
  }

  #terminal-toggle svg {
    width: 28px;
    height: 28px;
  }

  /* Adjust positioned elements to not overlap */
  #watermark {
    font-size: 10px;
    padding: 4px 8px;
    max-width: 100px;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    /* Better contrast */
  }

  #cyac-protocol-status {
    font-size: 10px;
    bottom: 45px;
    /* Stack above watermark */
    right: 10px;
    max-width: 100px;
    background: rgba(0, 0, 0, 0.8);
  }

  #loading-message {
    font-size: 18px;
    padding: 0 10px;
    max-width: 95%;
  }

  #terminal-input {
    font-size: 16px;
    /* Prevents iOS zoom */
  }

  #terminal-input-container {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
  }
}

@media (max-width: 380px) {

  /* Really small screens */
  #terminal-toggle {
    bottom: 15px;
    left: 15px;
    width: 45px;
    height: 45px;
  }

}

@media (min-aspect-ratio: 16/9) and (min-width: 1200px) {
  #terminal-container {
    max-width: 700px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 320px) {

  html,
  body {
    font-size: 110%;
  }

  #terminal-container {
    width: 100%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  #terminal::before {
    border-radius: 0;
  }

  #terminal {
    height: 250px;
    padding: 10px;
  }

  #terminal-toggle {
    bottom: 10px;
    left: 10px;
    width: 36px;
    height: 36px;
  }

  #terminal-toggle svg {
    width: 22px;
    height: 22px;
  }
}

.error-message-box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'modeseven', monospace;
  font-size: 0.7rem;
  line-height: 1.2;
  text-align: center;
  max-width: 90%;
  color: var(--primary-color);
  text-shadow: var(--text-shadow);
  border: 1px solid var(--primary-color);
  box-shadow: inset 0 0 10px var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 8px 12px;
  z-index: 5;
}

#terminal-tooltip {
  position: fixed;
  display: none;
  font-family: 'modeseven', monospace;
  font-size: 0.7rem;
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--primary-color);
  box-shadow: 0 0 10px rgba(var(--primary-color-rgb), 0.3);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1000;
  pointer-events: none;
  white-space: nowrap;
  text-shadow: var(--text-shadow);
}


/* CUSTOM CURSOR EFFECTS - Trail Design with States */
#cursor-follower {
  display: none;
}

#cursor-follower.hover-state {
  width: 16px;
  height: 16px;
  background: radial-gradient(circle,
      rgba(var(--primary-color-rgb), 1) 0%,
      rgba(var(--primary-color-rgb), 0.8) 40%,
      rgba(var(--primary-color-rgb), 0.4) 70%,
      transparent 100%);
  box-shadow: 0 0 25px rgba(var(--primary-color-rgb), 0.8);
  opacity: 1;
  animation: cursorHoverGlow 2s ease-in-out infinite;
}

#cursor-follower.click-state {
  width: 8px;
  height: 8px;
  background: radial-gradient(circle,
      rgba(var(--secondary-color-rgb), 1) 0%,
      rgba(var(--secondary-color-rgb), 0.9) 40%,
      rgba(var(--secondary-color-rgb), 0.5) 70%,
      transparent 100%);
  box-shadow: 0 0 30px rgba(var(--secondary-color-rgb), 1);
  opacity: 1;
  animation: cursorClickPulse 0.2s ease-out;
}

#cursor-follower.dragging-state {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle,
      rgba(var(--accent-color-rgb), 1) 0%,
      rgba(var(--accent-color-rgb), 0.7) 40%,
      rgba(var(--accent-color-rgb), 0.4) 70%,
      transparent 100%);
  box-shadow:
    0 0 20px rgba(var(--accent-color-rgb), 0.8),
    inset 0 0 8px rgba(var(--accent-color-rgb), 0.6);
  opacity: 1;
  animation: cursorDragPulse 1s ease-in-out infinite;
}

#cursor-follower.text-select-state {
  width: 2px;
  height: 16px;
  background: linear-gradient(to bottom,
      rgba(var(--primary-color-rgb), 1) 0%,
      rgba(var(--primary-color-rgb), 0.8) 100%);
  box-shadow:
    0 0 10px rgba(var(--primary-color-rgb), 0.8),
    2px 0 0 rgba(var(--primary-color-rgb), 0.6),
    -2px 0 0 rgba(var(--primary-color-rgb), 0.6);
  border-radius: 1px;
  opacity: 1;
}


@keyframes cursorClickPulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(0.7);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes typingRipple {
  0% {
    transform: scale(0);
    opacity: 1;
  }

  50% {
    transform: scale(1.2);
    opacity: 0.8;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

@keyframes cursorDragPulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 20px rgba(var(--accent-color-rgb), 0.6),
      inset 0 0 8px rgba(var(--accent-color-rgb), 0.4);
  }

  50% {
    transform: scale(1.1);
    box-shadow:
      0 0 30px rgba(var(--accent-color-rgb), 0.8),
      inset 0 0 12px rgba(var(--accent-color-rgb), 0.6);
  }
}

@keyframes cursorHoverGlow {

  0%,
  100% {
    box-shadow:
      0 0 25px rgba(var(--primary-color-rgb), 0.8),
      0 0 15px rgba(var(--primary-color-rgb), 0.4);
  }

  50% {
    box-shadow:
      0 0 35px rgba(var(--primary-color-rgb), 1),
      0 0 25px rgba(var(--primary-color-rgb), 0.6),
      0 0 50px rgba(var(--primary-color-rgb), 0.3);
  }
}

#cursor-trail {
  display: none;
}

/* 3D PARALLAX SYSTEM */
.parallax-element {
  transform-style: preserve-3d;
  transition: transform 0.1s ease-out;
  will-change: transform;
}

.parallax-layer-1 {
  /* Closest layer - strongest effect */
  --parallax-strength: 1.0;
}

.parallax-layer-2 {
  /* Middle layer - medium effect */
  --parallax-strength: 0.5;
}

.parallax-layer-3 {
  /* Distant layer - subtle effect */
  --parallax-strength: 0.2;
}

/* Flash-inspired button hover effects */
.blocky-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.blocky-btn::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, var(--primary-color), transparent);
  opacity: 0;
  transition: all 0.6s;
  transform: rotate(45deg);
}

.blocky-btn:hover::before {
  opacity: 0.1;
  transform: rotate(45deg) translateX(100%);
}

/* Enhanced loading screen with Flash aesthetics */
@keyframes loadingScreenPulse {

  0%,
  100% {
    box-shadow:
      0 0 30px rgba(var(--primary-color-rgb), 0.3),
      0 0 60px rgba(var(--primary-color-rgb), 0.1);
  }

  50% {
    box-shadow:
      0 0 40px rgba(var(--primary-color-rgb), 0.4),
      0 0 80px rgba(var(--primary-color-rgb), 0.2);
  }
}

/* Flash-inspired page transitions */
.page-transition-enter {
  opacity: 0;
  transform: scale(0.95) rotate(1deg);
  filter: blur(5px);
}

.page-transition-enter-active {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: blur(0);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-transition-exit {
  opacity: 1;
  transform: scale(1) rotate(0deg);
  filter: blur(0);
}

.page-transition-exit-active {
  opacity: 0;
  transform: scale(1.05) rotate(-1deg);
  filter: blur(5px);
  transition: all 0.6s cubic-bezier(0.55, 0.085, 0.68, 0.53);
}

/* Terminal improvements for Flash aesthetic */

/* Accessibility - Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  #cursor-follower,
  #cursor-trail {
    display: none;
  }

  .title-word::before,
  .title-word::after {
    animation: none;
  }

  #loading-screen {
    animation: none;
  }

  html,
  body {
    cursor: default;
  }
}

/* Enhanced animations for mobile */
@media (max-width: 768px) {
  .title-word {
    font-size: 2.5rem;
    letter-spacing: 4px;
  }

  #hero-subtitle {
    font-size: 1rem;
    letter-spacing: 2px;
  }



  /* Reduce parallax effects on mobile for better performance */
  #hero-container {
    transform: translate(-50%, -50%) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .title-word {
    text-shadow:
      0 0 5px var(--primary-color),
      0 0 10px var(--primary-color);
  }

  #cursor-follower {
    border-width: 3px;
  }

  .blocky-btn {
    border-width: 2px;
  }
}