/* Category Guess — Game Anything · tokens: --cg-* */

#cgPlayShell.game-worlds-play-shell {
  min-height: 0;
  box-sizing: border-box;
  background:
    radial-gradient(ellipse 110% 80% at 50% 8%, rgba(251, 191, 36, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(56, 189, 248, 0.07) 0%, transparent 50%),
    linear-gradient(165deg, #05070c 0%, #0c1118 42%, #080b10 100%);
}

#cgPlayShell.game-worlds-play-shell:not([data-cg-sized]) {
  height: 0;
  min-height: 0;
  max-height: none;
  overflow: hidden;
}

.cg-outer-shell {
  width: 100%;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

:root {
  --cg-panel: rgba(15, 23, 42, 0.78);
  --cg-border: rgba(251, 191, 36, 0.22);
  --cg-text: #f1f5f9;
  --cg-muted: #94a3b8;
  --cg-accent: #fbbf24;
  --cg-radius: 18px;
  --cg-font: "Outfit", "DM Sans", system-ui, sans-serif;
}

.ga-casual-scope.cg-app {
  --cg-panel: var(--ga-surface);
  --cg-border: var(--ga-border);
  --cg-text: var(--ga-text);
  --cg-muted: var(--ga-muted);
  --ga-accent-game: #fbbf24;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body.cg-standalone {
  margin: 0;
  min-height: 100%;
  font-family: var(--cg-font);
  color: var(--cg-text);
  background: #000;
  -webkit-tap-highlight-color: transparent;
}

.cg-app {
  position: relative;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: max(14px, env(safe-area-inset-top)) clamp(18px, 5vw, 30px)
    max(30px, env(safe-area-inset-bottom));
  font-family: var(--cg-font);
  color: var(--cg-text);
}

#cgPlayShell .cg-app.cg-gw {
  align-items: stretch;
  padding: clamp(0.5rem, 2vw, 0.8rem) clamp(0.6rem, 2.2vw, 1rem);
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.cg-screen {
  width: min(960px, 100%);
  flex: 1 1 auto;
  min-height: 0;
  display: none;
  justify-content: center;
  align-items: center;
}

.cg-screen.cg-screen-active {
  display: flex;
  flex-direction: column;
}

.cg-screen-play.cg-screen-active {
  align-items: stretch;
  justify-content: flex-start;
  width: 100%;
}

#cgPlayShell .cg-screen-play.cg-screen-active {
  flex: 1 1 auto;
  min-height: 0;
  max-width: none;
}

#cgPlayShell .cg-screen-play.cg-screen-active .cg-play {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
}

#cg-screen-menu.cg-screen,
#cg-screen-difficulty.cg-screen,
#cg-screen-how.cg-screen {
  width: 100%;
  max-width: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#cg-screen-menu .cg-panel,
#cg-screen-difficulty .cg-panel,
#cg-screen-how .cg-panel {
  width: min(var(--ga-puzzle-menu-max), 100%);
  max-width: min(var(--ga-puzzle-menu-max), 100%);
  margin-inline: auto;
}

.cg-screen.cg-screen-active .cg-panel {
  animation: cg-panel-in 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cg-panel-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-screen.cg-screen-active .cg-panel {
    animation: none;
  }
}

.cg-panel {
  width: min(520px, 100%);
  padding: clamp(22px, 4.5vw, 34px) clamp(20px, 4vw, 30px);
  border-radius: var(--cg-radius);
  background: var(--cg-panel);
  border: 1px solid var(--cg-border);
  box-shadow: 0 24px 56px rgba(2, 6, 23, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.cg-panel h1,
.cg-panel h2 {
  margin: 0 0 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cg-panel h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  background: linear-gradient(102deg, #f8fafc 0%, #fbbf24 45%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.cg-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #fbbf24;
}

.cg-lead {
  margin: 0 0 20px;
  line-height: 1.55;
  color: var(--cg-muted);
  font-size: 0.98rem;
}

.cg-muted {
  color: var(--cg-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

.cg-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 12px;
}

.cg-btn {
  border: 1px solid var(--cg-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cg-text);
  font: inherit;
  font-weight: 600;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.cg-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

.cg-btn:active {
  transform: scale(0.98);
}

.cg-btn:disabled {
  opacity: 0.45;
  cursor: default;
  transform: none;
}

.cg-btn-primary {
  border-color: rgba(251, 191, 36, 0.45);
  background: linear-gradient(135deg, #b45309, #f59e0b 48%, #fbbf24);
  color: #1c1003;
  box-shadow: 0 10px 32px rgba(245, 158, 11, 0.28);
}

.cg-btn-ghost {
  background: transparent;
  margin-top: 8px;
}

.cg-diff-grid {
  display: grid;
  gap: 10px;
  margin: 16px 0 8px;
}

.cg-diff-card {
  text-align: left;
  border: 1px solid var(--cg-border);
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
}

.cg-diff-card:hover {
  border-color: rgba(251, 191, 36, 0.45);
  background: rgba(251, 191, 36, 0.08);
}

.cg-diff-name {
  display: block;
  font-weight: 700;
  margin-bottom: 4px;
}

.cg-diff-meta {
  display: block;
  font-size: 0.88rem;
  color: var(--cg-muted);
}

.cg-list {
  margin: 0 0 18px;
  padding-left: 1.15rem;
  color: var(--cg-muted);
  line-height: 1.55;
}

.cg-list li {
  margin-bottom: 8px;
}

.cg-play {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-height: 0;
}

.cg-play-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.cg-hud-group,

.cg-diff-wrap {
  display: inline-flex;
  align-items: center;
}

.cg-diff-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 30px;
  padding: 4px 28px 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background:
    rgba(15, 23, 42, 0.78)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%94a3b8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  color: var(--cg-muted, #94a3b8);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.cg-diff-select:hover:not(:disabled) {
  border-color: rgba(148, 163, 184, 0.45);
  color: var(--cg-text, #e2e8f0);
}

.cg-diff-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cg-diff-select:focus-visible {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 2px;
}

.cg-diff-select option {
  background: #0f172a;
  color: #e2e8f0;
}

.cg-hud-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.cg-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 23, 42, 0.65);
  font-size: 0.82rem;
  font-weight: 600;
}

.cg-pill-accent {
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}

.cg-tool,
.cg-icon-btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--cg-text);
  font: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
}

.cg-tool:disabled {
  opacity: 0.45;
  cursor: default;
}

.cg-tool-ghost {
  background: transparent;
}

.cg-icon-btn {
  min-width: 36px;
  padding: 6px 8px;
}

.cg-clues-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.cg-clues {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 2px 8px;
}

.cg-clue {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 56px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.55);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.cg-clue-shown {
  border-color: rgba(251, 191, 36, 0.28);
  background: rgba(30, 41, 59, 0.72);
  animation: cg-clue-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.cg-clue-hidden {
  opacity: 0.55;
}

.cg-clue-solved {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(20, 83, 45, 0.35);
}

@keyframes cg-clue-in {
  from {
    opacity: 0.4;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-clue-shown {
    animation: none;
  }
}

.cg-clue-num {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
}

.cg-clue-hidden .cg-clue-num {
  color: var(--cg-muted);
}

.cg-clue-text {
  font-size: clamp(1.05rem, 2.8vw, 1.35rem);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.cg-clue-hidden .cg-clue-text {
  letter-spacing: 0.18em;
  color: var(--cg-muted);
  font-weight: 600;
}

.cg-entry {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(520px, 100%);
  margin: 0 auto;
  align-items: stretch;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.cg-input {
  flex: 1 1 180px;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  background: rgba(2, 6, 23, 0.55);
  color: var(--cg-text);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 10px 14px;
  outline: none;
}

.cg-input:focus {
  border-color: rgba(251, 191, 36, 0.55);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.15);
}

.cg-reveal-row {
  width: min(520px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.cg-status {
  width: min(520px, 100%);
  margin: 0 auto;
  min-height: 1.4em;
  text-align: center;
  color: var(--cg-muted);
  font-size: 0.92rem;
  flex: 0 0 auto;
  position: relative;
  z-index: 5;
}

.cg-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.cg-overlay[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .cg-clue {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
  }
}

/* Game Worlds: center menu cards in the full play shell */
.game-worlds-body #cgPlayShell #cg-screen-menu.cg-screen-active,
.game-worlds-body #cgPlayShell #cg-screen-difficulty.cg-screen-active,
.game-worlds-body #cgPlayShell #cg-screen-how.cg-screen-active,
.game-worlds-body .game-worlds-play-shell #cg-screen-menu.cg-screen-active,
.game-worlds-body .game-worlds-play-shell #cg-screen-difficulty.cg-screen-active,
.game-worlds-body .game-worlds-play-shell #cg-screen-how.cg-screen-active {
  width: 100%;
  align-items: center;
  justify-content: center;
}
