/* root variables for pokémon-themed UI */
:root {
  --primary: #2a6fbd;
  --primary-dark: #1e52a0;
  --accent-red: #ff4757;
  --accent-yellow: #ffd700;
  --accent-green: #26de81;
  --accent-blue: #00d2d3;
  --accent-purple: #a55eea;
  --background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  --card-bg: #ffffff;
  --sidebar-bg: #f8f9fa;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #e0e0e0;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--background);
  color: var(--text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  letter-spacing: 0.3px;
}

#header {
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #ff6b6b 100%);
  padding: 0.75rem 1.5rem;
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  font-weight: 600;
}

#menu-toggle {
  display: none;
  font-size: 1.4rem;
  background: none;
  border: none;
  color: white;
  margin-right: 0.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  #menu-toggle { display: block; }
}

#logo {
  height: 52px;
  width: 52px;
  margin-right: 1rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}

#logo:hover {
  transform: scale(1.05) rotate(-2deg);
}

#title-text {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.header-link {
  margin-left: auto;
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.header-link:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-2px);
}

.container {
  display: flex;
  min-height: calc(100vh - 60px);
  gap: 0;
}

#sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  border-right: 2px solid var(--border);
  padding: 1.5rem;
  overflow-y: auto;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#sidebar::-webkit-scrollbar {
  width: 6px;
}

#sidebar::-webkit-scrollbar-track {
  background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* hide sidebar on small screens when toggled */
body.sidebar-hidden #sidebar {
  transform: translateX(-100%);
}

#content {
  flex: 1;
  padding: 2rem;
  overflow-x: auto;
  background: var(--background);
}

#content h2 {
  font-size: 2rem;
  margin: 1rem 0 1.5rem 0;
  color: var(--primary);
  border-bottom: 3px solid var(--accent-red);
  padding-bottom: 0.5rem;
}

#search-container,
#list-container {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text);
}

#poke-search,
#list-filter {
  width: 100%;
  padding: 0.75rem;
  margin-top: 0.25rem;
  box-sizing: border-box;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

#poke-search:focus,
#list-filter:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(42, 111, 189, 0.1);
  background: #fafbfc;
}

#search-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(42, 111, 189, 0.3);
}

#search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(42, 111, 189, 0.4);
}

#search-btn:active {
  transform: translateY(0);
}

#poke-list {
  list-style: none;
  padding: 0;
  max-height: calc(100vh - 400px);
  overflow-y: auto;
  border: 2px solid var(--border);
  border-radius: 8px;
  background: white;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

#poke-list li {
  border-bottom: 1px solid var(--border);
}

#poke-list li:last-child {
  border-bottom: none;
}

#poke-list li a {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
  font-weight: 500;
}

#poke-list li a:hover {
  background: linear-gradient(90deg, rgba(42, 111, 189, 0.05), transparent);
  border-left: 4px solid var(--primary);
  padding-left: calc(1rem - 4px);
}

#poke-list li a.selected {
  background: linear-gradient(90deg, var(--primary), rgba(42, 111, 189, 0.8));
  color: white;
  border-left: 4px solid var(--accent-red);
  padding-left: calc(1rem - 4px);
  font-weight: 600;
}

#poke-list li a.no-spawn {
  color: var(--text-light);
}

#results p.empty-message {
  font-style: italic;
  color: var(--text-light);
  font-size: 1.1rem;
  text-align: center;
  padding: 2rem;
}

/* spawn cards instead of table */
.spawns-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.spawn-card {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  border-left: 5px solid var(--primary);
}

.spawn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.spawn-card.from-csv {
  border-left-color: var(--accent-yellow);
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.05), white);
}

.spawn-card.from-csv::before {
  content: "CSV";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--accent-yellow);
  color: #333;
  font-size: 0.7rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
}

.spawn-card {
  position: relative;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.75rem;
}

.card-id {
  font-weight: 600;
  color: var(--primary);
  font-size: 1rem;
}

.card-bucket {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.bucket-common { background: var(--accent-green); color: white; }
.bucket-uncommon { background: var(--accent-blue); color: white; }
.bucket-rare { background: var(--accent-purple); color: white; }
.bucket-ultra-rare { background: var(--accent-red); color: white; }
.bucket-legendary { background: linear-gradient(135deg, var(--accent-yellow), #ff9500); color: #333; }

.card-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.card-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  color: var(--text);
  font-weight: 500;
}

.card-biomes {
  background: rgba(42, 111, 189, 0.05);
  border-radius: 8px;
  padding: 0.75rem;
  margin-top: 1rem;
}

.card-biomes-label {
  font-weight: 600;
  color: var(--text-light);
  font-size: 0.85rem;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

.biome-tag {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--accent-red), #ff6b9d);
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  vertical-align: middle;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(255, 71, 87, 0.3);
}

#footer {
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-top: 2px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-light);
  box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

/* responsive design */
@media (max-width: 768px) {
  #content {
    padding: 1rem;
  }

  #sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    width: 240px;
    z-index: 99;
    box-shadow: 2px 0 12px rgba(0,0,0,0.2);
  }

  body.sidebar-hidden #sidebar {
    transform: translateX(-100%);
  }

  .spawns-container {
    grid-template-columns: 1fr;
  }

  #content h2 {
    font-size: 1.5rem;
  }
}


