.gamesPage .gamesHero {
  position: relative;
  overflow: hidden;
}

.gamesPage .gamesHero::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 204, 113, 0.24) 0%, rgba(46, 204, 113, 0) 72%);
  pointer-events: none;
}

.gamesTitle {
  margin-top: 12px;
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 950;
  letter-spacing: -0.03em;
  line-height: 1;
}

.modeTabs {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.gameModeTab {
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.gameModeTab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.gameModeTab.is-active {
  color: #ffffff;
  border-color: rgba(66, 153, 225, 0.75);
  background: linear-gradient(160deg, rgba(66, 153, 225, 0.5), rgba(66, 153, 225, 0.25));
  box-shadow: 0 12px 28px rgba(66, 153, 225, 0.22);
}

.gamesLayout {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 14px;
  align-items: start;
}

.gamePanel {
  min-height: 480px;
}

.gameProgressRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gameProgress {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.gameHint {
  font-size: 13px;
  font-weight: 700;
  color: rgba(66, 153, 225, 0.95);
}

.gameAlert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 99, 99, 0.5);
  background: rgba(231, 76, 60, 0.18);
  color: rgba(255, 255, 255, 0.9);
  font-size: 13px;
  font-weight: 600;
}

.searchArea {
  position: relative;
}

.gameSearchWrap {
  position: relative;
}

.gameSearchInput {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  height: 44px;
  padding: 0 42px 0 12px;
  font-size: 14px;
  font-weight: 600;
  outline: none;
}

.gameSearchInput::placeholder {
  color: rgba(255, 255, 255, 0.56);
}

.gameSearchInput:focus {
  border-color: rgba(66, 153, 225, 0.75);
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.18);
}

.gameSearchIcon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.65);
}

.gameSearchIcon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.searchDropdown {
  margin-top: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 14, 30, 0.98);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  max-height: 300px;
  overflow-y: auto;
}

.searchItem {
  width: 100%;
  border: none;
  background: transparent;
  color: inherit;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 56px 24px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.14s ease;
}

.searchItem:hover {
  background: rgba(66, 153, 225, 0.2);
}

.searchAvatar,
.searchClubLogo {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.searchAvatarWrap {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.searchName {
  font-size: 13px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.95);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.searchMeta {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  font-weight: 700;
}

.searchPos {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.68);
  text-align: right;
  font-weight: 700;
}

.searchEmpty {
  padding: 10px 12px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.attemptsList {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.guessRow {
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
}

.guessHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.guessAttempt {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.62);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 800;
}

.guessName {
  font-size: 12px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.92);
}

.guessTiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.guessTile {
  min-height: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 8px;
}

.guessTile.match {
  border-color: #2ecc71;
  box-shadow: 0 0 18px rgba(46, 204, 113, 0.26);
}

.guessTile.miss {
  border-color: #e74c3c;
}

.tileIcon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.1);
}

.tileValue {
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.96);
}

.tileLabel {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 700;
}

.ratingArrow {
  font-size: 12px;
  line-height: 1;
  color: #e74c3c;
}

.resultBanner {
  margin-top: 14px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 16px;
  min-height: 190px;
}

.resultBanner.win {
  background: linear-gradient(120deg, rgba(47, 128, 237, 0.6), rgba(24, 38, 68, 0.9));
}

.resultBanner.loss {
  background: linear-gradient(120deg, rgba(56, 28, 28, 0.92), rgba(28, 20, 24, 0.95));
  border-color: rgba(231, 76, 60, 0.36);
}

.bannerPortrait {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(42%, 230px);
  overflow: hidden;
  pointer-events: none;
}

.bannerPortraitImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.24;
  display: block;
}

.bannerPortrait.right {
  right: 0;
}

.bannerPortrait.left {
  left: 0;
}

.bannerContent {
  position: relative;
  z-index: 2;
  max-width: 78%;
}

.bannerTitle {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.98);
}

.bannerText {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}

.bannerStat {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.bannerButtons {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.bannerBtn {
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  cursor: pointer;
}

.bannerBtn.primary {
  border-color: rgba(66, 153, 225, 0.7);
  background: rgba(66, 153, 225, 0.42);
}

.gameGuide {
  padding: 20px;
}

.guideTitle {
  font-size: 15px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.92);
}

.guideText {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1040px) {
  .gamesLayout {
    grid-template-columns: 1fr;
  }

  .bannerContent {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  .guessTiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gameProgressRow {
    flex-direction: column;
    align-items: flex-start;
  }
}
