body {
  background-color: #1e1e2f;
  color: #fff;
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

#game-room-label {
  color: rgba(255, 255, 255, 0.9) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
  font-size: 0.95rem;
}

.lobby-subtitle {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.08);
  padding: 8px 16px;
  border-radius: 8px;
  display: inline-block;
}

.room-code-copy {
  cursor: pointer;
  user-select: none;
  padding: 8px 16px;
  border-radius: 8px;
  transition: background 0.2s;
}
.room-code-copy:hover {
  background: rgba(255, 255, 255, 0.15);
}
.room-code-copy:active {
  background: rgba(255, 255, 255, 0.25);
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  max-width: 500px;
  margin: 0 auto;
}

.grid-item {
  position: relative;
  overflow: hidden;
  background: #333;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s, box-shadow 0.3s;
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.grid-item-placeholder {
  min-height: 80px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px dashed rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}
.grid-item-placeholder::after {
  content: "?";
  font-size: 1.5rem;
  color: rgba(255, 255, 255, 0.25);
  font-weight: bold;
}

.grid-item.shiny {
  position: relative;
}
.grid-item.shiny::before,
.grid-item.shiny::after {
  content: "✦";
  position: absolute;
  font-size: 14px;
  color: rgba(255, 215, 0, 0.9);
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  text-shadow: 0 0 8px rgba(255, 215, 0, 0.8), 0 0 12px rgba(255, 255, 255, 0.6);
  font-weight: bold;
}
.grid-item.shiny::before {
  top: var(--shiny-1-top, 20%);
  left: var(--shiny-1-left, 25%);
  animation: shiny-star-1 4s ease-in-out infinite;
}
.grid-item.shiny::after {
  top: var(--shiny-2-top, 65%);
  right: var(--shiny-2-right, 30%);
  animation: shiny-star-2 5s ease-in-out infinite 1.2s;
}
.grid-item.shiny img {
  filter: brightness(1.08) saturate(1.15);
  transition: filter 0.3s ease;
}
@keyframes shiny-star-1 {
  0%, 100% {
    opacity: 0;
    transform: scale(0.3) rotate(0deg);
  }
  25% {
    opacity: 0.6;
    transform: scale(0.8) rotate(90deg);
  }
  50% {
    opacity: 1;
    transform: scale(1.2) rotate(180deg);
  }
  75% {
    opacity: 0.7;
    transform: scale(0.9) rotate(270deg);
  }
}
@keyframes shiny-star-2 {
  0%, 100% {
    opacity: 0;
    transform: scale(0.4) rotate(45deg);
  }
  30% {
    opacity: 0.8;
    transform: scale(1.1) rotate(135deg);
  }
  60% {
    opacity: 1;
    transform: scale(1.3) rotate(225deg);
  }
  90% {
    opacity: 0.5;
    transform: scale(0.7) rotate(315deg);
  }
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.filtered img {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.grid-item.shiny.filtered img {
  filter: grayscale(100%);
}

.search-wrapper {
  position: relative;
  width: 80%;
  max-width: 400px;
  margin: 0 auto;
}

#search {
  width: 100%;
  margin: 0 auto 10px;
  padding: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

#search-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  list-style: none;
  padding: 0;
  margin: 0;
  margin-top: -4px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 0 0 5px 5px;
  max-height: 200px;
  overflow-y: auto;
}

#search-dropdown .dropdown-item {
  padding: 8px 12px;
  cursor: pointer;
}

#search-dropdown .dropdown-item:hover {
  background-color: #f0f0f0;
}

.selected {
  background-color: #28a745;
  color: white;
}

.modal-content {
  background-color: #1e1e2f;
  color: white;
}

.modal-header,
.modal-footer {
  background-color: #333;
}

.gen-span {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  background-color: #4caf50;
  color: white;
  border: 2px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.gen-span:active {
  transform: scale(0.95);
}

.gen-span:hover {
  background-color: #45a049;
}

.gen-span.selected {
  background-color: #d3d3d3;
  color: #666;
  font-weight: bold;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #960101;
  z-index: 1000;
}

.footer-credits {
  padding: 8px 16px 12px;
  text-align: center;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
}

.footer-credits a {
  color: #ffcc00;
  text-decoration: none;
}

.footer-credits a:hover {
  text-decoration: underline;
}

#filter {
  background-color: #6c757d;
  color: white;
  border: 1px solid #5a6268;
  padding: 10px 20px;
  border-radius: 5px;
}

#filter:hover {
  background-color: #5a6268;
}

.types-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 20px;
}

.type-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.type-item .checkmark {
  display: none;
  position: absolute;
  bottom: 5px;
  right: 5px;
  font-size: 20px;
  color: green;
}

.type-item.selected .checkmark {
  display: block;
}

.type-image {
  width: 60px;
  height: 60px;
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.type-item:hover .type-image {
  transform: scale(1.1);
}

.type-item p {
  font-size: 14px;
  font-weight: bold;
  margin: 0;
}

.right {
    color: rgb(8 255 0);
}

.wrong {
  color: rgb(28 0 6);
}
