:root {
  --bg: #02060a;
  --grid: rgba(0, 255, 100, 0.07);
  --text-main: #e5fff1;
  --text-soft: #64ffb1;
  --accent: #00ffa6;
  --accent-strong: #ff4444;
  --warning: #ffcc00;
  --terminal-bg: rgba(0, 10, 5, 0.92);
  --border-soft: rgba(0, 255, 160, 0.35);
  --shadow-strong: 0 0 60px rgba(0, 255, 160, 0.4);
  --font-mono: "IBM Plex Mono", "JetBrains Mono", "Fira Code", Consolas, Menlo,
    monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-mono);
  background: radial-gradient(circle at top, #021b10 0%, #000000 65%, #02060a 100%);
  color: var(--text-main);
  overflow: hidden;
}

body.loading {
  overflow: hidden;
}

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at center, #000000 0%, #02060a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.loader__orb {
  width: 60px;
  height: 60px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #00ffa6 30%, #003320 75%);
  box-shadow: 0 0 40px rgba(0, 255, 160, 0.9);
  position: relative;
  overflow: hidden;
  animation: loader-orb-pulse 2s ease-in-out infinite;
}

.loader__orb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 220deg,
    rgba(0, 255, 160, 0.9),
    transparent,
    transparent,
    rgba(0, 255, 160, 0.6),
    rgba(0, 255, 160, 1)
  );
  mix-blend-mode: screen;
  opacity: 0.7;
  animation: orb 3s linear infinite;
}

@keyframes loader-orb-pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 40px rgba(0, 255, 160, 0.9);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 60px rgba(0, 255, 160, 1);
  }
}

.loader__text {
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  text-shadow: 0 0 20px rgba(0, 255, 160, 0.8);
  animation: loader-text-flicker 2s ease-in-out infinite;
}

@keyframes loader-text-flicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

.loader__progress {
  width: 200px;
  height: 2px;
  background: rgba(0, 255, 160, 0.2);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.loader__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--accent), #00ffcc);
  box-shadow: 0 0 10px rgba(0, 255, 160, 0.8);
  animation: loader-progress 1.5s ease-out forwards;
}

@keyframes loader-progress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

#matrix {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.scanline {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0px,
    rgba(0, 0, 0, 0.35) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: -1;
  animation: scan 8s linear infinite;
}

.vignette {
  position: fixed;
  inset: 0;
  box-shadow: inset 0 0 160px #000;
  pointer-events: none;
  z-index: -1;
}

@keyframes scan {
  0% {
    transform: translateY(-10%);
  }
  50% {
    transform: translateY(10%);
  }
  100% {
    transform: translateY(-10%);
  }
}

.shell {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 32px auto;
  padding: 24px 28px 20px;
  border-radius: 18px;
  background: radial-gradient(circle at top left, rgba(0, 255, 160, 0.12), transparent 55%),
    radial-gradient(circle at bottom right, rgba(0, 80, 40, 0.65), rgba(0, 0, 0, 0.94));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(
      to right,
      transparent 0,
      transparent 31px,
      var(--grid) 32px
    ),
    linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      var(--grid) 32px
    );
  background-size: 32px 32px;
  opacity: 0.7;
  mix-blend-mode: soft-light;
  pointer-events: none;
  border-radius: 18px;
}

.shell__header,
.shell__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}

.shell__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.18em;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-soft);
}

.shell__logo-orb {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 20%, #ffffff 0, #00ffa6 30%, #003320 75%);
  box-shadow: 0 0 24px rgba(0, 255, 160, 0.8);
  position: relative;
  overflow: hidden;
}

.shell__logo-orb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: conic-gradient(
    from 220deg,
    rgba(0, 255, 160, 0.8),
    transparent,
    transparent,
    rgba(0, 255, 160, 0.5),
    rgba(0, 255, 160, 0.9)
  );
  mix-blend-mode: screen;
  opacity: 0.6;
  animation: orb 9s linear infinite;
}

@keyframes orb {
  to {
    transform: rotate(360deg);
  }
}

.shell__status {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(0, 255, 160, 0.9);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0.15;
  }
}

.shell__body {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.1fr);
  gap: 26px;
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.shell__left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.shell__eyebrow {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warning);
}

.shell__title {
  margin: 0;
  font-size: clamp(32px, 4vw, 40px);
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.shell__title-glitch {
  position: relative;
  display: inline-block;
  color: var(--accent);
  text-shadow: 0 0 24px rgba(0, 255, 160, 0.9);
}

.shell__title-glitch::before,
.shell__title-glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 50% 0);
}

.shell__title-glitch::before {
  color: rgba(0, 255, 255, 0.8);
  transform: translate(-2px, -1px);
  mix-blend-mode: screen;
}

.shell__title-glitch::after {
  color: rgba(255, 0, 128, 0.5);
  transform: translate(2px, 1px);
  mix-blend-mode: screen;
}

.shell__cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: radial-gradient(circle at top, #1cff9a 0, #004824 60%, #00140a 100%);
  color: #02110a;
  padding: 10px 20px;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 11px;
  font-family: var(--font-mono);
  box-shadow: 0 0 30px rgba(0, 255, 160, 0.5);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.7) 20%,
    rgba(255, 255, 255, 0) 40%
  );
  transform: translateX(-100%);
  opacity: 0.8;
}

.btn:hover::before {
  animation: shine 1.2s ease-out;
}

@keyframes shine {
  to {
    transform: translateX(150%);
  }
}

.btn__label {
  font-weight: 600;
}

.btn__sub {
  font-size: 9px;
  opacity: 0.9;
}

.shell__hint {
  font-size: 11px;
  color: var(--text-soft);
}

.shell__hint span {
  color: var(--accent);
}

.shell__countdown {
  margin-top: 10px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.shell__countdown-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.shell__countdown-time {
  font-size: 20px;
  letter-spacing: 0.18em;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(1, 18, 9, 0.8);
  box-shadow: inset 0 0 0 1px rgba(0, 255, 160, 0.15);
}

.shell__right {
  position: relative;
}

.terminal {
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--terminal-bg);
  border: 1px solid rgba(0, 255, 160, 0.5);
  box-shadow: 0 0 40px rgba(0, 255, 160, 0.35);
  display: flex;
  flex-direction: column;
}

.terminal__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: linear-gradient(to right, #050c09, #04140d);
  border-bottom: 1px solid rgba(0, 255, 160, 0.3);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.dot--red {
  background: #ff4b4b;
}

.dot--yellow {
  background: #ffc857;
}

.dot--green {
  background: #2ed573;
}

.terminal__title {
  margin-left: 6px;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
}

.terminal__body {
  flex: 1;
  padding: 12px 16px 16px;
  font-size: 12px;
  color: var(--text-main);
  overflow: hidden;
}

.terminal__line {
  line-height: 1.4;
  white-space: pre;
}

.terminal__line--muted {
  color: rgba(160, 255, 210, 0.7);
}

.terminal__line--accent {
  color: var(--accent);
}

.terminal__line--warning {
  color: var(--warning);
}

.terminal__line--tag {
  color: var(--accent-strong);
  text-transform: uppercase;
}

.terminal__link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  margin: 4px 0;
  border-radius: 6px;
  background: rgba(0, 255, 160, 0.05);
  border: 1px solid rgba(0, 255, 160, 0.15);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.terminal__link-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.terminal__link-item:hover {
  background: rgba(0, 255, 160, 0.12);
  border-color: rgba(0, 255, 160, 0.4);
  box-shadow: 0 0 20px rgba(0, 255, 160, 0.3);
  transform: translateX(4px);
}

.terminal__link-item:hover::before {
  transform: scaleY(1);
}

.terminal__link-item:hover .terminal__link-arrow {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(0, 255, 160, 0.9);
  transform: translateX(4px);
}

.terminal__link-prefix {
  font-size: 10px;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.terminal__link-label {
  font-size: 11px;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  min-width: 80px;
}

.terminal__link-url {
  flex: 1;
  font-size: 11px;
  color: var(--text-soft);
  font-family: var(--font-mono);
  opacity: 0.8;
}

.terminal__link-arrow {
  font-size: 12px;
  color: rgba(0, 255, 160, 0.5);
  transition: all 0.3s ease;
  font-weight: 600;
}

.terminal__cursor {
  display: flex;
  gap: 4px;
}

.terminal__cursor-symbol {
  animation: cursor-blink 1s steps(1) infinite;
}

@keyframes cursor-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.shell__footer {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(150, 255, 210, 0.7);
}

.shell__meta {
  display: flex;
  gap: 16px;
}

.shell__meta--right {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }

  .shell {
    margin: 16px;
    padding: 18px 16px;
  }

  .shell__body {
    grid-template-columns: minmax(0, 1fr);
  }

  .shell__right {
    order: -1;
  }
}

@media (max-width: 600px) {
  .shell__header,
  .shell__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .shell__meta--right {
    align-self: stretch;
    justify-content: space-between;
  }
}
