.page-games {
  min-height: 100vh;
  background: linear-gradient(150deg, #f7f2ee 0%, #f1e8dc 45%, #e7d8c4 100%);
  padding: 5rem 0;
  display: flex;
  flex-direction: column;
}

body[data-theme="white-glass"].page-games {
  background: linear-gradient(150deg, #f7fbff 0%, #eef6ff 45%, #e2edf9 100%);
}

body[data-theme="dark-glass"].page-games {
  background: linear-gradient(150deg, #0f151c 0%, #121d29 45%, #102430 100%);
}

body[data-theme="dark-glass"].page-games .hero-status {
  color: rgba(230, 238, 247, 0.72);
}

body[data-theme="cyan-portal"].page-games {
  background: linear-gradient(150deg, #071a24 0%, #0b2734 45%, #0f3a4c 100%);
}

body[data-theme="cyan-portal"].page-games .hero-status {
  color: rgba(232, 251, 255, 0.74);
}

body[data-theme="onyx-black"].page-games {
  background: linear-gradient(150deg, #06090d 0%, #0b1017 45%, #101723 100%);
  color: #f1f5fb;
}

body[data-theme="onyx-black"].page-games .hero-status {
  color: rgba(241, 245, 251, 0.74);
}

body[data-theme="jungle-green"].page-games {
  background: linear-gradient(150deg, #0a1a13 0%, #0f271c 45%, #173926 100%);
  color: #e8fff2;
}

body[data-theme="jungle-green"].page-games .hero-status {
  color: rgba(232, 255, 242, 0.76);
}

body[data-theme="sunset-glow"].page-games {
  background: linear-gradient(150deg, #fff7ef 0%, #ffeedd 45%, #ffd8c1 100%);
  color: #2d1e18;
}

body[data-theme="sunset-glow"].page-games .hero-status {
  color: rgba(86, 51, 33, 0.74);
}

.game-page {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 100%;
  padding: 0 clamp(1rem, 5vw, 2.5rem);
  padding-bottom: max(10rem, calc(7.4rem + env(safe-area-inset-bottom)));
}

.games-shell {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.game-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 1.25rem;
  box-shadow: 0 24px 40px rgba(13, 21, 23, 0.15);
  border: 1px solid rgba(13, 21, 23, 0.08);
  gap: 2rem;
}

.hero-text h1 {
  margin: 0.3rem 0;
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  letter-spacing: 0.22em;
}

.hero-text .eyebrow {
  margin: 0;
  letter-spacing: 0.5em;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--saddle, #6e4a2c);
}

.hero-text .author {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: 0.3em;
}

.hero-status {
  min-width: 200px;
  text-align: right;
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(13, 21, 23, 0.6);
}

.games-grid-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.games-grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.games-grid-header h2 {
  margin: 0 0 0.35rem;
}

.game-count {
  background: #10161b;
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
}

.games-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
}

.game-card {
  --card-border: rgba(255, 255, 255, 0.92);
  --card-surface: rgba(255, 255, 255, 0.28);
  --card-shadow: rgba(14, 20, 26, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18));
  border-radius: 1rem;
  border: 1.5px solid var(--card-border);
  box-shadow: 0 10px 24px var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.6rem;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.game-card:hover,
.game-card:focus-within {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(14, 20, 26, 0.2);
  border-color: #fff;
}

.game-card__image {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #f3eee6;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 0.7rem;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 18, 0) 55%, rgba(8, 13, 18, 0.16) 100%);
  pointer-events: none;
}

.game-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  transition: transform 0.35s ease;
}

.game-card:hover .game-card__image img,
.game-card:focus-within .game-card__image img {
  transform: scale(1.02);
}

.game-card__placeholder {
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.game-card__meta-panel {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  max-width: min(82%, 540px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(13, 21, 23, 0.15);
  border-radius: 0.65rem;
  padding: 0.55rem 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  box-shadow: 0 8px 18px rgba(13, 21, 23, 0.17);
  backdrop-filter: blur(6px);
  z-index: 1;
}

.game-card__meta-panel strong {
  font-size: 1.02rem;
  line-height: 1.2;
}

.game-card__meta-panel span {
  font-size: 0.92rem;
  color: rgba(13, 21, 23, 0.82);
}

.game-card__meta-panel small {
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: lowercase;
  color: rgba(13, 21, 23, 0.76);
}

.game-card__play {
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, #0f1a22 0%, #091219 100%);
  color: #fff;
  width: 100%;
  border-radius: 0.7rem;
  padding: 0.82rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  font-size: 0.7rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.game-card__play:hover,
.game-card__play:focus-visible {
  background: linear-gradient(180deg, #12212c 0%, #0b171f 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(7, 13, 18, 0.35);
}

.games-empty {
  padding: 2rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  border: 1px solid rgba(13, 21, 23, 0.08);
}

.game-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 14, 0.85);
  display: flex;
  flex-direction: column;
  padding: 2rem;
  gap: 1rem;
  z-index: 1000;
}

.game-overlay__header-panel {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(10px);
}

.game-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: #fff;
}

.game-overlay__actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.game-overlay__frame {
  flex: 1;
  background: #111;
  border-radius: 1rem;
  overflow: hidden;
}

.game-overlay__frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.embed-auth-gate {
  width: 100%;
  height: 100%;
  display: grid;
  place-content: center;
  gap: 0.75rem;
  text-align: center;
  padding: 2rem;
  color: #f4f8fd;
}

.embed-auth-gate h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.embed-auth-gate p {
  margin: 0;
  color: rgba(244, 248, 253, 0.82);
}

.embed-auth-gate__actions {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.embed-auth-gate__actions button {
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.68rem;
  cursor: pointer;
}

.game-overlay__back {
  background: #fff;
  border: none;
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  cursor: pointer;
}

.game-overlay__fullscreen {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  cursor: pointer;
}

.game-overlay__fullscreen:hover,
.game-overlay__fullscreen:focus-visible {
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 900px) {
  .game-hero {
    flex-direction: column;
    text-align: center;
  }

  .hero-status {
    text-align: center;
  }

  .game-overlay {
    padding: 1rem;
  }

  .game-overlay__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

body[data-theme="white-glass"].page-games .game-hero,
body[data-theme="white-glass"].page-games .games-empty {
  background: rgba(255, 255, 255, 0.74);
  border-color: rgba(94, 126, 160, 0.2);
  box-shadow: 0 20px 34px rgba(72, 99, 130, 0.13);
}

body[data-theme="white-glass"].page-games .game-card {
  --card-border: rgba(255, 255, 255, 0.9);
  --card-surface: rgba(255, 255, 255, 0.42);
  --card-shadow: rgba(59, 85, 116, 0.16);
}

body[data-theme="dark-glass"].page-games {
  color: #e6eef7;
}

body[data-theme="dark-glass"].page-games .game-hero,
body[data-theme="dark-glass"].page-games .games-empty {
  background: rgba(18, 29, 40, 0.86);
  border-color: rgba(128, 160, 193, 0.24);
  box-shadow: 0 24px 38px rgba(4, 10, 16, 0.4);
}

body[data-theme="dark-glass"].page-games .hero-text .author,
body[data-theme="dark-glass"].page-games .games-grid-header p {
  color: rgba(230, 238, 247, 0.74);
}

body[data-theme="dark-glass"].page-games .games-grid-header h2 {
  color: #e6eef7;
}

body[data-theme="dark-glass"].page-games .game-count {
  background: rgba(26, 46, 66, 0.9);
  border: 1px solid rgba(137, 181, 217, 0.3);
}

body[data-theme="dark-glass"].page-games .game-card {
  --card-border: rgba(137, 181, 217, 0.26);
  --card-surface: rgba(21, 33, 47, 0.75);
  --card-shadow: rgba(3, 9, 15, 0.45);
  background: linear-gradient(180deg, rgba(22, 35, 49, 0.78), rgba(15, 24, 34, 0.72));
}

body[data-theme="dark-glass"].page-games .game-card__image {
  background: rgba(11, 19, 27, 0.84);
  border-color: rgba(137, 181, 217, 0.2);
}

body[data-theme="dark-glass"].page-games .game-card__meta-panel {
  background: rgba(16, 27, 39, 0.88);
  border-color: rgba(137, 181, 217, 0.26);
  box-shadow: 0 10px 20px rgba(3, 9, 15, 0.42);
}

body[data-theme="dark-glass"].page-games .game-card__meta-panel span,
body[data-theme="dark-glass"].page-games .game-card__meta-panel small {
  color: rgba(230, 238, 247, 0.8);
}

body[data-theme="cyan-portal"].page-games {
  color: #e8fbff;
}

body[data-theme="cyan-portal"].page-games .game-hero,
body[data-theme="cyan-portal"].page-games .games-empty {
  background: rgba(11, 34, 45, 0.86);
  border-color: rgba(0, 209, 255, 0.24);
  box-shadow: 0 24px 40px rgba(2, 12, 18, 0.45);
}

body[data-theme="cyan-portal"].page-games .hero-text .author,
body[data-theme="cyan-portal"].page-games .games-grid-header p {
  color: rgba(226, 250, 255, 0.78);
}

body[data-theme="cyan-portal"].page-games .games-grid-header h2 {
  color: #e8fbff;
}

body[data-theme="cyan-portal"].page-games .game-count {
  background: rgba(0, 175, 175, 0.22);
  border: 1px solid rgba(0, 209, 255, 0.4);
}

body[data-theme="cyan-portal"].page-games .game-card {
  --card-border: rgba(0, 209, 255, 0.26);
  --card-surface: rgba(14, 45, 60, 0.74);
  --card-shadow: rgba(2, 10, 14, 0.48);
  background: linear-gradient(180deg, rgba(15, 46, 62, 0.78), rgba(10, 34, 47, 0.72));
}

body[data-theme="cyan-portal"].page-games .game-card__image {
  background: rgba(8, 28, 37, 0.84);
  border-color: rgba(0, 209, 255, 0.24);
}

body[data-theme="cyan-portal"].page-games .game-card__meta-panel {
  background: rgba(8, 31, 42, 0.88);
  border-color: rgba(0, 209, 255, 0.3);
  box-shadow: 0 10px 22px rgba(2, 10, 14, 0.5);
}

body[data-theme="cyan-portal"].page-games .game-card__meta-panel span,
body[data-theme="cyan-portal"].page-games .game-card__meta-panel small {
  color: rgba(228, 251, 255, 0.82);
}

body[data-theme="onyx-black"].page-games .game-hero,
body[data-theme="onyx-black"].page-games .games-empty {
  background: rgba(16, 25, 36, 0.88);
  border-color: rgba(164, 182, 205, 0.24);
  box-shadow: 0 24px 38px rgba(1, 4, 8, 0.48);
}

body[data-theme="onyx-black"].page-games .hero-text .author,
body[data-theme="onyx-black"].page-games .games-grid-header p {
  color: rgba(226, 235, 247, 0.76);
}

body[data-theme="onyx-black"].page-games .games-grid-header h2 {
  color: #f1f5fb;
}

body[data-theme="onyx-black"].page-games .game-count {
  background: rgba(29, 45, 64, 0.92);
  border: 1px solid rgba(181, 197, 216, 0.28);
}

body[data-theme="onyx-black"].page-games .game-card {
  --card-border: rgba(164, 182, 205, 0.28);
  --card-surface: rgba(17, 28, 40, 0.78);
  --card-shadow: rgba(1, 4, 8, 0.5);
  background: linear-gradient(180deg, rgba(20, 31, 44, 0.82), rgba(14, 22, 32, 0.76));
}

body[data-theme="onyx-black"].page-games .game-card__image {
  background: rgba(11, 17, 26, 0.86);
  border-color: rgba(164, 182, 205, 0.22);
}

body[data-theme="onyx-black"].page-games .game-card__meta-panel {
  background: rgba(15, 24, 36, 0.9);
  border-color: rgba(164, 182, 205, 0.28);
  box-shadow: 0 10px 20px rgba(1, 4, 8, 0.48);
}

body[data-theme="onyx-black"].page-games .game-card__meta-panel strong,
body[data-theme="onyx-black"].page-games .game-card__meta-panel span,
body[data-theme="onyx-black"].page-games .game-card__meta-panel small {
  color: rgba(238, 245, 252, 0.9);
}

body[data-theme="jungle-green"].page-games .game-hero,
body[data-theme="jungle-green"].page-games .games-empty {
  background: rgba(14, 43, 30, 0.88);
  border-color: rgba(115, 204, 156, 0.24);
  box-shadow: 0 24px 38px rgba(2, 12, 8, 0.45);
}

body[data-theme="jungle-green"].page-games .hero-text .author,
body[data-theme="jungle-green"].page-games .games-grid-header p {
  color: rgba(214, 247, 229, 0.78);
}

body[data-theme="jungle-green"].page-games .games-grid-header h2 {
  color: #e8fff2;
}

body[data-theme="jungle-green"].page-games .game-count {
  background: rgba(36, 93, 64, 0.86);
  border: 1px solid rgba(97, 224, 161, 0.34);
}

body[data-theme="jungle-green"].page-games .game-card {
  --card-border: rgba(97, 224, 161, 0.3);
  --card-surface: rgba(14, 44, 30, 0.78);
  --card-shadow: rgba(2, 12, 8, 0.46);
  background: linear-gradient(180deg, rgba(18, 53, 37, 0.8), rgba(12, 37, 26, 0.76));
}

body[data-theme="jungle-green"].page-games .game-card__image {
  background: rgba(10, 31, 22, 0.84);
  border-color: rgba(97, 224, 161, 0.24);
}

body[data-theme="jungle-green"].page-games .game-card__meta-panel {
  background: rgba(12, 36, 25, 0.9);
  border-color: rgba(97, 224, 161, 0.3);
}

body[data-theme="jungle-green"].page-games .game-card__meta-panel strong,
body[data-theme="jungle-green"].page-games .game-card__meta-panel span,
body[data-theme="jungle-green"].page-games .game-card__meta-panel small {
  color: rgba(232, 255, 242, 0.9);
}

body[data-theme="sunset-glow"].page-games .game-hero,
body[data-theme="sunset-glow"].page-games .games-empty {
  background: rgba(255, 244, 234, 0.9);
  border-color: rgba(182, 98, 58, 0.18);
  box-shadow: 0 20px 34px rgba(145, 77, 38, 0.14);
}

body[data-theme="sunset-glow"].page-games .hero-text .author,
body[data-theme="sunset-glow"].page-games .games-grid-header p {
  color: rgba(86, 51, 33, 0.76);
}

body[data-theme="sunset-glow"].page-games .games-grid-header h2 {
  color: #2d1e18;
}

@media (orientation: landscape) {
  .games-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
