/* ALIGN SPECIFIC */
.lobby { align-items: center; justify-content: center; }
.lobby__box {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; display: flex; flex-direction: column; gap: 1.25rem;
  box-shadow: var(--card-shadow);
}
.lobby__box h2 {
  font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; letter-spacing: 0.05em; text-align: center; margin-bottom: 0.5rem;
}
.lobby__actions { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 0.5rem; }
.lobby__hint { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim); text-align: center; margin-top: 1rem; opacity: 0.6; }

/* Game */
.game { max-width: 1200px; margin-inline: auto; width: 100%; gap: 2rem; }
.game__header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.game__room-info { display: flex; align-items: center; gap: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; border-radius: var(--radius); border: 1px solid var(--border); }
.game__label { font-family: var(--font-mono); font-size: 0.65rem; color: var(--text-dim); font-weight: 700; }
.game__code { font-family: var(--font-mono); font-size: 1rem; font-weight: 700; color: var(--orange); }
.game__host-controls { display: flex; gap: 0.5rem; }

.game__table {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  min-height: 250px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.game__players {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

/* Player Card */
.player-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.player-slot__card {
  width: 60px;
  height: 90px;
  background: var(--surface2);
  border: var(--card-border);
  border-radius: calc(var(--radius) * 1.5);
  box-shadow: var(--card-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.player-slot__card--hidden {
  background: repeating-linear-gradient(45deg, var(--surface2), var(--surface2) 10px, var(--border) 10px, var(--border) 20px);
  color: transparent;
}
.player-slot__card--empty {
  border: 1px dashed var(--border-s);
  background: transparent;
}
.player-slot__name {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  max-width: 80px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game__result {
  display: flex; align-items: center; gap: 0.5rem; background: var(--bg); border: 1px solid var(--orange); padding: 0.5rem 1.5rem; border-radius: 100px;
}
.game__result-label { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700; color: var(--orange); }
.game__result-val { font-size: 1.5rem; font-family: var(--font-display); font-weight: 900; }

/* Deck */
.game__deck {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.align-card {
  width: 50px; height: 75px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-bottom-width: 4px; /* Defined button look */
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
  cursor: pointer; transition: all 0.1s var(--ease);
  color: var(--text);
}
.align-card:hover { transform: translateY(-2px); border-color: var(--text-dim); background: var(--surface2); }
.align-card:active { transform: translateY(2px); border-bottom-width: 2px; }
.align-card--selected { transform: translateY(-4px); border-color: var(--orange); color: var(--orange); box-shadow: 0 4px 12px rgba(255, 107, 0, 0.2); }

/* Topic Input */
.game__topic-container {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
}
.game__topic-input {
  background: transparent;
  border: none;
  border-bottom: 2px dashed var(--border);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  text-align: center;
  width: 100%;
  max-width: 300px;
  padding: 0.25rem;
  transition: all 0.2s var(--ease);
}
.game__topic-input:focus {
  outline: none;
  border-bottom-color: var(--orange);
}
.game__topic-input[readonly] {
  border-bottom-color: transparent;
  pointer-events: none;
}

/* Toast */
.toast {
  position: fixed; bottom: 2rem; left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--bg); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700; padding: 0.75rem 1.5rem; border-radius: 100px; z-index: 1000; animation: toastIn 0.3s var(--ease);
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 768px) {
  .topbar { padding: 0.5rem 1rem; }

  .cleaner-main, .converter-main, .keeper-main, .align-main { padding: 1rem; }
  .cleaner-box, .converter-box, .keeper-box { padding: 1.5rem; width: 100%; box-sizing: border-box; }

  .game { gap: 1rem; padding: 1rem; box-sizing: border-box; }
  .game__header { flex-direction: column; align-items: stretch; }
  .game__room-info { justify-content: space-between; }
  .game__topic-container { margin: 1rem 0; }
  .game__table { padding: 1rem; }
  .game__deck { padding: 1rem; }
  .lobby__box { padding: 1.5rem; }
}
