/* =========================================================
   VERITRANS CTF — GUEST ACCESS GATEWAY
   Login хийгээгүй homepage
========================================================= */

/* Navbar/footer-ийг page ачаалах үеэс шууд нуух */
html.kctf-guest-lock nav.navbar,
html.kctf-guest-lock footer,
body.kctf-guest-home nav.navbar,
body.kctf-guest-home footer {
  display: none !important;
}

html.kctf-guest-lock,
body.kctf-guest-home {
  min-height: 100%;
  background: #000402 !important;
}

body.kctf-guest-home {
  overflow-x: hidden;
  color: #eafff0 !important;

  background:
    radial-gradient(
      circle at 18% 20%,
      rgba(22, 140, 255, 0.14),
      transparent 30%
    ),
    radial-gradient(
      circle at 82% 78%,
      rgba(0, 225, 255, 0.07),
      transparent 32%
    ),
    linear-gradient(
      135deg,
      #000201 0%,
      #031109 48%,
      #000503 100%
    ) !important;
}

/* Binary background */
body.kctf-guest-home::before {
  content:
    "010101 110010 001101 010010 111000 010101 100011 011010 "
    "010101 110100 001010 101010 010011 110001 001101 010101 "
    "101100 001011 010101 111000 010101 001101 101010 010101 "
    "110010 001101 010010 111000 010101 100011 011010 010101 "
    "110100 001010 101010 010011 110001 001101 010101 101100 "
    "001011 010101 111000 010101 001101 101010 010101 110010";

  position: fixed;
  inset: -15%;
  z-index: -3;
  pointer-events: none;

  color: rgba(22, 140, 255, 0.048);

  font-family:
    "Share Tech Mono",
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: clamp(22px, 2.2vw, 42px);
  line-height: 1.9;
  letter-spacing: 0.17em;
  word-spacing: 0.7em;

  transform: rotate(-6deg) scale(1.18);
  overflow: hidden;
}

body.kctf-guest-home::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;

  background:
    linear-gradient(
      rgba(22, 140, 255, 0.027) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(22, 140, 255, 0.027) 1px,
      transparent 1px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 4px,
      rgba(22, 140, 255, 0.025) 5px
    );

  background-size:
    44px 44px,
    44px 44px,
    auto;
}

body.kctf-guest-home main {
  width: 100% !important;
  max-width: none !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Page */
.kctf-guest-gateway {
  width: 100%;
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(22px, 3vw, 46px);
}

.kctf-guest-frame {
  width: min(1750px, 94vw);
  min-height: min(860px, 88vh);

  padding: 1px;
  position: relative;

  clip-path: polygon(
    30px 0,
    calc(100% - 30px) 0,
    100% 30px,
    100% calc(100% - 30px),
    calc(100% - 30px) 100%,
    30px 100%,
    0 calc(100% - 30px),
    0 30px
  );

  background:
    linear-gradient(
      135deg,
      rgba(22, 140, 255, 0.85),
      rgba(22, 140, 255, 0.14) 35%,
      rgba(0, 225, 255, 0.17) 68%,
      rgba(22, 140, 255, 0.75)
    );

  box-shadow:
    0 0 100px rgba(22, 140, 255, 0.14),
    0 55px 160px rgba(0, 0, 0, 0.68);
}

.kctf-guest-inner {
  min-height: min(860px, 88vh);

  position: relative;
  overflow: hidden;

  display: grid;
  grid-template-columns:
    minmax(480px, 1.05fr)
    minmax(440px, 0.95fr);

  gap: clamp(2rem, 5vw, 6rem);
  align-items: center;

  padding: clamp(2.6rem, 5vw, 6rem);

  clip-path: polygon(
    30px 0,
    calc(100% - 30px) 0,
    100% 30px,
    100% calc(100% - 30px),
    calc(100% - 30px) 100%,
    30px 100%,
    0 calc(100% - 30px),
    0 30px
  );

  background:
    radial-gradient(
      circle at 78% 22%,
      rgba(22, 140, 255, 0.13),
      transparent 32%
    ),
    radial-gradient(
      circle at 12% 88%,
      rgba(0, 225, 255, 0.07),
      transparent 34%
    ),
    linear-gradient(
      135deg,
      rgba(0, 5, 3, 0.99),
      rgba(3, 16, 9, 0.98)
    );
}

.kctf-guest-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image:
    linear-gradient(
      rgba(22, 140, 255, 0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(22, 140, 255, 0.035) 1px,
      transparent 1px
    );

  background-size: 38px 38px;
  mask-image:
    radial-gradient(circle at center, black, transparent 88%);
}

.kctf-guest-copy,
.kctf-guest-terminal {
  position: relative;
  z-index: 2;
}

.kctf-guest-badge {
  width: fit-content;

  display: inline-flex;
  align-items: center;
  gap: 0.6rem;

  margin-bottom: 1.25rem;
  padding: 0.55rem 0.95rem;

  color: #168cff;
  background: rgba(22, 140, 255, 0.065);
  border: 1px solid rgba(22, 140, 255, 0.32);
  border-radius: 999px;

  font-family:
    "Share Tech Mono",
    ui-monospace,
    monospace;

  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.kctf-guest-dot {
  width: 9px;
  height: 9px;

  border-radius: 50%;
  background: #168cff;

  box-shadow:
    0 0 0 5px rgba(22, 140, 255, 0.08),
    0 0 20px rgba(22, 140, 255, 0.95);

  animation: kctfGuestPulse 1.6s ease-in-out infinite;
}

.kctf-guest-title {
  margin: 0;
  color: #ffffff !important;

  font-size: clamp(4rem, 6.4vw, 9rem);
  line-height: 0.96;
  font-weight: 950;
  letter-spacing: -0.08em;

  overflow: visible;
}

.kctf-guest-title span {
  display: block;
  padding-bottom: 0.1em;
  line-height: 0.96;
  overflow: visible;

  color: transparent;

  background:
    linear-gradient(
      110deg,
      #168cff,
      #00ffd0 50%,
      #00ddff
    );

  -webkit-background-clip: text;
  background-clip: text;
}

.kctf-guest-description {
  max-width: 720px;

  margin: 1.5rem 0 2rem;

  color: #91b09b !important;

  font-size: clamp(1rem, 1.15vw, 1.22rem);
  line-height: 1.75;
}

.kctf-guest-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.kctf-guest-button {
  min-width: 160px;
  min-height: 54px;

  padding: 0.85rem 1.4rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 8px;

  font-family:
    "Share Tech Mono",
    ui-monospace,
    monospace;

  font-size: 0.95rem;
  font-weight: 950;
  letter-spacing: 0.04em;

  transition: 0.2s ease;
}

.kctf-guest-button.login {
  color: #001307 !important;

  background:
    linear-gradient(
      135deg,
      #168cff,
      #8affb0
    );

  border: 1px solid rgba(22, 140, 255, 0.9);

  box-shadow:
    0 0 30px rgba(22, 140, 255, 0.3);
}

.kctf-guest-button.register {
  color: #eafff0 !important;

  background: rgba(22, 140, 255, 0.045);
  border: 1px solid rgba(22, 140, 255, 0.35);
}

.kctf-guest-button:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
}

/* Terminal */
.kctf-guest-terminal {
  border: 1px solid rgba(22, 140, 255, 0.35);
  border-radius: 20px;

  background:
    linear-gradient(
      135deg,
      rgba(22, 140, 255, 0.05),
      rgba(0, 0, 0, 0.28)
    ),
    rgba(0, 8, 4, 0.88);

  box-shadow:
    0 0 70px rgba(22, 140, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.03);

  overflow: hidden;
}

.kctf-guest-terminal-top {
  min-height: 52px;

  padding: 0.9rem 1.1rem;

  display: flex;
  align-items: center;
  gap: 0.45rem;

  border-bottom: 1px solid rgba(22, 140, 255, 0.17);
  background: rgba(255, 255, 255, 0.025);
}

.kctf-guest-light {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}

.kctf-guest-light.red {
  background: #ff5f56;
}

.kctf-guest-light.yellow {
  background: #ffbd2e;
}

.kctf-guest-light.green {
  background: #27c93f;
}

.kctf-guest-terminal-name {
  margin-left: 0.5rem;

  color: #789883;

  font-family:
    "Share Tech Mono",
    ui-monospace,
    monospace;

  font-size: 0.82rem;
}

.kctf-guest-terminal-body {
  min-height: 500px;

  padding: clamp(1.6rem, 3vw, 2.8rem);

  display: flex;
  flex-direction: column;
  justify-content: center;

  font-family:
    "Share Tech Mono",
    ui-monospace,
    monospace;
}

.kctf-guest-terminal-heading {
  margin-bottom: 1.5rem;

  color: #ffffff !important;

  font-size: clamp(2.2rem, 3.3vw, 4.2rem);
  line-height: 1;
  font-weight: 950;
}

.kctf-guest-line {
  color: #c9e8d2;
  font-size: 1rem;
  line-height: 2;
}

.kctf-guest-line .prompt {
  color: #168cff;
}

.kctf-guest-line .success {
  color: #00eaff;
}

.kctf-guest-line .danger {
  color: #ff7189;
}

.kctf-guest-lock-box {
  margin-top: 1.7rem;
  padding: 1.2rem;

  border: 1px solid rgba(22, 140, 255, 0.2);
  border-radius: 14px;

  background: rgba(22, 140, 255, 0.035);
}

.kctf-guest-lock-title {
  margin-bottom: 0.45rem;

  color: #168cff;

  font-size: 1rem;
  font-weight: 950;
}

.kctf-guest-lock-text {
  margin: 0;

  color: #8eac97 !important;

  font-size: 0.9rem;
  line-height: 1.6;
}

@keyframes kctfGuestPulse {
  0%,
  100% {
    transform: scale(0.82);
    opacity: 0.6;
  }

  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@media (max-width: 1050px) {
  .kctf-guest-inner {
    grid-template-columns: 1fr;
  }

  .kctf-guest-title {
    font-size: clamp(3.6rem, 10vw, 6rem);
  }
}

@media (max-width: 700px) {
  .kctf-guest-gateway {
    padding: 12px;
  }

  .kctf-guest-frame,
  .kctf-guest-inner {
    clip-path: none;
    border-radius: 24px;
  }

  .kctf-guest-inner {
    padding: 2rem;
  }

  .kctf-guest-title {
    font-size: 3.5rem;
  }

  .kctf-guest-terminal-body {
    min-height: auto;
  }

  .kctf-guest-actions {
    display: grid;
  }
}