@import url('https://www.nerdfonts.com/assets/css/webfont.css');

:root {
  --bg: #0d0d1a;
  --box: #26263a;
  --text: #ff4f87;
  --label: #aaa;
  --highlight: #6de1ff;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Hack Nerd Font', 'Fira Code', monospace;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
  background: linear-gradient(to bottom, var(--bg), #1a1a2e);
  color: var(--text);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.ip-box {
  padding: 2rem 3rem;
  border-radius: 16px;
  background-color: var(--box);
  font-size: 1.8rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.label {
  font-size: 1rem;
  margin-top: 0.5rem;
  color: var(--label);
}

.type {
  margin-top: 0.5rem;
  font-size: 1rem;
  color: var(--highlight);
}

.ip-display {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.ip-segment {
  background: rgba(255, 255, 255, 0.08);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  min-width: 30px;
  text-align: center;
}

.separator {
  font-weight: bold;
}

.buttons {
  margin-top: 1rem;
}

button.copy-btn {
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px;
  background-color: #ff4f87;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

button.copy-btn:hover {
  transform: scale(1.05);
  background-color: #ff6f9f;
}

footer {
  position: absolute;
  bottom: 20px;
  font-size: 0.7rem;
  opacity: 0.5;
}

/* 🔁 Responsive tweaks for smaller screens */
@media (max-width: 600px) {
  .ip-box {
    padding: 1.5rem 1.2rem;
    font-size: 1.3rem;
    width: 90%;
  }

  .ip-display {
    gap: 4px;
    margin: 0.75rem 0;
  }

  .ip-segment {
    padding: 0.4rem 0.6rem;
    font-size: 1rem;
    min-width: auto;
  }

  .buttons {
    margin-top: 0.8rem;
  }

  button.copy-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  footer {
    font-size: 0.75rem;
    bottom: 10px;
  }
}

.copy-wrapper {
  position: relative;
  display: inline-block;
}

.copy-confirm {
  position: absolute;
  right: -1.5rem;
  top: 50%;
  transform: translateY(-50%) scale(0.9);
  font-size: 1.1rem;
  color: #6de1ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.copy-confirm.show {
  opacity: 1;
  animation: appear 1.2s ease;
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0.8);
  }
  20% {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scale(0.9);
  }
}

.toggle-advanced-btn, .api-btn {
  margin-top: 1rem;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  border: none;
  border-radius: 6px;
  background-color: #6de1ff;
  color: #000;
  cursor: pointer;
  opacity: 0.8;
  transition: background 0.2s, transform 0.2s;
}

.toggle-advanced-btn:hover {
  opacity: 1;
  transform: scale(1.05);
}


.advanced-info {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  margin-top: 1rem;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

.advanced-info.show {
  max-height: 200px;
  opacity: 1;
}
