@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  vertical-align: bottom;
}

@charset "UTF-8";

* {
  margin: 0;
  padding: 0;
  vertical-align: bottom;
}

body {
  display: grid;
  justify-content: center;
}

img {
  width: 100%;
  height: auto;
}

h1 {
  text-align: center;
  padding: 10px 0;
}

footer {
  text-align: center;
}

.gallery {
  max-width: 800px;
  padding: 10px;
}

ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  padding-top: 10px;
  gap: 10px;
}

ul li img {
  transition: opacity .5s;
}

ul li img:hover {
  cursor: pointer;
  opacity: .7;
}
.gallery div {
  position: relative;
}

#caption {
  position: absolute;
  bottom: 0;
  background: rgba(0, 0, 0, .5);
  padding: 10px;
  width: 100%;
  box-sizing: border-box;
  color: #FFF;
}

@media screen and (max-width: 640px) {
  ul {
    grid-template-columns: 1fr 1fr;
  }
}
body {
  background: #222;
  color: #fff;
  font-family: 'Arial', sans-serif;
}

.character-select {
  max-width: 900px;
  margin: 40px auto;
  padding: 24px;
  background: #333;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}

.character-select h2 {
  text-align: center;
  margin-bottom: 24px;
  font-size: 2rem;
  letter-spacing: 0.1em;
}

.character-select-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.character-thumb {
  background: #222;
  border: 3px solid transparent;
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  transition: border 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.character-thumb:hover {
  border: 3px solid #f5c542;
  box-shadow: 0 0 16px #f5c54288;
}

.character-thumb.selected {
  border: 3px solid #42a5f5;
  box-shadow: 0 0 24px #42a5f588;
}

.character-thumb img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  border-radius: 8px;
  background: #444;
}

.character-name {
  display: block;
  margin-top: 8px;
  font-size: 1rem;
  color: #fff;
  letter-spacing: 0.05em;
}

.character-main {
  text-align: center;
  margin-top: 16px;
}

#main-image {
  width: 160px;
  height: 160px;
  object-fit: contain;
  border-radius: 16px;
  background: #444;
  border: 4px solid #42a5f5;
  box-shadow: 0 0 32px #42a5f588;
}

#caption {
  margin-top: 12px;
  font-size: 1.3rem;
  color: #f5c542;
  letter-spacing: 0.1em;
}