* {
  box-sizing: border-box;
}

html {
  font-family: Calibri, Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #e9ecef 0%, #f8fafc 100%);
  font-size: 15px;
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  background: #fff;
  border-radius: 1.25rem;
  box-shadow: 0 4px 32px rgba(0,0,0,0.08), 0 1.5px 4px rgba(0,0,0,0.04);
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

h1 {
  margin-top: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #222;
  letter-spacing: -1px;
}

.desc {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

label {
  font-weight: 600;
  color: #444;
  margin-right: 0.5rem;
}

.gamertag {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  margin: 0.5rem 0 1.5rem 0;
  font-size: 1rem;
  outline: none;
  transition: border 0.2s;
  background: #f8fafc;
  width: 70%;
  max-width: 250px;
}

.gamertag:focus {
  border: 1.5px solid #6cb4f7;
  background: #fff;
}

.avatar-images {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 1.5rem;
}

figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-images a {
  display: block;
  border-radius: 1rem;
  transition: box-shadow 0.18s, transform 0.18s;
}

.avatar-images a:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.13);
  transform: scale(1.08) rotate(-2deg);
  border-color: #6cb4f7;
}

img {
  display: block;
  margin: 0;
  border: 2.5px solid #e5e7eb;
  border-radius: 1rem;
  background: #f9fafb;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.18s, box-shadow 0.18s;
  width: 180px;
  height: 180px;
  object-fit: cover;
}

img[src="#"] {
  display: none;
  width: 0;
  height: 0;
}

.failed-to-load {
  display: none !important;
}

figcaption {
  margin-top: 0.7rem;
  font-size: 1.08rem;
  color: #555;
  letter-spacing: 0.01em;
  text-align: center;
}

@media (max-width: 900px) {
  img {
    width: 120px;
    height: 120px;
  }
  .avatar-images {
    gap: 1rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 1.2rem 0.5rem;
    max-width: 98vw;
  }
  .avatar-images {
    gap: 0.7rem;
  }
  img {
    width: 80px;
    height: 80px;
  }
}