/* --- System select wrapper --- */
.system-select-wrap {
  text-align: center;
  margin-bottom: 12px;
  position: relative;
}

/* custom select (coerente com tema) */
.system-select {
  appearance: none;
  -webkit-appearance: none;
  padding: 8px 40px 8px 12px;
  font-size: 0.95rem;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.12));
  color: #fff;
  min-width: 180px;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,0.55);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}

/* arrow icon at right */
.system-select {
  background-image:
    radial-gradient(circle at 90% 50%, rgba(255,152,0,0.07), transparent 20%),
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12"><polygon points="0,0 12,0 6,7" fill="%23ffffff" opacity="0.85"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
}

/* focused state */
.system-select:focus {
  outline: none;
  border-color: rgba(0,229,255,0.6);
  box-shadow: 0 6px 30px rgba(0,229,255,0.06);
  transform: translateY(-1px);
}

/* option classes (limited control) */
.system-option {
  /* NOTE: many browsers ignore option background/color styles */
  background: #081226;
  color: #fff;
}

/* fallback: custom dropdown on some browsers could be necessary for full control.
   For now, this keeps appearance consistent where supported. */

/* counter inside wrapper */
.games-counter {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  margin-top: 8px;
  font-size: 0.85rem;
  text-align: center;
}

/* --- games grid & cards --- */
.games-grid {
    padding: 9px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    justify-items: center;
}

/* card */
.game-container {
  width: 100%;
  max-width: 220px;
  border-radius: 9px;
  background: linear-gradient(145deg, rgba(6,15,36,0.96), rgba(8,23,52,0.96));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: visible;
  transition: transform .12s ease, box-shadow .12s ease;
}

.game-container:hover {
  transform: translateY(-6px);
  border-color: rgba(255,152,0,0.35);
  box-shadow: 0 18px 36px rgba(0,0,0,0.6);
}

/* button wrapper for image */
.game-cover-btn {
  display:block;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}

.game-cover-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(0,229,255,0.08); }

/* image */
.covers {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
  border-radius: 9px;
  border: 1px solid rgba(255,255,255,0.04);
  transition: transform .22s cubic-bezier(.2,.9,.35,1), filter .18s ease;
}

.game-cover-btn:hover .covers {
  transform: scale(1.03);
  filter: saturate(1.05) contrast(1.02);
}

/* name overlay */
.game-name {
  position: absolute;
  bottom: 9px;
  left: 9px;
  right: 9px;
  padding: 9px;
  background: rgba(0, 0, 0, 0.81);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 0.9rem;
  text-align: center;
  border-radius: 9px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .18s ease, transform .22s ease;
  pointer-events: none;
}

/* mobile: show names always */
@media (max-width: 480px) {
  .game-name { opacity: 1; transform: translateY(0); position: static; background: transparent; padding: 0; }
  .covers { height: 140px; }
}

/* small screens adjustments */
@media (max-width: 720px) {
  .game-container { max-width: 180px; }
  .covers { height: 130px; }
  .system-select { min-width: 150px; }
}
