* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #020a0f;
  font-family: 'Fira Code', 'JetBrains Mono', 'Courier New', monospace;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  color: #b8f2e2;
}

/* matrix-style grid overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 255, 170, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 170, 0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 40%, rgba(0, 210, 150, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* main panel */
.container {
  position: relative;
  z-index: 2;
  max-width: 580px;
  width: 90%;
  margin: 2rem auto;
  padding: 2.5rem 2rem;
  background: rgba(5, 15, 20, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 255, 170, 0.4);
  box-shadow: 0 0 40px rgba(0, 210, 150, 0.1), inset 0 1px 0 rgba(100, 255, 180, 0.08);
  transition: all 0.2s ease;
}

/* header style */
.matrix-glow {
  font-size: 2.4rem;
  font-weight: 450;
  letter-spacing: -0.5px;
  color: #b4ffe0;
  text-shadow: 0 0 6px #0fa, 0 0 1px #0f6;
  border-left: 3px solid #2effb0;
  padding-left: 1.2rem;
  margin-bottom: 1rem;
  text-align: left;
}

.matrix-glow span {
  font-size: 0.9rem;
  font-weight: 300;
  color: #7effc0;
  letter-spacing: 1px;
}

.tagline {
  text-align: left;
  font-size: 0.85rem;
  margin-top: -0.2rem;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
  color: #8fdbc0;
  border-left: 2px dotted rgba(0, 255, 170, 0.5);
}

/* description */
.description {
  margin: 1.8rem 0 2rem 0;
  font-size: 0.9rem;
  font-weight: 350;
  color: #bfdfef;
  line-height: 1.6;
}

.description p {
  margin-bottom: 0.9rem;
}

.highlight {
  color: #2effc0;
  border-bottom: 1px dotted rgba(46, 255, 192, 0.4);
}

/* link cards */
.link-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1.8rem;
}

.card-link {
  flex: 1 1 160px;
  background: rgba(10, 24, 32, 0.65);
  border: 1px solid rgba(0, 210, 200, 0.35);
  padding: 0.85rem 0.6rem;
  text-align: center;
  text-decoration: none;
  color: #cef5ea;
  font-weight: 450;
  font-size: 0.85rem;
  transition: all 0.2s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  backdrop-filter: blur(4px);
  letter-spacing: 0.5px;
  font-family: monospace;
}

.card-link:hover {
  border-color: #2effb0;
  background: rgba(0, 255, 200, 0.08);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(46, 255, 176, 0.2);
  transform: translateY(-2px);
}

/* IP display block */
.ip-display {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  background: rgba(0, 20, 18, 0.6);
  border: 1.5px solid #2effb0;
  padding: 0.9rem 1.5rem;
  margin: 1rem 0 0.5rem;
  backdrop-filter: blur(4px);
  transition: 0.2s;
}

.ip-label {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8ef0d0;
  font-weight: 400;
}

.ip-value {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: #2effb0;
  text-shadow: 0 0 6px rgba(46, 255, 176, 0.5);
  font-family: monospace;
  word-break: break-all;
  cursor: pointer;
}

.ip-badge {
  font-size: 0.65rem;
  background: rgba(0, 255, 200, 0.12);
  padding: 0.2rem 0.6rem;
  border-left: 2px solid #2effb0;
}

.ip-loading {
  color: #5a9e8a;
  text-shadow: none;
  animation: pulse 1.2s ease-in-out infinite;
}

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

/* status bar */
.matrix-status {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(46, 255, 176, 0.25);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.7rem;
  color: #6bae96;
}

.status-item {
  font-family: monospace;
  background: rgba(0, 30, 25, 0.4);
  padding: 0.25rem 0.7rem;
  letter-spacing: 0.5px;
}

.blink-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #2effb0;
  margin-right: 6px;
  animation: pulseGreen 1.2s infinite;
}

@keyframes pulseGreen {
  0%, 100% { opacity: 1; background-color: #2effb0; }
  50% { opacity: 0.4; background-color: #8fddb0; }
}

.cursor-blink {
  display: inline-block;
  width: 8px;
  height: 1rem;
  background-color: #2effb0;
  vertical-align: middle;
  margin-left: 6px;
  animation: blink 1s step-end infinite;
}

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

/* scan overlay */
.scan-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(0deg, rgba(0, 255, 150, 0.015) 0px, rgba(0, 255, 150, 0.015) 2px, transparent 2px, transparent 8px);
  pointer-events: none;
  z-index: 1;
}

/* back link */
.back-link {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 10;
  font-size: 0.7rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0.8rem;
  border-left: 2px solid #2effb0;
  text-decoration: none;
  color: #8fe0c0;
  font-family: monospace;
  transition: 0.2s;
}

.back-link:hover {
  color: #d0ffee;
  border-left-color: #b0ffd0;
  background: rgba(0, 30, 20, 0.7);
}

/* responsive */
@media (max-width: 550px) {
  .container {
    padding: 1.5rem;
  }
  .matrix-glow {
    font-size: 1.8rem;
    padding-left: 0.8rem;
  }
  .matrix-glow span {
    font-size: 0.7rem;
  }
  .ip-value {
    font-size: 0.9rem;
  }
  .ip-display {
    padding: 0.7rem 1rem;
  }
  .card-link {
    flex-basis: 140px;
    font-size: 0.75rem;
  }
}
