* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #05060a;
  color: #e8ecf4;
  font: 15px/1.6 Inter, system-ui, sans-serif;
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 100vh;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.wrap {
  position: relative;
  text-align: center;
  padding: 0 24px;
  max-width: 720px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.matrix {
  display: flex;
  justify-content: center;
  color: #7c6cff;
}

.dot-matrix {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: none;
}

.dot-matrix__row {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dot-matrix__dot {
  display: block;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}

.dot-matrix--bloom {
  filter: drop-shadow(0 0 6px #7c6cff88);
}

h1 {
  font-size: 14px;
  font-weight: 500;
  margin: 0;
  letter-spacing: 0.1px;
  white-space: nowrap;
  color: #dfe4ee;
}

h1 #host {
  color: #8b5cf6;
  font-family: 'Pixelify Sans', monospace;
  font-size: 16px;
  -webkit-font-smoothing: none;
}

.sub {
  margin: 8px 0 0;
  color: #6b7385;
  font-size: 12px;
}

.state {
  margin: 14px 0 0;
  font-size: 12px;
  letter-spacing: 0.2px;
  color: #7d8699;
  transition: color 0.25s;
}

.state.verifying {
  color: #a48bff;
}

.state.success {
  color: #7ee787;
}

.state.error {
  color: #ff7b72;
}

.cf-box {
  display: block;
  width: 100%;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 16px;
  line-height: 0;
  min-height: 65px;
  background: linear-gradient(100deg, #161a26 40%, #202636 50%, #161a26 60%);
  background-size: 200% 100%;
  animation: cf-shimmer 1.4s linear infinite;
  transition: background 0.3s, border-color 0.3s;
}

.cf-box > div {
  display: block;
  line-height: 0;
}

.cf-box iframe {
  display: inline-block;
  margin: 0 !important;
  vertical-align: top;
}

.cf-box.loaded {
  background: #fff;
  border-color: rgba(255, 255, 255, 0.12);
  min-height: 0;
  animation: none;
}

@keyframes cf-shimmer {
  to {
    background-position: -200% 0;
  }
}

#cf {
  max-width: 300px;
  margin: 20px auto 0;
}

.meta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  font-size: 12px;
  color: #6b7385;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.meta__row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #5f6779;
  letter-spacing: 0.2px;
}

.brand b {
  font-family: 'Pixelify Sans', monospace;
  font-weight: 500;
  font-size: 13px;
  color: #9d7dff;
  letter-spacing: 0.4px;
}

.brand__bolt {
  width: 16px;
  height: 16px;
  flex: none;
  color: #a78bfa;
  filter: drop-shadow(0 0 5px rgba(139, 92, 246, 0.65));
  animation: vp-flicker 3.4s steps(1) infinite;
}

@keyframes vp-flicker {
  0%, 100% { opacity: 1; }
  38% { opacity: 1; }
  40% { opacity: 0.62; }
  41% { opacity: 1; }
  67% { opacity: 1; }
  69% { opacity: 0.74; }
  71% { opacity: 1; }
}

.meta b {
  color: #aab3c5;
  font-weight: 500;
  font-family: ui-monospace, monospace;
}

.meta i {
  font-style: normal;
  opacity: 0.4;
}

#ip {
  filter: blur(5px);
  cursor: pointer;
  transition: filter 0.25s;
  user-select: none;
}

#ip:hover {
  filter: none;
  user-select: text;
}

@media (max-width: 640px) {
  h1 {
    white-space: normal;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot-matrix__dot {
    opacity: 0.7 !important;
  }

  .brand__bolt {
    animation: none;
  }
}
