:root {
  --0: #0a0a0a;
  --1: #00FE04;
  --2: #00FE04;
  --3: #00a803;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--0);
  min-height: 100vh;
  font-family: 'Space Mono', monospace;
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.text-container {
  position: absolute;
  text-align: center;
  transition: all 1.5s ease-in-out;
  opacity: 1;
}

.centered {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 5rem;
}

.top-position {
  top: 10vh;
  left: 50%;
  font-size: 2rem;
  transform: translateX(-50%);
}

.typing-text {
  font-weight: 700;
  color: var(--1);
  white-space: nowrap;
  position: relative;
  margin: 0;
  transition: opacity 1.5s ease-in-out;
  opacity: 1;
}

.typing-text::after {
  content: "|";
  color: var(--2);
  animation: b 0.7s infinite;
  margin-left: 5px;
}

@keyframes b {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.glitch {
  animation: g 0.8s linear 3;
}

@keyframes g {
  0% {
    text-shadow: 0 0 var(--1);
  }
  20% {
    text-shadow: -5px 5px #FF00FF;
  }
  40% {
    text-shadow: 5px -5px #00FFFF;
  }
  60% {
    text-shadow: -3px 3px #FF00FF;
  }
  80% {
    text-shadow: 3px -3px #00FFFF;
  }
  100% {
    text-shadow: 0 0 var(--1);
  }
}

.no-cursor::after {
  display: none;
}

.mode-selector {
  position: absolute;
  top: 60vh;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 20px;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 10;
  pointer-events: none;
}

.mode-btn {
  padding: 12px 24px;
  background-color: rgba(0, 168, 3, 0.3);
  border: 1px solid var(--3);
  border-radius: 8px;
  color: var(--1);
  font-family: 'Space Mono', monospace;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1rem;
  outline: none;
  touch-action: manipulation;
  box-sizing: border-box;
}

.mode-btn:hover {
  background-color: rgba(0, 254, 4, 0.4);
}

.mode-btn:active {
  transform: translateY(0);
}

.terminal {
  position: absolute;
  top: 28vh;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  max-width: 800px;
  height: 50vh;
  max-height: 50vh;
  background-color: rgba(10, 10, 10, 0.9);
  border: 1px solid var(--3);
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 254, 4, 0.3);
  overflow: hidden;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  display: flex;
  flex-direction: column;
}

.terminal-header {
  background-color: rgba(0, 168, 3, 0.2);
  padding: 10px 15px;
  border-bottom: 1px solid var(--3);
  display: flex;
  align-items: center;
  position: relative;
  color: var(--1);
  font-size: 0.9rem;
  height: 20px;
}

.terminal-controls {
  position: absolute;
  left: 15px;
  display: flex;
  gap: 10px;
  align-items: center;
  height: 100%;
}

.terminal-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  line-height: 1;
}

.control-btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0;
}

.close {
  background-color: #ff5f56;
}

.minimize {
  background-color: #ffbd2e;
}

.maximize {
  background-color: #27c93f;
}

.terminal-body {
  padding: 15px;
  flex-grow: 1;
  overflow-y: auto;
  color: var(--1);
  font-size: 0.9rem;
  scrollbar-width: thin;
  scrollbar-color: #00FE04 #000000;
  min-height: 0;
}

.terminal-body::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.terminal-body::-webkit-scrollbar-track {
  background: #000000;
}

.terminal-body::-webkit-scrollbar-thumb {
  background-color: #00FE04;
  border-radius: 5px;
  border: 2px solid #000000;
}

.terminal-body::-webkit-scrollbar-thumb:hover {
  background-color: #00a803;
}

.terminal-line {
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt {
  color: var(--3);
  margin-right: 8px;
  flex-shrink: 0;
}

.input-line {
  display: flex;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

#terminal-input {
  background: transparent;
  border: none;
  color: var(--1);
  font-family: 'Space Mono', monospace;
  font-size: 0.9rem;
  outline: none;
  flex-grow: 1;
  caret-color: var(--2);
  color: transparent;
  text-shadow: 0 0 0 var(--1);
  cursor: text;
}

.social-link {
  color: var(--1);
  text-decoration: none;
  border-bottom: 1px dashed var(--3);
  transition: all 0.3s ease;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.social-link:hover {
  color: #fff;
  border-bottom-color: #fff;
}

.matrix-rain {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.1;
  transition: opacity 1.5s ease-out;
}

.scanlines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(0, 254, 4, 0.03) 0%, rgba(0, 254, 4, 0.1) 50%, rgba(0, 254, 4, 0.03) 100%);
  background-size: 100% 4px;
  pointer-events: none;
}

.red-text {
  color: #f00 !important;
  text-shadow: 0 0 10px #f00 !important;
  transition: color 1.5s ease-out, text-shadow 1.5s ease-out;
}

.text-element,
.terminal-header div {
  transition: color 1.5s ease-out, text-shadow 1.5s ease-out !important;
}

.matrix-rain.brighter {
  opacity: 0.35;
}

* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.social-link,
.social-link * {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

#normal-interface {
  font-family: 'Space Mono', monospace;
}

#normal-interface button {
  outline: none;
  transition: all 0.3s ease;
}

#normal-interface button:active {
  transform: scale(0.98);
}

#normal-interface p {
  line-height: 1.6;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .centered {
    font-size: 2.5rem;
  }
  
  .top-position {
    font-size: 1.2rem;
  }
  
  .terminal {
    width: 95%;
    height: 60vh;
  }
  
  .terminal-body {
    font-size: 0.8rem;
  }
  
  .centered {
    font-size: clamp(1.3rem, 5vw, 5rem);
  }
  
  #normal-interface {
    width: 95% !important;
  }
  
  #normal-interface button {
    padding: 8px !important;
    font-size: 0.8rem;
  }
  
  .mode-selector {
    flex-direction: column;
    gap: 10px;
    width: 80%;
  }
  
  .mode-btn {
    width: 100%;
    -webkit-tap-highlight-color: transparent;
  }
}

.hover-image-container {
  position: absolute;
  top: 145px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  height: 400px;
  display: flex;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  z-index: 5;
}

.hover-image {
  max-width: 400px;
  max-height: 500px;
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s ease;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 254, 4, 0.5));
}

@media (max-width: 768px) {
  .hover-image {
    max-width: 320px;
    max-height: 208px;
  }
  
  .hover-image-container {
    top: 70px;
  }
}
