/* ── Custom properties ──────────────────────────────────────── */
:root {
  --bg:           #111318;
  --card:         #1C1F26;
  --accent:       #F97316;
  --accent-hover: #FB923C;
  --text:         #F3F4F6;
  --text-muted:   #9CA3AF;
  --text-light:   #6B7280;
  --border:       #2D3139;
  --shadow:       0 1px 3px rgba(0,0,0,0.35), 0 4px 16px rgba(0,0,0,0.25);
  --radius:       16px;
  --radius-sm:    10px;
  --mono:         'JetBrains Mono', 'Fira Code', 'Courier New', monospace;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text);
}

.logo-cat { width: 38px; height: 38px; flex-shrink: 0; }

.logo-name {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ── Main ───────────────────────────────────────────────────── */
main {
  flex: 1;
  padding: 1.75rem 0 3rem;
}

/* ── Hero card ──────────────────────────────────────────────── */
.hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.hero-left { flex: 1; min-width: 0; }

.ip-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.ip-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.ip-text {
  font-family: var(--mono);
  font-size: clamp(1.75rem, 5vw, 2.9rem);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
  word-break: break-all;
}

.ip-text .ip-loading {
  color: var(--text-light);
  animation: pulse 1.4s ease-in-out infinite;
}

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

/* Copy button */
.copy-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, transform 0.1s, border-color 0.15s;
}

.copy-btn:hover:not(:disabled) {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
}

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

.copy-btn:disabled {
  border-color: var(--border);
  color: var(--text-light);
  cursor: not-allowed;
}

.copy-btn .icon { width: 1rem; height: 1rem; }
.copy-btn .hidden { display: none; }

.copy-btn.copied {
  background: #16A34A;
  border-color: #16A34A;
  color: #fff;
}

/* Copy toast */
.copy-toast {
  font-size: 0.75rem;
  font-weight: 500;
  color: #16A34A;
  opacity: 0;
  transition: opacity 0.18s;
  margin-bottom: 0.35rem;
  height: 1.1em;
}

.copy-toast.show { opacity: 1; }

/* Hero meta */
.ip-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  min-height: 1.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Cat frame */
.hero-right { flex-shrink: 0; }

.cat-frame {
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 3px solid var(--border);
  background: var(--bg);
}

.cat-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.35s;
}

/* ── Cards grid ─────────────────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

/* ── Card ───────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
}

.card-title {
  font-size: 0.725rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.card-emoji { font-size: 0.95rem; }

/* Info list */
.info-list { display: flex; flex-direction: column; gap: 0.55rem; }

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.info-row dt {
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.info-row dd {
  font-size: 0.8125rem;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  max-width: 60%;
}

/* UA card */
.ua-card { margin-bottom: 0; }

.ua-string {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
  line-height: 1.75;
}

/* ── Footer ─────────────────────────────────────────────────── */
footer {
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
  background: var(--card);
  margin-top: 1.75rem;
}

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

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .hero-card       { flex-direction: column; align-items: stretch; gap: 1.25rem; padding: 1.5rem; }
  .cat-frame       { width: 100%; height: 180px; border-radius: var(--radius-sm); }
  .cards-grid      { grid-template-columns: 1fr; }
  .card            { padding: 1.25rem; }
  .info-row dd     { max-width: 65%; }
}
