/* ==========================================================================
   Y1 Game — Game library
     01 · Control bar (tabs, search & sort)
     02 · Category tabs
     03 · Results
     04 · Empty state
     05 · Slot guide cards
     06 · Term glossary
   ========================================================================== */


/* ==========================================================================
   01 · CONTROL BAR
   ========================================================================== */

.lobby-bar {
  position: sticky;
  top: 66px;
  z-index: var(--z-sticky);
  padding-block: 0.85rem;
  background: rgba(10, 9, 8, 0.88);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-gold-faint);
}

.lobby-bar__inner {
  display: grid;
  gap: 0.7rem;
}
@media (min-width: 1040px) {
  .lobby-bar__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1.25rem;
  }
}

.lobby-tools {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}


/* ==========================================================================
   02 · CATEGORY TABS
   ========================================================================== */

.tabs {
  position: relative;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 0.4rem;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  position: relative;
  flex-shrink: 0;
  padding: 0.55rem 0.95rem;
  border-radius: var(--r-sm);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color var(--t-fast) linear, background-color var(--t-fast) linear;
}
.tab:hover { color: var(--ink); background: rgba(212, 175, 55, 0.12); }
.tab.is-active { color: var(--ink); }
.tab span {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.64rem;
  color: var(--gold);
}

/* The indicator that slides between active tabs */
.tabs__ind {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--ruby));
  transition: transform 420ms var(--ease-out), width 420ms var(--ease-out);
  pointer-events: none;
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 480px;
}
.search svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--gold);
  pointer-events: none;
}
.search input {
  width: 100%;
  padding: 0.7rem 2.4rem 0.7rem 2.5rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-gold);
  background: var(--surface-lift);
  color: var(--ink);
  font-size: 0.88rem;
  transition: border-color var(--t-fast) linear, box-shadow var(--t-fast) linear;
}
.search input::placeholder { color: var(--ink-faint); }
.search input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}
.search__clear {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: var(--ink-soft);
  font-size: 0.8rem;
}
.search__clear:hover { background: rgba(212, 175, 55, 0.16); color: var(--gold); }
.search.has-value .search__clear { display: grid; }

.sort {
  position: relative;
  flex-shrink: 0;
}
.sort select {
  appearance: none;
  -webkit-appearance: none;
  padding: 0.7rem 2.3rem 0.7rem 1rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-gold);
  background: var(--surface-lift);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
}
.sort::after {
  content: '';
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -5px;
  border-right: 1.5px solid var(--gold);
  border-bottom: 1.5px solid var(--gold);
  transform: rotate(45deg);
  pointer-events: none;
}

.lobby-bar__cta { flex-shrink: 0; }
@media (max-width: 560px) { .lobby-bar__cta { display: none; } }


/* ==========================================================================
   03 · RESULTS
   ========================================================================== */

.lobby-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: var(--sp-5);
}
.lobby-meta h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
}
.lobby-meta p {
  font-size: var(--fs-xs);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.lobby-meta b { color: var(--gold); font-weight: 800; }

/* Cards hidden by the filter */
.gcard.is-out { display: none; }

/* Cards entering after a filter change */
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.gcard.is-fresh { animation: cardIn 460ms var(--ease-out) both; }
@media (prefers-reduced-motion: reduce) { .gcard.is-fresh { animation: none; } }


/* ==========================================================================
   04 · EMPTY STATE
   ========================================================================== */

.empty {
  display: none;
  place-items: center;
  gap: var(--sp-4);
  text-align: center;
  padding: clamp(3rem, 2rem + 4vw, 5rem) 1rem;
  border-radius: var(--r-lg);
  background: var(--surface-lift);
  box-shadow: inset 0 0 0 1px var(--line-gold-faint);
}
.empty.is-shown { display: grid; }
.empty__glyph {
  font-family: var(--font-display);
  font-size: 3.4rem;
  color: var(--gold);
  line-height: 1;
}
.empty p { max-width: 46ch; font-size: var(--fs-sm); }


/* ==========================================================================
   05 · SLOT GUIDE CARDS
   ========================================================================== */

.guide-grid {
  display: grid;
  gap: clamp(1rem, 0.6rem + 1.2vw, 1.6rem);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guide-grid { grid-template-columns: repeat(3, 1fr); } }

.guide-card h3 { font-family: var(--font-body); font-size: 1.04rem; font-weight: 800; letter-spacing: 0; margin-bottom: 0.55rem; }
.guide-card p { font-size: var(--fs-sm); line-height: 1.7; }
.guide-card .fine { margin-top: 0.6rem; }


/* ==========================================================================
   06 · TERM GLOSSARY
   ========================================================================== */

.glossary {
  display: grid;
  gap: 1px;
  background: var(--line-gold-faint);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.glossary__row {
  display: grid;
  gap: 0.25rem 1.5rem;
  padding: clamp(1.1rem, 0.8rem + 1vw, 1.5rem);
  background: var(--surface-lift);
}
@media (min-width: 760px) {
  .glossary__row { grid-template-columns: 13rem 1fr; align-items: baseline; }
}
.glossary__row dt {
  font-family: var(--font-display);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--gold-bright);
}
.glossary__row dd { font-size: var(--fs-sm); line-height: 1.68; color: var(--ink-muted); }
