/* Pokemon Hollow Font */
@font-face {
  font-family: "Pokemon Hollow";
  src: url("src/fonts/pokemon-hollow-font/PokemonHollowNormal-pyPZ.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Gender symbol styling - use system fonts for better clarity and visibility */
.gender-symbol {
  font-family: "Segoe UI Symbol", "Noto Color Emoji", "Apple Color Emoji",
    "Segoe UI Emoji", "Arial Unicode MS", Arial, sans-serif !important;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  color: inherit; /* Use the same color as parent text */
}

.btn-color-mode-switch-inner.light-mode {
  background: #f5f6fa !important;
}
.btn-color-mode-switch-inner.light-mode .toggle-label {
  color: #2d3436;
}
.btn-color-mode-switch-inner.dark-mode {
  background: #636e72 !important;
}
.btn-color-mode-switch-inner.light-mode:after {
  background: #0984e3 !important;
  color: #fff !important;
}
.btn-color-mode-switch-inner.dark-mode:after {
  background: #00b894 !important;
  color: #fff !important;
}
div.btn-container {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
}

.btn-color-mode-switch {
  display: inline-block;
  margin: 0px;
  position: relative;
}

.btn-color-mode-switch > label.btn-color-mode-switch-inner {
  margin: 0px;
  width: 140px;
  height: 30px;
  background: #e0e0e0;
  border-radius: 26px;
  overflow: hidden;
  position: relative;
  transition: all 0.3s ease;
  display: block;
}

.btn-color-mode-switch > label.btn-color-mode-switch-inner:before {
  content: attr(data-on);
  position: absolute;
  font-size: 12px;
  font-weight: 500;
  top: 7px;
  right: 20px;
}

.btn-color-mode-switch > label.btn-color-mode-switch-inner:after {
  content: attr(data-off);
  width: 70px;
  height: 16px;
  background: #0984e3;
  color: #fff;
  border-radius: 26px;
  position: absolute;
  left: 2px;
  top: 2px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0px 0px 6px -2px #111;
  padding: 5px 0px;
}

.btn-color-mode-switch input[type="checkbox"] {
  cursor: pointer;
  width: 50px;
  height: 25px;
  opacity: 0;
  position: absolute;
  top: 0;
  z-index: 1;
  margin: 0px;
}

.btn-color-mode-switch
  input[type="checkbox"]:checked
  + label.btn-color-mode-switch-inner {
  background: #151515;
}
.btn-color-mode-switch
  input[type="checkbox"]:checked
  + label.btn-color-mode-switch-inner.dark-mode {
  color: #fff;
}
.btn-color-mode-switch
  input[type="checkbox"]:checked
  + label.btn-color-mode-switch-inner.light-mode {
  color: #2d3436;
}
.btn-color-mode-switch-inner.dark-mode.btn-color-mode-switch-inner:checked {
  color: #fff !important;
}
.btn-color-mode-switch-inner.light-mode.btn-color-mode-switch-inner:checked {
  color: #2d3436 !important;
}

.btn-color-mode-switch
  input[type="checkbox"]:checked
  + label.btn-color-mode-switch-inner:after {
  content: attr(data-on);
  left: 68px;
}

.btn-color-mode-switch
  input[type="checkbox"]:checked
  + label.btn-color-mode-switch-inner:before {
  content: attr(data-off);
  right: auto;
  left: 20px;
}
h1.dark-mode,
h2.dark-mode {
  color: #f5f6fa;
}
h1.light-mode,
h2.light-mode {
  color: #2d3436;
}
label.dark-mode {
  color: #f5f6fa;
}
label.light-mode {
  color: #2d3436;
}
.toggle-label.dark-mode {
  color: #dfe6e9;
}
.toggle-label-left.dark-mode,
.toggle-label-right.dark-mode {
  color: #dfe6e9;
}
#result.dark-mode {
  color: #00b894;
  text-shadow: 0 1px 4px #23243a;
}
#result.light-mode {
  color: #00b894;
}
body.light-mode {
  background: #f5f6fa;
  color: #2d3436;
}

body.dark-mode {
  background: #23243a;
  color: #f5f6fa;
}

.container.light-mode {
  background: #fff;
  color: #2d3436;
}
.container.dark-mode {
  background: #2d2e4a;
  color: #f5f6fa;
}

input[type="number"].dark-mode {
  background: #23243a;
  color: #f5f6fa;
  border-color: #636e72;
}
input[type="number"].light-mode {
  background: #f5f6fa;
  color: #2d3436;
  border-color: #b2bec3;
}

button.dark-mode {
  background: #636e72;
  color: #fff;
}
button.light-mode {
  background: #0984e3;
  color: #fff;
}

select.dark-mode {
  background: #23243a;
  color: #f5f6fa;
  border-color: #636e72;
}
select.light-mode {
  background: #dfe6e9;
  color: #2d3436;
  border-color: #b2bec3;
}
.container .toggle-switch {
  margin: 0;
  width: 100px;
  height: 32px;
}
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 120px;
  height: 32px;
  margin: 0 12px;
}
.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 140px;
  height: 30px;
  background: #e0e0e0;
  border-radius: 26px;
  box-shadow: none;
  transition: all 0.3s ease;
  padding: 0;
}
.toggle-switch input:checked + .slider {
  background: #e0e0e0;
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(76px);
}
.toggle-label {
  flex: 1;
  text-align: center;
  font-size: 13px;
  color: #424242;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 26px;
  padding: 0;
  pointer-events: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-color-mode-switch-inner.light-mode .toggle-label {
  color: #2d3436;
}

.toggle-label.active {
  background: #fff;
  color: #424242;
  border: 1px solid #d3d3d3;
  box-shadow: 0px 0px 6px -2px #111;
  padding: 5px 0px;
  z-index: 2;
}

.toggle-switch input:checked ~ .toggle-label-left {
  color: #424242;
}
.toggle-switch input:checked ~ .toggle-label-right {
  color: #424242;
}
body {
  font-family: Arial, sans-serif;
  background: #f5f6fa;
  margin: 0;
  padding: 0;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: #dfe6e9;
  color: #2d3436;
  padding: 8px 32px 8px 12px;
  border: 1px solid #b2bec3;
  border-radius: 4px;
  font-size: 16px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  position: relative;
}
select:focus {
  border-color: #0984e3;
}
select::-ms-expand {
  display: none;
}

/* Custom arrow for select */
.container select {
  background-image: url('data:image/svg+xml;utf8,<svg fill="%230984e3" height="20" viewBox="0 0 20 20" width="20" xmlns="http://www.w3.org/2000/svg"><path d="M7 7l3 3 3-3"/></svg>');
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 18px 18px;
}
.container {
  max-width: 400px;
  margin: 60px auto;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
}

/* Applied after first generation to maintain size */
.container.has-generated {
  min-height: 600px;
}
h1 {
  font-family: "Pokemon Hollow", "Arial Black", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 10px;
  line-height: 3rem;
}
label {
  margin-right: 8px;
}
input[type="number"] {
  width: 80px;
  padding: 8px 16px;
  margin: 0 8px 16px 0;
  border: 1.5px solid #b2bec3;
  border-radius: 6px;
  font-size: 16px;
  background: #f5f6fa;
  color: #2d3436;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: border-color 0.2s, box-shadow 0.2s;
}
input[type="number"]:focus {
  border-color: #0984e3;
  box-shadow: 0 2px 8px rgba(9, 132, 227, 0.08);
  outline: none;
}
button {
  padding: 8px 20px;
  background: #0984e3;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}
button:hover {
  background: #74b9ff;
}
body.dark-mode button:hover {
  background: #00b894;
}

.poke-img-wrap {
  position: relative;
  display: inline-block;
  width: 160px;
  height: 160px;
  margin-top: 16px;
}
img.poke-img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  background: #f5f6fa;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  position: absolute;
  top: 0;
  left: 0;
}
body.dark-mode img.poke-img {
  background: #23243a;
}
body.dark-mode .toggle-switch input:checked + .slider {
  background: #00b894;
}
img.shiny-effect {
  width: 160px;
  height: 160px;
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 8px;
}

/* Shiny effects in history section should match small pokemon size */
#history-container img.shiny-effect {
  width: 80px !important;
  height: 80px !important;
  position: absolute !important;
  top: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  margin: 0 !important;
}

/* Remove fixed dimensions from poke-img-wrap in history section */
#history-container .poke-img-wrap {
  width: auto !important;
  height: auto !important;
  margin-top: 0 !important;
}

@media (max-width: 768px) {
  #history-container img.shiny-effect {
    width: 70px !important;
    height: 70px !important;
  }
}

/* Responsive adjustments for Pokemon grid */
@media (max-width: 768px) {
  .pokemon-wrapper {
    flex: 0 1 calc(50% - 12px);
    max-width: calc(50% - 12px);
    min-width: 140px;
  }
}

@media (max-width: 480px) {
  .pokemon-grid {
    gap: 16px;
  }

  .pokemon-wrapper {
    flex: 0 1 calc(50% - 8px);
    max-width: calc(50% - 8px);
    min-width: 120px;
    padding: 8px;
  }

  #history-container img.shiny-effect {
    width: 60px !important;
    height: 60px !important;
  }
}

#result {
  margin-top: 24px;
  font-size: 24px;
  color: #00b894;
  font-weight: bold;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}

/* Applied after first generation to maintain size */
#result.has-content {
  min-height: 300px;
}

/* History section styles */
#history-section {
  transition: all 0.3s ease;
}

#history-section.dark-mode {
  border-color: #636e72 !important;
  background: rgba(35, 36, 58, 0.3) !important;
}

#history-section.light-mode {
  border-color: #ddd !important;
  background: rgba(245, 246, 250, 0.5) !important;
}

#history-section h2 {
  font-size: 18px;
  margin: 0 0 20px 0;
  transition: color 0.3s ease;
  border-bottom-color: #636e72;
  font-family: "Pokemon Hollow", "Arial Black", sans-serif;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  letter-spacing: 5px;
}

#history-section.light-mode h2 {
  border-bottom-color: #ddd;
}

#history-section.dark-mode h2 {
  border-bottom-color: #636e72;
}

#history-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  transition: all 0.3s ease;
}

#history-container > div {
  padding: 12px;
  border-radius: 10px;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  align-items: center;
  min-width: 96px;
  flex: 0 0 calc(30% - 8px);
  max-width: calc(30% - 8px);
  width: calc(30% - 8px);
  box-sizing: border-box;
}

.poke-img-small {
  width: 80px !important;
  height: 80px !important;
  object-fit: contain;
  background: #f5f6fa;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative !important;
  top: auto !important;
  left: auto !important;
  margin: 0 auto 4px auto;
  display: block;
}

body.dark-mode .poke-img-small {
  background: #23243a;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#history-container > div:hover {
  background: rgba(116, 185, 255, 0.15);
  transform: translateY(-4px);
  border-color: rgba(116, 185, 255, 0.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode #history-container > div:hover {
  background: rgba(116, 185, 255, 0.2);
  border-color: rgba(116, 185, 255, 0.4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Generated Pokemon wrapper styles */
.pokemon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  width: 100%;
}

.pokemon-wrapper {
  background: #f5f6fa;
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  margin-bottom: 24px;
  flex: 0 1 calc(50% - 12px);
  max-width: calc(50% - 12px);
  min-width: 180px;
  text-align: center;
  cursor: pointer;
  padding: 12px;
  box-sizing: border-box;
}

.pokemon-wrapper:hover {
  background: rgba(116, 185, 255, 0.15);
  transform: translateY(-4px);
  border-color: rgba(116, 185, 255, 0.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

body.dark-mode .pokemon-wrapper {
  background: rgba(0, 0, 0, 0.2);
}

body.dark-mode .pokemon-wrapper:hover {
  background: rgba(116, 185, 255, 0.2);
  border-color: rgba(116, 185, 255, 0.4);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Pokemon name and number styling */
.pokemon-name {
  color: #0984e3;
}

body.dark-mode .pokemon-name {
  color: #00b894;
}

.pokemon-number {
  color: #0984e3;
  font-size: 0.9em;
}

body.dark-mode .pokemon-number {
  color: #00b894;
}

.pokemon-number-small {
  color: #0984e3;
  font-size: 10px;
}

body.dark-mode .pokemon-number-small {
  color: #00b894;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
  #history-section {
    margin: 16px 8px !important;
    padding: 16px !important;
    border-radius: 8px !important;
  }

  #history-container {
    gap: 6px !important;
    justify-content: center !important;
  }

  #history-container > div {
    padding: 8px !important;
    min-width: 80px !important;
    flex: 0 0 calc(50% - 3px) !important;
    max-width: calc(50% - 3px) !important;
    border-radius: 6px !important;
    margin-bottom: 4px !important;
  }

  .poke-img-small {
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 4px auto !important;
  }

  #history-section h2 {
    font-size: 14px !important;
    margin-bottom: 12px !important;
    letter-spacing: 1px !important;
  }

  /* Main Pokemon name should be larger */
  #result .pokemon-name {
    font-size: 18px !important;
  }

  /* History Pokemon names should be smaller */
  #history-container .pokemon-name {
    font-size: 12px !important;
  }

  .pokemon-number-small {
    font-size: 9px !important;
  }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
  #history-section {
    margin: 12px 4px !important;
    padding: 12px !important;
  }

  #history-container {
    gap: 4px !important;
  }

  #history-container > div {
    padding: 6px !important;
    min-width: 70px !important;
    flex: 0 0 calc(50% - 2px) !important;
    max-width: calc(50% - 2px) !important;
  }

  .poke-img-small {
    width: 60px !important;
    height: 60px !important;
    margin: 0 auto 2px auto !important;
  }

  #history-section h2 {
    font-size: 12px !important;
    margin-bottom: 8px !important;
  }

  /* Main Pokemon name should be larger on very small screens */
  #result .pokemon-name {
    font-size: 16px !important;
  }

  /* History Pokemon names should be smaller on very small screens */
  #history-container .pokemon-name {
    font-size: 10px !important;
  }

  .pokemon-number-small {
    font-size: 8px !important;
  }
}

/* Pokemon detail page specific styles */
.pokemon-detail-container {
  max-width: 800px;
  margin: 60px auto;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pokemon-detail-container.dark-mode {
  background: #23243a;
  color: #f5f6fa;
}

.pokemon-header {
  text-align: center;
  margin-bottom: 32px;
}

.pokemon-title {
  font-family: "Pokemon Hollow", "Arial Black", sans-serif;
  font-size: 3rem;
  margin-bottom: 8px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  color: #0984e3;
}

.pokemon-detail-container.dark-mode .pokemon-title {
  color: #00b894;
}

.pokemon-number {
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.pokemon-images {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.pokemon-image-section {
  text-align: center;
}

.pokemon-image-section h3 {
  margin-bottom: 12px;
  color: #0984e3;
}

.pokemon-detail-container.dark-mode .pokemon-image-section h3 {
  color: #00b894;
}

.pokemon-image {
  width: 200px;
  height: 200px;
  object-fit: contain;
  border-radius: 8px;
  background: #f5f6fa;
  padding: 16px;
  margin-bottom: 8px;
}

.pokemon-detail-container.dark-mode .pokemon-image {
  background: rgba(0, 0, 0, 0.2);
}

.pokemon-image-section .poke-img-wrap {
  position: relative;
  display: inline-block;
  width: 200px;
  height: 200px;
  background: #f5f6fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 8px;
}

.pokemon-detail-container.dark-mode .pokemon-image-section .poke-img-wrap {
  background: rgba(0, 0, 0, 0.2);
}

.pokemon-image-section .poke-img-wrap img.pokemon-image {
  background: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

.pokemon-image-section .shiny-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 8px;
}

.pokemon-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.info-section {
  background: #f5f6fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #0984e3;
}

.pokemon-detail-container.dark-mode .info-section {
  background: rgba(0, 0, 0, 0.2);
  border-left-color: #00b894;
}

.evolution-section {
  background: #f5f6fa;
  padding: 24px;
  border-radius: 12px;
  border-left: 4px solid #0984e3;
  margin: 24px 0;
}

.pokemon-detail-container.dark-mode .evolution-section {
  background: rgba(0, 0, 0, 0.2);
  border-left-color: #00b894;
}

.evolution-section h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: #0984e3;
  font-size: 1.4rem;
  text-align: center;
}

.pokemon-detail-container.dark-mode .evolution-section h3 {
  color: #00b894;
}

.form-button {
  margin: 4px;
  padding: 8px 16px;
  border: 2px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 20px;
  cursor: pointer;
  font-weight: normal;
  transition: all 0.3s ease;
}

.form-button.active {
  border-color: #0984e3;
  background: #0984e3;
  color: #fff;
  font-weight: bold;
}

.form-button:hover {
  background: #f0f0f0;
}

.form-button.active:hover {
  background: #0764b8;
}

.pokemon-detail-container.dark-mode .form-button {
  border-color: #636e72;
  background: #2d3436;
  color: #ddd;
}

.pokemon-detail-container.dark-mode .form-button.active {
  border-color: #00b894;
  background: #00b894;
  color: #fff;
}

.pokemon-detail-container.dark-mode .form-button:hover {
  background: #636e72;
}

.pokemon-detail-container.dark-mode .form-button.active:hover {
  background: #00a085;
}

.form-selector-container {
  text-align: center;
  margin: 24px 0 32px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px solid #e9ecef;
}

.pokemon-detail-container.dark-mode .form-selector-container {
  background: rgba(0, 0, 0, 0.2);
  border-color: #636e72;
}

#form-selector {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.evolution-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px;
}

.evolution-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  min-width: 120px;
}

.evolution-pokemon {
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.evolution-pokemon:hover {
  border-color: #0984e3;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.pokemon-detail-container.dark-mode .evolution-pokemon {
  background: rgba(0, 0, 0, 0.2);
  border-color: #636e72;
  color: #f5f6fa;
}

.pokemon-detail-container.dark-mode .evolution-pokemon:hover {
  border-color: #00b894;
}

.evolution-image {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-bottom: 4px;
}

.evolution-name {
  font-weight: bold;
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.evolution-number {
  font-size: 0.8rem;
  color: #636e72;
}

.pokemon-detail-container.dark-mode .evolution-number {
  color: #b2bec3;
}

.evolution-arrow {
  font-size: 1.5rem;
  color: #0984e3;
  margin: 0 8px;
}

.pokemon-detail-container.dark-mode .evolution-arrow {
  color: #00b894;
}

.info-section h3 {
  margin-top: 0;
  margin-bottom: 16px;
  color: #0984e3;
}

.pokemon-detail-container.dark-mode .info-section h3 {
  color: #00b894;
}

.back-button {
  display: inline-block;
  padding: 12px 24px;
  background: #0984e3;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-weight: bold;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.back-button:hover {
  background: #0770c2;
}

.pokemon-detail-container.dark-mode .back-button {
  background: #00b894;
}

.pokemon-detail-container.dark-mode .back-button:hover {
  background: #009a7b;
}

.loading {
  text-align: center;
  font-size: 1.2rem;
  color: #636e72;
  margin: 64px 0;
}

.error {
  text-align: center;
  color: #d63031;
  font-size: 1.2rem;
  margin: 64px 0;
}

/* Light mode styles for links (default) */
.links-container {
  border-top-color: #0984e3 !important;
}

/* Responsive links layout */
.links-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

/* Desktop layout - side by side */
@media (min-width: 768px) {
  .links-wrapper {
    flex-direction: row;
    justify-content: center;
    gap: 30px;
  }
}

/* Dark mode styles for links */
body.dark-mode .links-container {
  border-top-color: #00b894 !important;
}

body.dark-mode .download-link,
body.dark-mode .twitter-link {
  color: #00b894 !important;
}

body.dark-mode .twitter-link svg path {
  fill: #00b894 !important;
}

@media (max-width: 768px) {
  .evolution-chain {
    flex-direction: column;
  }

  .evolution-arrow {
    transform: rotate(90deg);
  }

  .pokemon-images {
    flex-direction: column;
    align-items: center;
  }

  .pokemon-info {
    grid-template-columns: 1fr;
  }

  .pokemon-title {
    font-size: 2.5rem;
  }

  /* Mobile layout for back button and toggle */
  .pokemon-detail-container > div:first-of-type {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .pokemon-detail-container > div:first-of-type > div {
    position: static !important;
    left: auto !important;
  }
}
