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

:root {
  --bg: #0a0a0a;
  --surface: #141414;
  --border: #262626;
  --text: #fafafa;
  --text-muted: #737373;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --mono: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
}

html {
  color-scheme: dark;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

main {
  text-align: center;
  padding: 2rem;
  max-width: 600px;
  width: 100%;
}

h1 {
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
}

.ip-box {
  font-family: var(--mono);
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  padding: 1.5rem 2rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  user-select: all;
  transition: border-color 0.15s;
}

.ip-box:hover {
  border-color: var(--accent);
}

.ip-box .loading {
  font-size: 1.25rem;
  color: var(--text-muted);
  font-family: inherit;
  font-weight: 400;
}

.copy-btn {
  margin-top: 1.25rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--surface);
  border-color: var(--text-muted);
}

.copy-btn:active {
  transform: scale(0.97);
}

.copy-btn.copied {
  border-color: var(--accent);
  color: var(--accent);
}

.details {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.5rem;
  text-align: left;
  font-size: 0.9rem;
  max-width: 300px;
  margin-inline: auto;
}

.details dt {
  color: var(--text-muted);
}

.details dd {
  font-family: var(--mono);
  font-size: 0.85rem;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  padding: 1.5rem;
  text-align: center;
}

footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.error {
  color: #ef4444;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 400;
}
