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

:root {
  --red:    #cc0000;
  --dark:   #0d1b2a;
  --mid:    #1b2d40;
  --card:   rgba(15, 30, 50, 0.88);
  --accent: #e94560;
  --text:   #eaeaea;
  --muted:  #8da8c0;
  --green:  #4caf50;
  --radius: 10px;
}

/* ── Pokemon background ───────────────────────────────────── */
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* Pokemon background image */
  background-color: #0d1b2a;
  background-image: url("pokemon-bg.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

/* ── Header ───────────────────────────────────────────────── */
header {
  background: rgba(180, 0, 0, 0.92);
  backdrop-filter: blur(6px);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 12px rgba(0,0,0,.6);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  flex-shrink: 0;
}

header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: #fff;
}

.version {
  font-size: .75rem;
  font-weight: 400;
  opacity: .75;
  margin-left: 6px;
}

nav a {
  color: #fff;
  text-decoration: none;
  margin-left: 20px;
  font-size: .9rem;
  opacity: .85;
  transition: opacity .2s;
}
nav a:hover { opacity: 1; text-decoration: underline; }

/* ── Main ─────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 860px;
  margin: 40px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px 32px;
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 4px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(8px);
}

.card h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
}

.subtitle {
  color: var(--muted);
  font-size: .85rem;
  margin-bottom: 16px;
}

/* ── Inputs ───────────────────────────────────────────────── */
.input-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input[type="text"],
input[type="file"] {
  flex: 1;
  min-width: 180px;
  padding: 9px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
  background: rgba(255,255,255,.07);
  color: var(--text);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s, background .2s;
}
input[type="text"]:focus {
  border-color: var(--accent);
  background: rgba(255,255,255,.10);
}

input[type="file"] {
  padding: 6px;
  cursor: pointer;
}

button {
  padding: 9px 22px;
  border: none;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .1s;
}
button:hover  { background: #c73652; }
button:active { transform: scale(.97); }

/* ── Results ──────────────────────────────────────────────── */
.results {
  margin-top: 16px;
  font-size: .875rem;
  min-height: 20px;
}

.result-item {
  background: rgba(255,255,255,.06);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 8px;
  border-left: 3px solid var(--accent);
}

.result-item strong { color: #fff; }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: .75rem;
  font-weight: 600;
  margin-left: 6px;
  text-transform: capitalize;
}

.tag-fire     { background: #b74000; }
.tag-water    { background: #1565c0; }
.tag-grass    { background: #2e7d32; }
.tag-electric { background: #f9a825; color: #000; }
.tag-psychic  { background: #880e4f; }
.tag-ghost    { background: #4527a0; }
.tag-normal   { background: #546e7a; }
.tag-poison   { background: #6a1b9a; }
.tag-dragon   { background: #1565c0; }
.tag-flying   { background: #0288d1; }
.tag-ice      { background: #00838f; }
.tag-fighting { background: #bf360c; }

.stat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0;
}
.stat-label { width: 70px; color: var(--muted); font-size: .8rem; }
.stat-bar-wrap { flex: 1; background: rgba(255,255,255,.1); border-radius: 4px; height: 8px; }
.stat-bar { height: 8px; border-radius: 4px; background: var(--accent); transition: width .4s; }
.stat-val { width: 32px; text-align: right; font-size: .8rem; }

.status-ok  { color: var(--green); }
.status-err { color: var(--accent); }

pre {
  background: rgba(0,0,0,.4);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  font-size: .78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ── Search results page ──────────────────────────────────── */
.search-results {
  max-width: 600px;
  margin: 40px auto;
  padding: 28px;
  background: var(--card);
  border-radius: var(--radius);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.09);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 24px rgba(0,0,0,.5);
}
.search-results h2 { margin-bottom: 10px; }
.search-results ul { padding-left: 20px; margin-top: 12px; }
.search-results li { margin: 6px 0; }
.search-results a  { color: var(--accent); }

/* ── Footer ───────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px;
  color: var(--muted);
  font-size: .8rem;
  border-top: 1px solid rgba(255,255,255,.06);
}
