/* Color Stroop — sub-game styles
 * Spec:
 *   docs/PRD.md §11.2.4 (aspect-ratio: 1/1 letterbox)
 *   docs/Visual-Guidelines.md §5 (touch lockout rules)
 *   docs/Constraints.md (44x44px targets, no zoom, no user-select)
 */

* {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  background: hsl(222, 24%, 7%);
  color: hsl(210, 40%, 98%);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  overflow: hidden;
}

.cs-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cs-stage {
  width: min(100%, 600px);
  aspect-ratio: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  background: hsl(223, 20%, 12%);
  border: 1px solid hsl(223, 14%, 20%);
  border-radius: 12px;
}

.cs-header {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.cs-status {
  font-size: 1rem;
  color: hsl(210, 40%, 98%);
  min-height: 24px;
  text-align: center;
  font-weight: 500;
}

.cs-score-row {
  display: flex;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: hsl(215, 15%, 70%);
}

.cs-frame {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: hsl(222, 24%, 7%);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid hsl(223, 14%, 20%);
  padding: 1.5rem;
}

.cs-card {
  width: 100%;
  height: 100%;
  max-width: 320px;
  max-height: 180px;
  background: hsl(223, 20%, 12%);
  border: 2px solid hsl(223, 14%, 20%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out;
}

/* Feedback states for correct/incorrect clicks */
.cs-card--correct {
  border-color: hsl(145, 100%, 55%);
  box-shadow: 0 0 15px hsla(145, 100%, 55%, 0.3);
}

.cs-card--wrong {
  border-color: hsl(355, 100%, 65%);
  box-shadow: 0 0 15px hsla(355, 100%, 65%, 0.3);
}

.cs-word {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: 2px;
  text-align: center;
  text-shadow: 0 0 12px currentColor;
  transition: color 0.1s ease-out;
}

.cs-timer-track {
  width: 100%;
  height: 6px;
  background: hsl(223, 14%, 20%);
  border-radius: 3px;
  overflow: hidden;
}

.cs-timer-bar {
  height: 100%;
  width: 100%;
  background: hsl(180, 100%, 50%);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.6);
  border-radius: 3px;
  transform-origin: left;
}

.cs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.cs-color-btn {
  min-height: 52px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  touch-action: none;
  background: hsl(223, 20%, 12%);
  transition: transform 0.1s ease, filter 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border: 2px solid hsl(223, 14%, 20%);
}

.cs-color-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* Color themed borders and shadows on active options */
.cs-color-btn--red {
  color: hsl(355, 100%, 65%);
  border-color: hsla(355, 100%, 65%, 0.4);
}
.cs-color-btn--red:not(:disabled):hover {
  border-color: hsl(355, 100%, 65%);
  box-shadow: 0 0 10px hsla(355, 100%, 65%, 0.25);
  transform: translateY(-2px);
}

.cs-color-btn--blue {
  color: hsl(210, 100%, 65%);
  border-color: hsla(210, 100%, 65%, 0.4);
}
.cs-color-btn--blue:not(:disabled):hover {
  border-color: hsl(210, 100%, 65%);
  box-shadow: 0 0 10px hsla(210, 100%, 65%, 0.25);
  transform: translateY(-2px);
}

.cs-color-btn--green {
  color: hsl(145, 100%, 55%);
  border-color: hsla(145, 100%, 55%, 0.4);
}
.cs-color-btn--green:not(:disabled):hover {
  border-color: hsl(145, 100%, 55%);
  box-shadow: 0 0 10px hsla(145, 100%, 55%, 0.25);
  transform: translateY(-2px);
}

.cs-color-btn--yellow {
  color: hsl(45, 100%, 55%);
  border-color: hsla(45, 100%, 55%, 0.4);
}
.cs-color-btn--yellow:not(:disabled):hover {
  border-color: hsl(45, 100%, 55%);
  box-shadow: 0 0 10px hsla(45, 100%, 55%, 0.25);
  transform: translateY(-2px);
}

.cs-color-btn:not(:disabled):active {
  transform: scale(0.96) !important;
}

.cs-controls {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.cs-btn {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 1rem;
  background: transparent;
  color: hsl(210, 40%, 98%);
  border: 1px solid hsl(223, 14%, 20%);
  border-radius: 8px;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color 0.2s ease-out, color 0.2s ease-out, background 0.2s ease-out;
}

.cs-btn:hover, .cs-btn:focus-visible {
  outline: 2px dashed hsl(180, 100%, 50%);
  outline-offset: 2px;
}

.cs-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cs-btn--primary {
  background: hsl(222, 24%, 7%);
  border-color: hsl(180, 100%, 50%);
  color: hsl(180, 100%, 50%);
  box-shadow: 0 0 8px rgba(0, 229, 255, 0.4);
}
