/**
 * Styles for Seriously!? — vague reports, real reactions.
 * Created: 2026-06-17 | Modified: 2026-06-17
 * Author: Doug Hesseltine | Version: 2.2.0
 */

:root {
  --bg: #0f1118;
  --panel: #1a1e28;
  --panel-border: #2f3647;
  --text: #eef2fb;
  --muted: #9aa4b8;
  --accent: #ff9f43;
  --accent-hover: #ffb86b;
  --accent-glow: rgba(255, 159, 67, 0.35);
  --fog: #7c9cff;
  --snark: #ffb86b;
  --helpful: #7dffb2;
  --success: #7dffb2;
  --error: #ff8f9b;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 159, 67, 0.14), transparent 45%),
    radial-gradient(ellipse at 85% 10%, rgba(124, 156, 255, 0.12), transparent 40%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  align-items: start;
}

.container {
  width: 100%;
  margin: 0;
  padding: 0;
}

.main-column {
  min-width: 0;
}

.sidebar {
  min-width: 0;
}

.sidebar-panel {
  position: sticky;
  top: 1.5rem;
  margin-bottom: 0;
  max-height: calc(100vh - 3rem);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.sidebar-panel h2 {
  flex-shrink: 0;
}

.sidebar-panel .section-note {
  flex-shrink: 0;
}

.sidebar-panel .recent-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  margin-top: 0.75rem;
  padding-right: 0.15rem;
}

.sidebar-panel .recent-list::-webkit-scrollbar {
  width: 6px;
}

.sidebar-panel .recent-list::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 3px;
}

.hero {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1.5rem 1rem 0;
}

.brand-title {
  margin: 0 0 0.5rem;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  line-height: 1.05;
}

.brand-mark {
  background: linear-gradient(120deg, #ff6b6b 0%, #ff9f43 35%, #ffd93d 65%, #7c9cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 16px rgba(255, 159, 67, 0.4));
  letter-spacing: -0.02em;
}

.thinking-panel {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px dashed rgba(124, 156, 255, 0.45);
  background: linear-gradient(135deg, rgba(124, 156, 255, 0.08), rgba(255, 159, 67, 0.06));
  animation: thinking-glow 2.4s ease-in-out infinite alternate;
}

.thinking-panel.hidden {
  display: none;
}

.thinking-message {
  margin: 0;
  font-size: 0.98rem;
  color: var(--muted);
  animation: thinking-fade 2.4s ease-in-out infinite;
}

.whirligig-wrap {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
}

.whirligig {
  position: relative;
  width: 48px;
  height: 48px;
  animation: whirligig-spin 0.85s linear infinite;
}

.whirligig-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  z-index: 2;
}

.whirligig .blade {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 22px;
  margin: -22px 0 0 -4px;
  transform-origin: 50% 100%;
  border-radius: 4px 4px 2px 2px;
  opacity: 0.92;
}

.whirligig .b1 {
  transform: rotate(0deg);
  background: linear-gradient(180deg, #7c9cff, #5b7fd6);
}

.whirligig .b2 {
  transform: rotate(90deg);
  background: linear-gradient(180deg, #ff9f43, #e67e22);
}

.whirligig .b3 {
  transform: rotate(180deg);
  background: linear-gradient(180deg, #7dffb2, #4ade80);
}

.whirligig .b4 {
  transform: rotate(270deg);
  background: linear-gradient(180deg, #ffb86b, #ff6b6b);
}

@keyframes whirligig-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes thinking-glow {
  from { box-shadow: 0 0 0 rgba(124, 156, 255, 0); }
  to { box-shadow: 0 0 24px rgba(124, 156, 255, 0.15); }
}

@keyframes thinking-fade {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}

.ops-panel {
  border-top: 3px dashed rgba(124, 156, 255, 0.45);
  background:
    linear-gradient(180deg, rgba(124, 156, 255, 0.06) 0%, transparent 30%),
    var(--panel);
}

.controls-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 1rem;
  margin-top: 1.1rem;
}

.control-block select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #10131a;
  color: var(--text);
  font-size: 0.95rem;
}

.fog-meter {
  height: 28px;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  background: #10131a;
  border: 1px solid var(--panel-border);
  overflow: hidden;
  position: relative;
}

.fog-layer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(124, 156, 255, 0.5), rgba(255, 159, 67, 0.35), transparent);
  opacity: 0.7;
  transform-origin: left center;
  transition: opacity 0.2s ease, transform 0.2s ease;
  filter: blur(4px);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  cursor: pointer;
}

.toggle-row input {
  accent-color: var(--fog);
}

.ticket-banner {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.ticket-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.ticket-number {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--fog);
  letter-spacing: 0.06em;
}

@keyframes ticket-roll {
  0% { opacity: 0; transform: translateY(-8px) scale(0.92); }
  60% { opacity: 1; transform: translateY(2px) scale(1.02); }
  100% { transform: translateY(0) scale(1); }
}

.roll-in {
  animation: ticket-roll 0.55s ease-out;
}

.executive-card {
  border-color: rgba(167, 139, 250, 0.4);
}

.executive-card .output-label,
.executive-card .output-text {
  color: #c4b5fd;
}

.stamp-executive {
  border-color: rgba(167, 139, 250, 0.45);
  color: #c4b5fd;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.escalate-btn:hover:not(:disabled) {
  border-color: rgba(167, 139, 250, 0.5);
  color: #c4b5fd;
}

.hall-panel {
  border: 1px solid rgba(255, 215, 0, 0.2);
  background: linear-gradient(180deg, rgba(255, 215, 0, 0.04) 0%, transparent 40%), var(--panel);
}

.hall-item {
  border-color: rgba(255, 215, 0, 0.15);
}

.recent-ticket {
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  color: var(--fog);
}

.pin-btn:hover {
  color: gold;
  border-color: rgba(255, 215, 0, 0.45);
}

.admin-only.hidden {
  display: none;
}

.cta-btn {
  background: linear-gradient(135deg, var(--fog) 0%, #5a7fd4 100%);
  color: #0a0e18;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(124, 156, 255, 0.35);
}

.cta-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, #9bb2ff 0%, var(--fog) 100%);
}

.tagline {
  margin: 0 auto 0.75rem;
  max-width: 36rem;
  color: var(--text);
  font-size: 1.08rem;
}

.tagline em {
  color: var(--accent-hover);
  font-style: normal;
  font-weight: 600;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  animation: pulse-eyebrow 3s ease-in-out infinite;
}

@keyframes pulse-eyebrow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}

h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 2.8rem);
  line-height: 1.15;
}

.subtitle,
.section-note,
.meta-line {
  color: var(--muted);
}

.subtitle {
  margin: 0 auto;
  max-width: 42rem;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.ticket-panel {
  border-top: 3px dashed rgba(255, 159, 67, 0.45);
  background:
    linear-gradient(180deg, rgba(255, 159, 67, 0.04) 0%, transparent 28%),
    var(--panel);
}

.cta-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #ff7b2e 100%);
  color: #1a1008;
  font-weight: 800;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.cta-btn:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--accent-hover) 0%, #ff9f43 100%);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.output-intro {
  margin: 0;
  font-weight: 700;
  color: var(--accent-hover);
  font-size: 0.95rem;
}

.stamp {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  background: rgba(255, 255, 255, 0.03);
}

.stamp-snark {
  border-color: rgba(255, 184, 107, 0.45);
  color: var(--snark);
}

.stamp-helpful {
  border-color: rgba(125, 255, 178, 0.35);
  color: var(--helpful);
}

.stamp-long {
  font-size: 0.62rem;
  letter-spacing: 0.03em;
  text-transform: none;
  max-width: 100%;
  line-height: 1.35;
}

.share-vague-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

.share-vague-value {
  margin: 0.25rem 0 0.75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
}

.recent-topic-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.recent-topic-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  font-weight: 700;
}

.recent-topic-wrap strong {
  word-break: break-word;
}

.panel h2 {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
}

.field-label {
  display: block;
  margin-bottom: 0.65rem;
  font-weight: 600;
}

.field-id {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.88em;
}

.slider-block {
  margin-top: 1.1rem;
  padding: 1rem 1.1rem;
  background: #10131a;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
}

.slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.slider-header .field-label {
  margin-bottom: 0;
}

.intensity-badge {
  flex-shrink: 0;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 184, 107, 0.15);
  color: var(--snark);
  font-size: 0.85rem;
  font-weight: 700;
}

#intensity-slider {
  width: 100%;
  margin: 0;
  accent-color: var(--snark);
  cursor: pointer;
}

.intensity-description {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  min-height: 1.4em;
}

.input-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

input[type='text'] {
  flex: 1 1 260px;
  min-width: 0;
  padding: 0.95rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--panel-border);
  background: #10131a;
  color: var(--text);
  font-size: 1rem;
}

input[type='text']:focus {
  outline: 2px solid rgba(124, 156, 255, 0.45);
  outline-offset: 2px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 0.95rem 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #10131a;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.secondary-btn {
  background: #2a3140;
  color: var(--text);
}

.secondary-btn:hover:not(:disabled) {
  background: #343d50;
}

.status-message {
  min-height: 1.5rem;
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.status-message.success {
  color: var(--success);
}

.status-message.error {
  color: var(--error);
}

.hidden {
  display: none;
}

.output-area {
  margin-top: 1.25rem;
  display: grid;
  gap: 1rem;
}

.output-card {
  background: #10131a;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.output-label {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.output-text {
  margin: 0;
  font-size: 1.05rem;
}

.snark-card {
  border-color: rgba(255, 184, 107, 0.35);
}

.snark-card .output-label,
.snark-card .output-text {
  color: var(--snark);
}

.helpful-card {
  border-color: rgba(125, 255, 178, 0.35);
}

.helpful-card .output-label,
.helpful-card .output-text {
  color: var(--helpful);
}

.helpful-card .output-text {
  font-size: 0.98rem;
  line-height: 1.55;
}

.share-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.share-label {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 10px;
  background: #2a3140;
  color: var(--text);
  border: 1px solid var(--panel-border);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn svg {
  width: 1.15rem;
  height: 1.15rem;
}

.icon-btn:hover:not(.disabled) {
  background: #343d50;
  color: var(--accent-hover);
  transform: translateY(-1px);
}

.share-icon-btn:hover:not(.disabled) {
  color: var(--accent);
}

.delete-btn:hover:not(:disabled) {
  color: var(--error);
  border-color: rgba(255, 143, 155, 0.45);
}

.icon-btn.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.recent-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-shrink: 0;
}

.entry-footer {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
}

.upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: auto;
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.upvote-btn.upvoted,
.icon-btn.upvote-btn.upvoted {
  border-color: rgba(125, 255, 178, 0.45);
  color: var(--helpful);
  opacity: 0.85;
}

.training-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: auto;
  padding: 0.35rem 0.65rem;
  color: var(--fog);
}

.training-btn svg {
  width: 1rem;
  height: 1rem;
}

.training-btn:hover:not(:disabled) {
  border-color: rgba(124, 156, 255, 0.55);
  color: var(--accent-hover);
}

.training-label {
  font-size: 0.78rem;
  font-weight: 600;
}

.action-row .upvote-btn {
  min-width: 7rem;
}

.footer-auth {
  margin-top: 0.75rem;
}

.footer-link-btn {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-link-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
  transform: none;
}

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

.login-dialog {
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 0;
  max-width: 24rem;
  width: calc(100% - 2rem);
}

.login-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

.login-dialog form {
  padding: 1.5rem;
  display: grid;
  gap: 0.65rem;
}

.login-dialog h2 {
  margin: 0;
}

.dialog-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.login-dialog input[type='text'],
.login-dialog input[type='password'] {
  width: 100%;
}

.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.example-card {
  text-align: left;
  background: #10131a;
  border: 1px solid var(--panel-border);
  color: var(--text);
  padding: 1rem;
  display: grid;
  gap: 0.45rem;
}

.example-training-foot {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.25rem;
  color: var(--fog);
  font-size: 0.78rem;
  font-weight: 600;
}

.example-training-foot svg {
  width: 1rem;
  height: 1rem;
}

.example-card:hover:not(:disabled) {
  border-color: rgba(124, 156, 255, 0.45);
}

.example-topic {
  font-weight: 700;
  color: var(--accent);
}

.example-preview {
  color: var(--muted);
  font-size: 0.92rem;
}

.recent-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

.recent-item,
.recent-empty {
  background: #10131a;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 1rem;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.recent-item p {
  margin: 0.25rem 0 0;
}

.recent-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer,
.back-link {
  text-align: center;
  color: var(--muted);
}

.back-link {
  margin-top: 1.5rem;
}

.share-page h1 {
  font-size: clamp(1.6rem, 4vw, 2.2rem);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 960px) {
  .controls-row {
    grid-template-columns: 1fr;
  }

  .page-layout {
    grid-template-columns: 1fr;
    padding: 1.25rem 0.75rem 2rem;
    gap: 0;
  }

  .sidebar-panel {
    position: static;
    max-height: none;
  }

  .sidebar-panel .recent-list {
    max-height: 28rem;
  }
}

@media (max-width: 640px) {
  button,
  input[type='text'] {
    width: 100%;
  }

  .input-row,
  .share-row {
    flex-direction: column;
  }
}

.bmac-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 900;
  display: block;
  line-height: 0;
  border-radius: 10px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bmac-float:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
}

.bmac-float:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.bmac-float img {
  display: block;
  width: 217px;
  height: 60px;
  border-radius: 10px;
}

@media (max-width: 640px) {
  .bmac-float {
    right: 0.65rem;
    bottom: 0.65rem;
  }

  .bmac-float img {
    width: 174px;
    height: 48px;
  }
}
