:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --text: #e0e0e0;
  --muted: #a3a3a3;
  --accent: #e5383b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, sans-serif;
  background-color: var(--bg);
  background-image:
    linear-gradient(to right, rgba(229, 56, 59, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 56, 59, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px 32px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.9);
  position: sticky;
  top: 0;
  backdrop-filter: blur(8px);
}

.brand-wrap { display: flex; align-items: baseline; gap: 8px; }
.brand { margin: 0; color: var(--accent); font-family: Geist, sans-serif; letter-spacing: -0.04em; }
.beta { color: var(--accent); opacity: 0.75; font-family: "Imperial Script", cursive; font-size: 1.3rem; }
.tagline { color: rgba(229, 56, 59, 0.75); margin: 0; font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; }

.notice {
  background: var(--accent);
  color: white;
  text-align: center;
  font-size: 0.88rem;
  padding: 10px 12px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
.panel { background: var(--surface); border: 1px solid rgba(229, 56, 59, 0.2); border-radius: 18px; padding: 24px; }
.panel h2 { margin-top: 0; font-family: Geist, sans-serif; }
.hidden { display: none; }
.hero-block {
  border: 1px solid rgba(229, 56, 59, 0.1);
  background: #121212;
  border-radius: 20px;
  padding: 22px;
  margin-bottom: 16px;
}
.hero-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}
.hero-head h2 {
  margin: 0;
  text-align: center;
  font-size: 1.65rem;
  font-weight: 800;
}
.gif-shell {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 12px;
}
.gif-shell img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  opacity: 0.8;
}

.stack { display: grid; gap: 10px; max-width: 520px; }
.input-label { font-weight: 600; font-size: 0.95rem; }
.text-input {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0d0d0d;
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
}

.primary-btn, .secondary-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
}

.primary-btn { background: var(--accent); color: white; width: fit-content; }
.secondary-btn { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, 0.25); }

.muted { color: var(--muted); }
.error { color: #ff8f8f; min-height: 18px; }

.loading-dots span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 999px;
  background: var(--accent);
  animation: bounce 0.8s infinite ease-in-out;
}
.loading-dots span:nth-child(2) { animation-delay: 0.15s; }
.loading-dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }

.progress-track { margin: 16px 0; background: #242424; border-radius: 99px; height: 10px; overflow: hidden; }
.progress-fill { height: 100%; width: 0; background: linear-gradient(90deg, #e5383b, #ff6a6d); transition: width 0.3s ease; }

.steps { margin: 12px 0 0; padding-left: 18px; color: var(--muted); line-height: 1.8; }
.steps .done { color: white; }

.results-header { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tabs { display: flex; gap: 8px; margin: 18px 0; flex-wrap: wrap; }
.tab-btn {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #171717;
  color: var(--muted);
  cursor: pointer;
}
.tab-btn.active { color: white; border-color: rgba(229, 56, 59, 0.55); background: rgba(229, 56, 59, 0.12); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  border: 1px solid rgba(229, 56, 59, 0.2);
  border-radius: 14px;
  padding: 14px;
  background: #101010;
  margin-bottom: 12px;
}
.card h3 { margin: 0 0 8px; color: var(--accent); }
.meta { font-size: 0.86rem; color: var(--muted); }
.patent-card {
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(10, 10, 10, 0.7);
  border-radius: 16px;
  padding: 18px;
}
.patent-title {
  margin-top: 0;
  font-weight: 800;
  color: #fff;
}
.chip {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px 8px;
  margin: 4px 4px 0 0;
  font-size: 0.75rem;
}

.bg-minimal-grid {
  background-color: #0a0a0a;
  background-image:
    linear-gradient(to right, rgba(229, 56, 59, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(229, 56, 59, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}

.glass-panel {
  background: #0a0a0a;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(229, 56, 59, 0.3);
}

.timeline-spine {
  background: linear-gradient(to bottom, #e5383b 0%, #e5383b 80%, transparent 100%);
  width: 2px;
}

@keyframes bounce-dot {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.animate-bounce-dot {
  animation: bounce-dot 0.6s infinite;
}

@keyframes shimmer-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.animate-shimmer {
  animation: shimmer-slide 2s infinite;
  background-size: 200% 100%;
}

.minimal-card {
  background: #121212;
  border: 1px solid rgba(229, 56, 59, 0.2);
  transition: all 0.2s ease;
}

.minimal-card:hover {
  border-color: #e5383b;
  box-shadow: 0 4px 20px rgba(229, 56, 59, 0.1);
}

.feedback-selected-up {
  border-color: #e5383b !important;
  background: rgba(229, 56, 59, 0.15) !important;
}
.feedback-selected-up iconify-icon,
.feedback-selected-up .material-symbols-outlined {
  color: #e5383b !important;
}
.feedback-selected-down {
  border-color: #e5383b !important;
  background: rgba(229, 56, 59, 0.15) !important;
}
.feedback-selected-down iconify-icon,
.feedback-selected-down .material-symbols-outlined {
  color: #e5383b !important;
}
.feedback-locked button:disabled {
  opacity: 0.85;
  cursor: default;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* PDF html2canvas clone — light print-friendly capture (applied on cloned DOM in frontend.js) */
.literally-pdf-capture .tab-panel.active {
  display: block !important;
}
