/* Shared output spotlight + copy celebration + segment controls + backdrop */

#got-bg-canvas,
#ama-bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

#got-spotlight-canvas,
body.got-tool-page #got-spotlight-canvas,
body.got-ama-page #got-spotlight-canvas,
body.got-boa-page #got-spotlight-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body.got-tool-page > *:not(#got-gun-canvas):not(#got-bg-canvas):not(#got-spotlight-canvas):not(#got-output-toast),
body.got-boa-page > *:not(#got-gun-canvas):not(#got-bg-canvas):not(#got-spotlight-canvas):not(#got-output-toast),
body.got-ama-page > *:not(#ama-bg-canvas):not(#ama-gun-canvas):not(#got-gun-canvas):not(#got-bg-canvas):not(#got-spotlight-canvas):not(#ama-spotlight-canvas):not(#ama-float-rail):not(.ama-share-toast):not(#got-output-toast) {
  position: relative;
  z-index: 1;
}

/* Tactile segment control (Shadow Request, etc.) */
.got-segment-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.got-segment-btn {
  flex: 1 1 calc(33.333% - 10px);
  min-width: 100px;
  position: relative;
  padding: 12px 14px;
  border: 1px solid rgba(196, 160, 53, 0.35);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(42, 48, 32, 0.95) 0%, rgba(26, 30, 22, 0.98) 100%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow:
    0 4px 0 rgba(20, 24, 16, 0.9),
    0 6px 16px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateY(0);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.15s, color 0.15s;
}

.got-segment-btn:hover:not(.is-active) {
  border-color: rgba(196, 160, 53, 0.55);
  color: var(--accent-bright);
}

.got-segment-btn.is-active {
  transform: translateY(3px);
  border-color: var(--accent);
  color: var(--accent-bright);
  font-weight: 700;
  background: linear-gradient(180deg, rgba(30, 34, 24, 0.98) 0%, rgba(22, 26, 18, 1) 100%);
  box-shadow:
    inset 0 3px 10px rgba(0, 0, 0, 0.55),
    inset 0 0 12px rgba(196, 160, 53, 0.12),
    0 1px 0 rgba(74, 82, 56, 0.5);
}

.got-segment-btn.got-segment-spotlight,
.got-segment-spotlight {
  animation: got-segment-flash 2.2s ease-out;
}

@keyframes got-segment-flash {
  0% {
    box-shadow:
      inset 0 3px 10px rgba(0, 0, 0, 0.55),
      0 0 0 2px rgba(255, 204, 68, 0.9),
      0 0 32px rgba(196, 160, 53, 0.65);
  }
  40% {
    box-shadow:
      inset 0 3px 10px rgba(0, 0, 0, 0.55),
      0 0 0 3px rgba(168, 191, 106, 0.75),
      0 0 48px rgba(91, 155, 213, 0.35);
  }
  100% {
    box-shadow:
      inset 0 3px 10px rgba(0, 0, 0, 0.55),
      inset 0 0 12px rgba(196, 160, 53, 0.12),
      0 1px 0 rgba(74, 82, 56, 0.5);
  }
}

@media (max-width: 640px) {
  .got-segment-btn { flex: 1 1 100%; }
}

.got-output-highlight,
.kanban-card-highlight {
  outline: 2px solid rgba(196, 160, 53, 0.85);
  outline-offset: 3px;
  box-shadow: 0 0 0 4px rgba(196, 160, 53, 0.15), 0 12px 40px rgba(0, 0, 0, 0.45);
  transition: outline-color 0.2s ease, box-shadow 0.2s ease;
}

.got-spotlight-active {
  animation: got-output-pulse 2.4s ease-out;
}

.kanban-card-spotlight-active {
  animation: got-output-pulse 2.8s ease-out;
}

@keyframes got-output-pulse {
  0% { box-shadow: 0 0 0 0 rgba(196, 160, 53, 0.5); }
  25% { box-shadow: 0 0 28px 6px rgba(168, 191, 106, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(196, 160, 53, 0); }
}

.got-output-toast,
#got-output-toast {
  position: fixed;
  bottom: 88px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  z-index: 10060;
  padding: 10px 18px;
  border-radius: 6px;
  background: rgba(22, 26, 18, 0.96);
  border: 1px solid rgba(196, 160, 53, 0.45);
  color: var(--accent-bright, #e8d48a);
  font-size: 0.88rem;
  font-family: var(--mono, monospace);
  letter-spacing: 0.04em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.got-output-toast.is-visible,
#got-output-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* AMA session source buttons (footer) */
.ama-entry-sources {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(196, 160, 53, 0.2);
}

.ama-entry-sources-title {
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 12px;
}

.ama-source-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ama-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid rgba(196, 160, 53, 0.35);
  background: rgba(30, 34, 24, 0.95);
  color: var(--text);
  text-decoration: none;
  font-size: 0.82rem;
  line-height: 1.3;
  max-width: 100%;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.ama-source-btn:hover {
  border-color: rgba(196, 160, 53, 0.7);
  background: rgba(38, 42, 30, 0.98);
  transform: translateY(-1px);
}

.ama-source-btn-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.ama-source-youtube .ama-source-btn-icon {
  background: rgba(255, 0, 0, 0.2);
  color: #ff6b6b;
}

.ama-source-twitch .ama-source-btn-icon {
  background: rgba(145, 70, 255, 0.25);
  color: #bf9bff;
}

.ama-source-reddit .ama-source-btn-icon {
  background: rgba(255, 69, 0, 0.2);
  color: #ff8c5a;
}

.ama-source-link .ama-source-btn-icon {
  background: rgba(91, 155, 213, 0.2);
  color: #7dd3fc;
}

.ama-source-btn-label {
  text-align: left;
}

@media (max-width: 640px) {
  .ama-source-btn {
    flex: 1 1 100%;
  }
}
