/* Prevent text selection throughout the app for cleaner mobile experience */
* {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

/* Allow selection for input fields */
input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Allow long press to save Pokemon images */
.card-image img {
  -webkit-touch-callout: default;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Gender symbols should use Segoe UI Symbol font for better display */
.gender-symbol {
  font-family: 'Segoe UI Symbol', 'Segoe UI', Arial, sans-serif;
}

/* Remove highlight on search box when focused */
.search-box input:focus {
  outline: none;
  box-shadow: none;
  border: 2px solid #3d5970;
  border-radius: 8px;
}
.shiny-btn-footer.active:hover {
  background: #1a87a8;
  color: #222;
  border: 2px solid #2ecbfa;
}
.shiny-btn-footer.active {
  background: #2ecbfa;
  color: #333;
  border: 2px solid #2ecbfa;
}
/* Autocomplete suggestion box styles */
.suggestion-box {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 10;
  background: #232f3e;
  border: 2px solid #22303c;
  border-radius: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  max-height: 220px;
  overflow-y: auto;
  margin-top: 2px;
  color: #bfc8d0;
  font-family: 'Segoe UI', Arial, sans-serif;
}

.suggestion-item {
  padding: 12px 28px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  color: #bfc8d0;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #263445;
  background: transparent;
  transition: background 0.2s, color 0.2s;
}

.suggestion-item:hover {
  background: #1c2632;
  color: #ffd700;
}
.search-box {
  position: relative;
}
.card-image-relative {
  position: relative;
  display: block;
  width: 100%;
  display: block;
  width: 100%;
  height: auto;
}

/* Shiny locked symbol styles */
.shiny-locked-symbol {
  position: absolute !important;
  top: 2px !important;
  left: 2px !important;
  width: 26px !important;
  height: 26px !important;
  z-index: 3 !important;
  opacity: 0.8 !important;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)) !important;
  pointer-events: none !important;
}
.shiny-btn-image {
  position: absolute;
  right: -13px;
  top: calc(100% + 18px);
  z-index: 2;
  padding: 6px 16px;
  font-size: 1rem;
  border-radius: 20px;
  background: #ffd700;
  color: #333;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}
.shiny-btn-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  margin-bottom: 12px;
}
body {
  background: #18222c;
  color: #bfc8d0;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
}
body {
  background: #18222c;
  color: #bfc8d0;
  font-family: 'Segoe UI', Arial, sans-serif;
  margin: 0;
}
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(24,34,44,0.85);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.menu-open .menu-overlay {
  opacity: 1;
  pointer-events: auto;
}
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1c2632;
  padding: 12px 24px 12px 24px;
  min-height: 48px;
}
.app-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #bfc8d0;
  font-family: 'Segoe UI', Arial, sans-serif;
  display: flex;
  align-items: center;
  height: 100%;
}
.menu-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
}
.menu-icon {
  display: block;
  width: 32px;
  height: 4px;
  background: #bfc8d0;
  border-radius: 8px;
  position: relative;
}
.menu-icon::before, .menu-icon::after {
  content: '';
  display: block;
  width: 32px;
  height: 4px;
  background: #bfc8d0;
  border-radius: 8px;
  position: absolute;
  left: 0;
}
.menu-icon::before {
  top: -10px;
}
.menu-icon::after {
  top: 10px;
}
.side-menu {
  position: fixed;
  top: 0;
  right: -320px;
  width: 320px;
  height: 100vh;
  background: #1c2632;
  color: #bfc8d0;
  box-shadow: -2px 0 8px rgba(0,0,0,0.2);
  transition: right 0.3s;
  z-index: 1000;
  padding-top: 32px;
}
.side-menu.open {
  right: 0;
}
.menu-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-left: 24px;
  margin-bottom: 16px;
}
.menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.menu-link {
  display: block;
  padding: 16px 32px;
  color: #bfc8d0;
  text-decoration: none;
  font-size: 1.1rem;
  border-bottom: 1px solid #22303c;
}
.menu-link:hover {
  background: #22303c;
}
.main-content {
  max-width: 480px;
  margin: 32px auto;
  padding: 0 16px;
}
.search-box {
  margin-bottom: 24px;
}
.search-box input {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  border: 2px solid #22303c;
  background: #1c2632;
  color: #bfc8d0;
  font-size: 1.1rem;
}
.card {
  background: #1c2632;
  border-radius: 16px;
  border: 2px solid #22303c;
  padding: 24px;
  margin-bottom: 32px;
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center; /* Changed from flex-start to center for vertical alignment */
  margin-bottom: 16px;
}
.pokemon-name {
  color: #2ecbfa;
  font-size: 2rem;
  font-weight: 600;
}
.pokedex-label {
  font-size: 1.2rem;
  color: #bfc8d0;
}
.type-section {
  text-align: right;
}
.type-label {
  font-size: 1rem;
  font-weight: 600;
  margin-right: 8px;
}
.type-icons {
  display: flex;
  flex-direction: column;
  align-items: flex-end; /* Changed to flex-end to align with right side */
  gap: 8px;
  margin-top: 1px; /* Removed margin-top to center with text */
  /* Prevent layout shifts */
  min-height: 40px;
  min-width: 85px;
}
.type-icon {
  width: 200px;
  height: 44px;
  object-fit: contain;
  margin-right: 8px;
  width: 85px;
  height: 19px;
  margin-left: 4px;
}
.card-image {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #18222c;
  border-radius: 12px;
  border: 2px solid #22303c;
  margin-bottom: 16px;
  padding: 16px;
  /* Fixed aspect ratio to prevent layout shifts */
  width: 100%;
  max-width: 385px;
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
}
.card-image img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  margin: auto;
  /* Smooth transitions to prevent jarring changes */
  transition: opacity 0.09s ease-in-out;
  object-fit: contain;
}

/* Loading state for card image */
.card-image img[src=""], .card-image img:not([src]) {
  opacity: 0;
}

.card-image img[src]:not([src=""]) {
  opacity: 1;
}
.card-footer {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}
.stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.stats-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  text-align: left;
  padding-left: 2px;
}
.stat-row {
  display: grid;
  grid-template-columns: 1fr 180px 48px;
  align-items: center;
  gap: 12px;
  font-size: 1.1rem;
  margin-bottom: 0;
  padding: 0 2px;
}
.stat-row.overall {
.card-image {
  position: relative;
}

.shiny-btn-image {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 2;
  padding: 6px 16px;
  font-size: 1rem;
  border-radius: 20px;
  background: #ffd700;
  color: #333;
  border: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
}
  font-weight: 600;
  background: #22303c;
  border-radius: 6px;
  padding: 4px 0;
}
.stat-value {
  margin-left: 0;
  font-weight: 600;
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
  max-width: 80px;
}
.stat-bar {
  display: none;
}
.shiny-btn {
  background: none;
  border: 2px solid #2ecbfa;
  color: #2ecbfa;
  border-radius: 8px;
  padding: 8px 24px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
.shiny-btn:hover {
  background: #2ecbfa22;
}

@media (max-width: 600px) {
  .card-image {
    padding: 12px !important;
    margin-left: 12px !important;
    margin-right: 12px !important;
    width: auto !important;
    box-sizing: border-box !important;
    max-width: none !important;
  }
  body {
    padding: 0;
  }
  .main-content {
    max-width: 100%;
    padding: 0 16px;
  }
  .search-box {
    padding: 0;
    margin-bottom: 24px;
  }
  .card {
    padding: 16px 0;
    margin-bottom: 24px;
  }
  .card > * {
    padding-left: 12px;
    padding-right: 12px;
  }
  }
  .app-header {
    padding: 8px 12px 8px 12px;
    min-height: 40px;
    box-sizing: border-box;
    gap: 8px;
  }
  .app-title {
    font-size: 1.2rem;
    letter-spacing: 0.18em;
    padding-left: 4px;
    padding-right: 8px;
  }
  .menu-toggle {
    min-width: 40px;
    min-height: 40px;
    padding: 8px 8px 8px 8px;
  }
  .side-menu {
    width: 90vw;
    right: -90vw;
    min-width: 240px;
    max-width: 320px;
  }
  .side-menu.open {
    right: 0;
  }
  .search-box input {
    padding: 14px;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-left: 0;
  }
  .form-dropdown {
    margin-right: auto;
    padding: 8px 16px;
    font-size: 1rem;
    border-radius: 20px;
    background: #232f3e;
    color: #bfc8d0;
    border: 2px solid #22303c;
    font-weight: 500;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    appearance: none;
    order: 0;
    width: auto;
    min-width: 0;
    max-width: none;
  }
  .form-dropdown option {
    background: #232f3e;
    color: #bfc8d0;
    border-radius: 12px;
    padding: 10px 18px;
    font-size: 1rem;
    font-weight: 500;
    border-bottom: 1px solid #263445;
    transition: background 0.2s, color 0.2s;
  }
  .form-dropdown option:hover, .form-dropdown option:focus {
    background: #1c2632;
    color: #ffd700;
  }


