/* ═══════════════════════════════════════════════════════════════
   81-IDUM — Ta'limiy O'yinlar (Davra Books API + Embed)
   Light & Dark mode tokens inherited from style.css
   ═══════════════════════════════════════════════════════════════ */

.games-page {
  padding: 2rem 0 4.5rem;
}

.games-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.games-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--primary-2, #60a5fa));
  color: #ffffff !important;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.games-create-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(59, 130, 246, 0.38);
  filter: brightness(1.04);
}

.games-create-btn--secondary {
  background: var(--card-bg);
  color: var(--text) !important;
  border: 1px solid var(--border);
  box-shadow: none;
}

.games-create-btn--secondary:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.games-create-note {
  margin-top: 0.75rem;
  font-size: 0.84rem;
  color: var(--muted);
  max-width: 42rem;
}

/* ─── Subject / Fan Filter Bar ─── */
.games-subjects-wrap {
  margin-bottom: 1.35rem;
}

.games-subjects-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.games-subject-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.games-subject-chip:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  background: var(--card-hover-bg);
}

.games-subject-chip.is-active {
  background: linear-gradient(135deg, var(--primary, #3b82f6), var(--primary-2, #60a5fa));
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(59, 130, 246, 0.28);
}

.games-subject-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.45rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(59, 130, 246, 0.14);
  color: var(--primary);
}

.games-subject-chip.is-active .games-subject-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ─── Search & Sort Toolbar ─── */
.games-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  margin-bottom: 1.5rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
}

.games-search-form {
  display: flex;
  flex: 1 1 280px;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.games-search-input-wrap {
  position: relative;
  flex: 1 1 220px;
}

.games-search-input-wrap i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.games-search-input {
  width: 100%;
  height: 42px;
  padding: 0 0.9rem 0 2.45rem;
  border-radius: 11px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.games-search-input:focus {
  border-color: var(--input-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.games-sort-select {
  height: 42px;
  padding: 0 0.85rem;
  border-radius: 11px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}

.games-search-btn {
  height: 42px;
  padding: 0 1.1rem;
  border-radius: 11px;
  border: 0;
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: filter 0.2s ease;
}

.games-search-btn:hover {
  filter: brightness(1.08);
}

.games-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.games-reset-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.games-reset-link:hover {
  text-decoration: underline;
}

/* ─── Games Grid & Davra Books Animated Themes ─── */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.35rem;
}

.game-card {
  --gm-1: 20 184 166;
  --gm-2: 99 102 241;
  --gm-3: 34 211 238;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.28s ease;
  animation: gmCardEnter 0.42s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(min(var(--card-i, 0), 11) * 42ms);
}

.game-card.gm-theme-aurora { --gm-1: 20 184 166; --gm-2: 99 102 241; --gm-3: 34 211 238; }
.game-card.gm-theme-sunset { --gm-1: 249 115 22; --gm-2: 225 29 72; --gm-3: 245 158 11; }
.game-card.gm-theme-ocean  { --gm-1: 14 165 233; --gm-2: 37 99 235; --gm-3: 45 212 191; }
.game-card.gm-theme-galaxy { --gm-1: 139 92 246; --gm-2: 236 72 153; --gm-3: 99 102 241; }
.game-card.gm-theme-forest { --gm-1: 34 197 94; --gm-2: 13 148 136; --gm-3: 132 204 22; }
.game-card.gm-theme-paper  { --gm-1: 217 119 6; --gm-2: 180 83 9; --gm-3: 245 158 11; }

.game-card:hover {
  transform: translateY(-5px);
  border-color: rgb(var(--gm-1) / 0.65);
  box-shadow: 0 22px 44px -18px rgb(var(--gm-1) / 0.55);
}

.game-card-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  display: block;
  text-decoration: none;
  background:
    radial-gradient(90% 120% at 15% 10%, rgb(var(--gm-3) / 0.92), transparent 60%),
    radial-gradient(90% 120% at 90% 90%, rgb(var(--gm-2) / 0.96), transparent 60%),
    linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2)));
}

/* Davra Books dot-grid texture */
.game-card-cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.24;
  background-image: radial-gradient(rgba(255, 255, 255, 0.92) 1.25px, transparent 1.35px);
  background-size: 18px 18px;
  transition: opacity 0.3s ease;
}

/* Shimmer sweep on hover */
.game-card-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.24) 48%, transparent 72%);
  transform: translateX(-125%);
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.game-card:hover .game-card-cover::before {
  opacity: 0.34;
}

.game-card:hover .game-card-cover::after {
  transform: translateX(125%);
}

.game-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-cover img {
  transform: scale(1.05);
}

/* Ambient floating orbs inside cover */
.gm-cover-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

.gm-cover-orb--1 {
  width: 65%;
  aspect-ratio: 1;
  right: -18%;
  top: -32%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.24), transparent 68%);
  animation: gmOrbDrift 9s ease-in-out infinite;
}

.gm-cover-orb--2 {
  width: 52%;
  aspect-ratio: 1;
  left: -12%;
  bottom: -35%;
  background: radial-gradient(circle, rgb(var(--gm-3) / 0.45), transparent 70%);
  animation: gmOrbDrift 12s ease-in-out infinite reverse;
}

/* Subtle twinkling sparkles */
.gm-cover-spark {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.75);
  pointer-events: none;
  z-index: 1;
  animation: gmSparkTwinkle 3.4s ease-in-out infinite;
}

.gm-cover-spark--1 { width: 5px; height: 5px; right: 22%; top: 34%; animation-delay: 0s; }
.gm-cover-spark--2 { width: 4px; height: 4px; right: 34%; bottom: 26%; animation-delay: 1.1s; }
.gm-cover-spark--3 { width: 6px; height: 6px; right: 12%; bottom: 38%; opacity: 0.65; animation-delay: 2.1s; }

/* Signature large template icon (Davra Books style) */
.gm-cover-icon {
  position: absolute;
  left: 1.15rem;
  top: 56%;
  width: 78px;
  height: 78px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.96);
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.28));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.3s ease;
  will-change: transform;
}

.gm-cover-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* Per-template lively animations */
.gm-anim-float .gm-cover-icon svg {
  animation: gmIconFloat 3.6s ease-in-out infinite;
}

.gm-anim-clash .gm-cover-icon svg {
  animation: gmIconClash 3.2s ease-in-out infinite;
}

.gm-anim-meteor .gm-cover-icon svg {
  animation: gmIconMeteor 3.4s ease-in-out infinite;
}

.gm-anim-spin .gm-cover-icon svg {
  animation: gmIconSpin 14s linear infinite;
}

.gm-anim-pulse .gm-cover-icon svg {
  animation: gmIconPulse 2.8s ease-in-out infinite;
}

.gm-anim-tilt .gm-cover-icon svg {
  animation: gmIconTilt 4.2s ease-in-out infinite;
}

.game-card:hover .gm-cover-icon {
  transform: translateY(-54%) rotate(-8deg) scale(1.12);
  filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.36));
}

.game-card.gm-anim-spin:hover .gm-cover-icon svg {
  animation-duration: 3.5s;
}

.game-card-badges {
  position: absolute;
  top: 0.7rem;
  left: 0.7rem;
  right: 0.7rem;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
  pointer-events: none;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: rgba(7, 11, 20, 0.56);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.game-pill-svg {
  display: inline-flex;
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.game-pill-svg svg {
  width: 100%;
  height: 100%;
}

.game-pill--plays i {
  font-size: 0.64rem;
}

.game-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.05rem 1.15rem 1.15rem;
}

.game-card-title {
  margin: 0 0 0.45rem;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-title a {
  color: inherit;
  text-decoration: none;
}

.game-card-title a:hover {
  color: rgb(var(--gm-1));
}

.game-card-desc {
  margin: 0 0 0.85rem;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

/* Colored subject tags + meta chips */
.game-card-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: auto;
  margin-bottom: 0.9rem;
}

.gm-tone-amber   { --tone: 245 158 11; }
.gm-tone-sky     { --tone: 14 165 233; }
.gm-tone-blue    { --tone: 59 130 246; }
.gm-tone-emerald { --tone: 16 185 129; }
.gm-tone-orange  { --tone: 249 115 22; }
.gm-tone-violet  { --tone: 139 92 246; }
.gm-tone-teal    { --tone: 20 184 166; }
.gm-tone-rose    { --tone: 244 63 94; }
.gm-tone-cyan    { --tone: 6 182 212; }
.gm-tone-indigo  { --tone: 99 102 241; }
.gm-tone-lime    { --tone: 132 204 22; }

.gm-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.22rem 0.55rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  color: rgb(var(--tone, 20 184 166));
  background: rgb(var(--tone, 20 184 166) / 0.13);
  border: 1px solid rgb(var(--tone, 20 184 166) / 0.28);
}

:root:not([data-theme='dark']) .gm-tag {
  filter: brightness(0.76) saturate(1.25);
}

.game-card-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.22rem 0.52rem;
  border-radius: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

.game-card-author {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.game-card-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.68rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  background: linear-gradient(135deg, rgb(var(--gm-1)), rgb(var(--gm-2)));
  color: #ffffff !important;
  box-shadow: 0 6px 18px -6px rgb(var(--gm-1) / 0.55);
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card-play-arrow {
  font-size: 0.78rem;
  transition: transform 0.22s ease;
}

.game-card-play:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -6px rgb(var(--gm-1) / 0.7);
}

.game-card-play:hover .game-card-play-arrow {
  transform: translateX(4px);
}

/* ─── Keyframe Animations ─── */
@keyframes gmCardEnter {
  0% { opacity: 0; transform: translateY(14px) scale(0.96); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gmOrbDrift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-10px, 10px, 0) scale(1.1); }
}

@keyframes gmSparkTwinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.75); }
  50% { opacity: 0.95; transform: scale(1.25); }
}

@keyframes gmIconFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-6px) rotate(-3deg); }
}

@keyframes gmIconClash {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-9deg) scale(1.06); }
  50% { transform: rotate(6deg) scale(1.03); }
  75% { transform: rotate(-4deg) scale(1.05); }
}

@keyframes gmIconMeteor {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(6px, -6px) rotate(-6deg) scale(1.06); }
}

@keyframes gmIconSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes gmIconPulse {
  0%, 100% { transform: scale(1); opacity: 0.94; }
  50% { transform: scale(1.09); opacity: 1; }
}

@keyframes gmIconTilt {
  0%, 100% { transform: rotate(-4deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-5px); }
}

@media (prefers-reduced-motion: reduce) {
  .game-card,
  .gm-cover-orb,
  .gm-cover-spark,
  .gm-cover-icon svg {
    animation: none !important;
  }
}

/* ─── Pagination & Empty State ─── */
.games-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.games-page-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border-radius: 11px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
}

.games-page-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.games-page-info {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.games-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  border-radius: 18px;
  background: var(--card-bg);
  border: 1px dashed var(--border);
}

.games-empty i {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.85rem;
}

.games-empty h3 {
  margin: 0 0 0.4rem;
  color: var(--text);
}

.games-empty p {
  margin: 0 auto 1.25rem;
  max-width: 30rem;
  color: var(--muted);
}

.games-powered {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.games-powered a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.games-powered a:hover {
  text-decoration: underline;
}

/* ─── Player Page (games.show) ─── */
.game-play-page {
  padding: 6.5rem 0 4rem;
}

.game-play-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.game-play-crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}

.game-play-crumb:hover {
  text-decoration: underline;
}

.game-play-title {
  margin: 0.35rem 0 0;
  font-size: clamp(1.35rem, 2.5vw, 1.95rem);
  font-weight: 700;
  color: var(--text);
}

.game-play-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.game-play-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  border-radius: 11px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.game-play-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.game-modes-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.game-player-shell {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #060b14;
  box-shadow: var(--shadow);
}

.game-player-frame {
  width: 100%;
  min-height: 680px;
  height: 76vh;
  max-height: 880px;
  border: 0;
  display: block;
}

.game-info-card {
  margin-top: 1.4rem;
  padding: 1.25rem 1.4rem;
  border-radius: 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
}

.game-info-desc {
  flex: 1 1 320px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.94rem;
}

.game-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  align-items: center;
  font-size: 0.86rem;
  color: var(--muted);
}

.game-related-section {
  margin-top: 2.5rem;
}

.game-related-section h2 {
  margin: 0 0 1rem;
  font-size: 1.3rem;
  color: var(--text);
}

@media (max-width: 768px) {
  .games-subjects-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
  }

  .game-play-page {
    padding-top: 5.25rem;
  }

  .game-player-frame {
    min-height: 560px;
    height: 72vh;
  }
}

/* ─── Jamoaviy O'yin (Live PIN Ticket, Filter Chip, Team Room Card) ─── */
.gm-entry-ticket {
  position: relative;
  width: 100%;
  max-width: 390px;
  margin-left: auto;
  padding: 1.35rem 1.4rem 1.25rem;
  border-radius: 20px;
  border: 1px solid rgba(56, 189, 248, 0.28);
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(14, 165, 233, 0.22), transparent 55%),
    radial-gradient(90% 90% at 0% 100%, rgba(20, 184, 166, 0.18), transparent 55%),
    rgba(10, 18, 34, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 24px 48px -20px rgba(2, 132, 199, 0.45);
  overflow: hidden;
  text-align: left;
  color: #f1f5f9;
}

.gm-entry-tiles {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  display: grid;
  grid-template-columns: repeat(2, 24px);
  gap: 5px;
  opacity: 0.28;
  pointer-events: none;
}

.gm-entry-tiles span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #ffffff;
  background: rgba(56, 189, 248, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.gm-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.68rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #34d399;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.32);
  margin-bottom: 0.65rem;
}

.gm-live-badge i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7);
  animation: gmLivePulse 1.8s infinite;
}

@keyframes gmLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.7); }
  70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.gm-entry-label {
  display: block;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.25rem;
}

.gm-entry-hint {
  margin: 0 0 0.9rem;
  font-size: 0.84rem;
  line-height: 1.45;
  color: #cbd5e1;
}

.gm-entry-action {
  display: flex;
  gap: 0.55rem;
  align-items: stretch;
}

.gm-entry-action input {
  flex: 1 1 0;
  min-width: 0;
  height: 46px;
  padding: 0 0.85rem;
  border-radius: 12px;
  border: 1.5px solid rgba(56, 189, 248, 0.32);
  background: rgba(6, 11, 20, 0.72);
  color: #ffffff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-align: center;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gm-entry-action input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}

.gm-entry-action input::placeholder {
  color: rgba(148, 163, 184, 0.6);
  letter-spacing: 0.25em;
}

.gm-entry-action button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  height: 46px;
  padding: 0 1.15rem;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px -6px rgba(14, 165, 233, 0.55);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.gm-entry-action button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.gm-entry-host {
  margin: 0.85rem 0 0;
  font-size: 0.82rem;
  color: #94a3b8;
}

.gm-entry-host a {
  color: #38bdf8;
  font-weight: 700;
  text-decoration: none;
}

.gm-entry-host a:hover {
  text-decoration: underline;
}

.games-team-chip {
  border-color: rgba(6, 182, 212, 0.42);
  color: #0891b2;
  background: rgba(6, 182, 212, 0.08);
}

:root[data-theme='dark'] .games-team-chip {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.12);
}

.games-team-chip.is-active {
  background: linear-gradient(135deg, #06b6d4, #0ea5e9);
  color: #ffffff !important;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.35);
}

.gm-tag--team {
  --tone: 6 182 212;
  color: #0891b2;
  background: rgba(6, 182, 212, 0.12);
  border-color: rgba(6, 182, 212, 0.3);
}

:root[data-theme='dark'] .gm-tag--team {
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(34, 211, 238, 0.3);
}

.game-play-btn--team {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.16), rgba(14, 165, 233, 0.18));
  border-color: rgba(20, 184, 166, 0.45);
  color: #0d9488;
}

:root[data-theme='dark'] .game-play-btn--team {
  color: #2dd4bf;
}

.game-play-btn--team:hover {
  border-color: #14b8a6;
  color: #14b8a6;
}

.game-team-card {
  margin-top: 1.4rem;
  padding: 1.5rem 1.6rem;
  border-radius: 18px;
  border: 1px solid rgba(20, 184, 166, 0.32);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(20, 184, 166, 0.14), transparent 55%),
    radial-gradient(90% 120% at 100% 100%, rgba(14, 165, 233, 0.14), transparent 55%),
    var(--card-bg);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(260px, 0.95fr);
  gap: 1.5rem;
  align-items: center;
  scroll-margin-top: 110px;
}

.game-team-info h2 {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--text);
}

.game-team-info p {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.game-team-host-btn {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9) !important;
  box-shadow: 0 10px 24px -8px rgba(20, 184, 166, 0.55) !important;
}

.game-team-join-box {
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #f1f5f9;
}

:root:not([data-theme='dark']) .game-team-join-box {
  background: #0f172a;
}

@media (max-width: 900px) {
  .gm-entry-ticket {
    margin: 1rem auto 0;
    max-width: 100%;
  }

  .game-team-card {
    grid-template-columns: 1fr;
    padding: 1.2rem;
  }
}

@media (max-width: 420px) {
  .gm-entry-action {
    flex-direction: column;
  }

  .gm-entry-action button {
    width: 100%;
  }
}
