/* Catcha Engine Styles */

body.catcha {
  --catcha-bg: #0e0e12;
  --catcha-fg: #f5f5f5;
  --catcha-accent: #ff7a00;
  --catcha-accent-soft: #ffb47a;
  --catcha-muted: #8a8a92;
  --catcha-card: #1a1a22;

  background: var(--catcha-bg);
  color: var(--catcha-fg);

  .lobby {
    max-width: 32rem;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;

    h2 {
      font-size: 2.5rem;
      margin-bottom: 0.5rem;
    }
  }

  .lobby-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: stretch;
  }

  .button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--catcha-fg);
    border-radius: 0.5rem;
    background: transparent;
    color: var(--catcha-fg);
    font-size: 1.1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
  }

  .button--primary {
    background: var(--catcha-accent);
    border-color: var(--catcha-accent);
    color: var(--catcha-bg);
  }

  .join {
    max-width: 24rem;
    margin: 4rem auto;
    padding: 2rem;
    text-align: center;
  }

  .join-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
  }

  .code-input {
    font-size: 2.5rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    text-align: center;
    letter-spacing: 0.4rem;
    text-transform: uppercase;
    padding: 0.5rem;
    border: 2px solid var(--catcha-muted);
    border-radius: 0.5rem;
    background: var(--catcha-card);
    color: var(--catcha-fg);
  }

  .cat-screen {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .cat-header {
    padding: 1rem;
    text-align: center;
    flex: 0 0 auto;

    .hint {
      color: var(--catcha-muted);
      margin: 0;
    }

    .code {
      font-family: ui-monospace, "SF Mono", Menlo, monospace;
      font-size: clamp(3rem, 12vw, 6rem);
      letter-spacing: 0.5rem;
      margin: 0.25rem 0;
      color: var(--catcha-accent);
    }

    .status {
      color: var(--catcha-muted);
      margin: 0;
      font-size: 0.9rem;
    }
  }

  .cat-stage {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;

    .counter {
      color: var(--catcha-muted);
      font-size: 0.9rem;
      margin: 0;
    }
  }

  .tap-target {
    width: clamp(8rem, 30vw, 12rem);
    height: clamp(8rem, 30vw, 12rem);
    border-radius: 50%;
    border: none;
    background: var(--catcha-accent);
    color: var(--catcha-bg);
    font-size: 1.25rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.05s ease-out;

    &:active {
      transform: scale(0.92);
    }
  }

  .flash-anim {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at center, var(--catcha-accent-soft), transparent 70%);
    pointer-events: none;
    opacity: 0;
  }

  .flash-anim--active {
    animation: catcha-flash 0.6s ease-out;
  }

  @keyframes catcha-flash {
    0%   { opacity: 0; }
    20%  { opacity: 1; }
    100% { opacity: 0; }
  }

  .human-panel {
    max-width: 40rem;
    margin: 2rem auto;
    padding: 1.5rem;

    header h2 {
      margin: 0;
    }

    .status {
      color: var(--catcha-muted);
      margin: 0.25rem 0 1.5rem;
    }
  }

  .dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
  }

  .counter-card {
    background: var(--catcha-card);
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
  }

  .counter-label {
    color: var(--catcha-muted);
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1rem;
  }

  .counter-value {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 4rem;
    margin: 0;
    color: var(--catcha-accent);
  }

  .controls {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
}
