@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700&display=swap");

body,
html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #050505;
  font-family: "Orbitron", monospace;
  color: #20c20e;
  overflow: hidden;
  user-select: none;
}

/* Matrix background */
#matrix {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  opacity: 0.35;
}

/* Hex dump background */
.hex-bg {
  position: absolute;
  right: 0;
  top: 0;
  width: 30%;
  height: 100%;
  overflow: hidden;
  opacity: 0.2;
  font-size: 0.8rem;
  color: #1a6d36;
  word-wrap: break-word;
  z-index: 0;
  text-align: right;
  padding-right: 15px;
  font-family: monospace;
}

/* CRT scanline effect */
.crt-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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% 4px,
    6px 100%;
  z-index: 10;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.95);
}

/* HUD telemetry panel */
.hud {
  position: absolute;
  top: 25px;
  left: 25px;
  z-index: 5;
  font-size: 0.9rem;
  color: #20c20e;
  text-shadow: 0 0 5px #20c20e;
  line-height: 1.6;
  opacity: 0.9;
  display: flex;
  flex-direction: column;
  gap: 5px;
  border-left: 2px solid #20c20e;
  padding-left: 10px;
}

.hud span {
  color: #fff;
}

.blink-red {
  color: #ff3333 !important;
  text-shadow: 0 0 10px red !important;
  animation: blinkWarning 1s infinite;
  font-weight: bold;
}

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

/* Main modal */
.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 750px;
  background: rgba(0, 15, 10, 0.75);
  border: 1px solid #1a6d36;
  box-shadow:
    0 0 40px rgba(32, 194, 14, 0.15),
    inset 0 0 25px #000;
  backdrop-filter: blur(12px);
  border-radius: 6px;
  z-index: 5;
  padding: 4px;
}

.modal-inner {
  border: 1px dashed #1a6d36;
  padding: 35px;
  border-radius: 4px;
  position: relative;
}

/* Scanner bar */
.scan-bar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: rgba(32, 194, 14, 0.4);
  box-shadow: 0 0 15px #20c20e;
  animation: scanner 3s infinite linear;
  z-index: 100;
  pointer-events: none;
}

@keyframes scanner {
  0% {
    top: 0%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100%;
    opacity: 0;
  }
}

.header-title {
  font-size: 1.6rem;
  text-align: center;
  letter-spacing: 3px;
  margin-bottom: 25px;
  text-transform: uppercase;
  text-shadow:
    0 0 10px #20c20e,
    0 0 20px #20c20e;
  border-bottom: 2px solid #1a6d36;
  padding-bottom: 15px;
  font-weight: bold;
}

/* Progress bar */
.status-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 1.25rem;
  text-shadow: 0 0 5px #20c20e;
  font-weight: bold;
}

.bar-container {
  width: 100%;
  height: 22px;
  background: #020a05;
  border: 1px solid #20c20e;
  position: relative;
  margin-bottom: 25px;
  box-shadow: 0 0 15px rgba(32, 194, 14, 0.3);
  border-radius: 2px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0%;
  background: #20c20e;
  box-shadow: 0 0 20px #20c20e;
  position: relative;
  transition: width 0.1s;
}

.bar-fill::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 15px,
    rgba(0, 0, 0, 0.4) 15px,
    rgba(0, 0, 0, 0.4) 30px
  );
}

/* Terminal log */
.terminal {
  height: 280px;
  overflow-y: hidden;
  font-size: 1.1rem;
  line-height: 1.9;
  position: relative;
  padding-right: 10px;
}

.term-line {
  display: flex;
  align-items: flex-start;
  margin-bottom: 5px;
}

.prefix {
  color: #555;
  margin-right: 15px;
  min-width: 125px;
  font-size: 0.95rem;
  padding-top: 2px;
}

.message {
  color: #20c20e;
  flex-grow: 1;
  word-wrap: break-word;
}

.message.hl {
  color: #fff;
  text-shadow:
    0 0 10px #2cfb14,
    0 0 20px #2cfb14;
  font-weight: bold;
  font-size: 1.15rem;
}

/* Success overlay */
.success-overlay {
  display: none;
  position: relative;
  width: 100%;
  background: transparent;
  z-index: 200;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  animation: fadeInGlass 0.6s ease-out;
}

@keyframes fadeInGlass {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.shield-icon {
  font-size: 4.5rem;
  margin-bottom: 25px;
  filter: drop-shadow(0 0 20px #20c20e);
  animation: float 2s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-15px);
  }
}

.success-text {
  font-size: 1.7rem;
  color: #fff;
  text-shadow:
    0 0 10px #20c20e,
    0 0 30px #2cfb14,
    0 0 50px #2cfb14;
  letter-spacing: 2px;
  margin-bottom: 30px;
  font-weight: bold;
  text-transform: uppercase;
}

.success-features {
  text-align: left;
  margin-top: 25px;
  font-size: 1.1rem;
  line-height: 2;
  color: #fff;
  text-shadow: 0 0 10px #20c20e;
  background: rgba(0, 15, 10, 0.85);
  padding: 20px 25px;
  border: 1px dashed #20c20e;
  border-radius: 4px;
  box-shadow:
    0 0 20px rgba(32, 194, 14, 0.4),
    inset 0 0 20px rgba(0, 0, 0, 0.8);
  font-family: inherit;
}

.btn-hack {
  background: rgba(32, 194, 14, 0.1);
  color: #20c20e;
  border: 2px solid #20c20e;
  padding: 15px 40px;
  font-size: 1.3rem;
  font-family: inherit;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 2px;
  transition: 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 15px rgba(32, 194, 14, 0.3);
  border-radius: 4px;
  font-weight: bold;
}

.btn-hack:hover {
  background: #20c20e;
  color: #000;
  box-shadow:
    0 0 30px #2cfb14,
    0 0 60px #2cfb14;
  text-shadow: none;
  transform: scale(1.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hud,
  .hex-bg {
    display: none !important;
  }
  .modal {
    width: 95%;
    padding: 2px;
  }
  .modal-inner {
    padding: 20px 15px;
  }
  .header-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
  }
  .status-row {
    font-size: 0.95rem;
    margin-bottom: 8px;
  }
  .bar-container {
    height: 16px;
    margin-bottom: 15px;
  }
  .terminal {
    height: 260px;
    font-size: 0.85rem;
    line-height: 1.6;
  }
  .prefix {
    min-width: 85px;
    font-size: 0.75rem;
    margin-right: 8px;
  }
  .message.hl {
    font-size: 0.9rem;
  }
  .shield-icon {
    font-size: 2.2rem;
    margin-bottom: 5px;
  }
  .success-text {
    font-size: 1.15rem;
    letter-spacing: 0px;
    margin-bottom: 15px;
    line-height: 1.3;
  }
  .btn-hack {
    padding: 12px 10px;
    font-size: 0.95rem;
    width: 100%;
    margin: 0 auto 15px auto;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    line-height: normal;
  }
  .success-features {
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 12px;
    margin-bottom: 5px;
    text-align: left;
    width: 95%;
  }
  .success-features div {
    padding-bottom: 6px;
  }
}
