/* ============================================
   Claude Verifier - Style Sheet
   ============================================ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1a1a25;
  --bg-input: #1e1e2a;
  --border: #2a2a3a;
  --border-hover: #3a3a50;
  --text-primary: #e8e8f0;
  --text-secondary: #8888a0;
  --text-muted: #555570;
  --accent: #d4a574;
  --accent-light: #e8c49a;
  --accent-dim: rgba(212, 165, 116, 0.15);
  --green: #4ade80;
  --green-dim: rgba(74, 222, 128, 0.12);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.12);
  --yellow: #fbbf24;
  --yellow-dim: rgba(251, 191, 36, 0.12);
  --blue: #60a5fa;
  --blue-dim: rgba(96, 165, 250, 0.12);
  --purple: #c084fc;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --font-mono: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Menlo', monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Background effects */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(212, 165, 116, 0.06) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Layout */
header, main, footer {
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(10, 10, 15, 0.8);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-icon {
  font-size: 32px;
  color: var(--accent);
  filter: drop-shadow(0 0 8px rgba(212, 165, 116, 0.4));
}

.logo h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: -2px;
}

/* Header Nav */
.header-nav {
  display: flex;
  gap: 16px;
  align-items: center;
}

.header-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 4px 12px;
  border-radius: 6px;
  transition: all 0.2s;
}

.header-nav a:hover {
  color: var(--accent);
  background: var(--accent-dim);
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border);
  flex-wrap: wrap;
}

.header-build {
  font-size: 11px;
  opacity: 0.5;
  font-family: 'SF Mono', 'Fira Code', monospace;
  width: 100%;
  text-align: center;
  margin-top: 2px;
}

.header-build:empty {
  display: none;
}

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

.header-badge a:hover {
  text-decoration: underline;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

/* Config Panel */
.config-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.config-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.config-header:hover {
  background: var(--bg-card-hover);
}

.config-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-header h2 svg {
  color: var(--text-secondary);
}

.config-toggle {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.3s;
}

.config-toggle.collapsed {
  transform: rotate(-90deg);
}

.config-body {
  padding: 0 24px 24px;
  transition: all 0.3s ease;
}

.config-body.collapsed {
  display: none;
}

/* Config Profiles */
.config-profiles {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.config-profiles > label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.profile-select-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.profile-select-row select {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
}

.profile-select-row select:focus {
  border-color: var(--accent);
}

.btn-icon-inline {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  cursor: pointer;
  padding: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon-inline:hover {
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.4);
  background: var(--red-dim);
}

.config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.field input, .field select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-mono);
  transition: border-color 0.2s;
  outline: none;
}

.field input:focus, .field select:focus {
  border-color: var(--accent);
}

.field select {
  font-family: var(--font-sans);
  cursor: pointer;
}

.field-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.model-input-wrap {
  position: relative;
}

.model-input-wrap input {
  width: 100%;
  padding-right: 40px;
}

.model-input-wrap .btn-fetch-models.loading svg {
  animation: spin 1s linear infinite;
}

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

.key-input-wrap {
  position: relative;
}

.key-input-wrap input {
  width: 100%;
  padding-right: 40px;
}

.btn-icon {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.btn-icon:hover {
  color: var(--text-primary);
}

.config-actions {
  display: flex;
  gap: 12px;
}

.connection-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: var(--font-mono);
}

.connection-status.success {
  background: var(--green-dim);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--green);
}

.connection-status.error {
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--red);
}

.hidden {
  display: none !important;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 0 20px rgba(212, 165, 116, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-secondary {
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-hero {
  background: linear-gradient(135deg, var(--accent), #c08850);
  color: #000;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(212, 165, 116, 0.25);
}

.btn-hero:hover {
  box-shadow: 0 6px 30px rgba(212, 165, 116, 0.4);
  transform: translateY(-1px);
}

.btn-hero:active {
  transform: translateY(0);
}

.btn-hero:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 6px;
  background: var(--bg-input);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-sm:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Toggle Buttons */
.btn-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-sans);
}

.btn-toggle:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.btn-toggle.active {
  background: var(--accent-dim);
  border-color: rgba(212, 165, 116, 0.4);
  color: var(--accent);
}

/* Controls */
.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

/* Verdict Banner */
.verdict-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 28px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  animation: slideDown 0.5s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.verdict-banner.verdict-pass {
  background: linear-gradient(135deg, var(--green-dim), rgba(74, 222, 128, 0.05));
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.verdict-banner.verdict-fail {
  background: linear-gradient(135deg, var(--red-dim), rgba(248, 113, 113, 0.05));
  border: 1px solid rgba(248, 113, 113, 0.3);
}

.verdict-banner.verdict-warn {
  background: linear-gradient(135deg, var(--yellow-dim), rgba(251, 191, 36, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.verdict-icon {
  font-size: 40px;
  flex-shrink: 0;
}

.verdict-text h3 {
  font-size: 18px;
  margin-bottom: 2px;
}

.verdict-text p {
  font-size: 13px;
  color: var(--text-secondary);
}

.verdict-score {
  margin-left: auto;
  font-size: 36px;
  font-weight: 800;
  font-family: var(--font-mono);
  flex-shrink: 0;
}

.verdict-pass .verdict-score { color: var(--green); }
.verdict-fail .verdict-score { color: var(--red); }
.verdict-warn .verdict-score { color: var(--yellow); }

/* ============================================
   Chat Panel
   ============================================ */
.chat-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 24px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  cursor: pointer;
  user-select: none;
  transition: background 0.2s;
}

.chat-header:hover {
  background: var(--bg-card-hover);
}

.chat-header h2 {
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header h2 svg {
  color: var(--text-secondary);
}

.chat-toggle {
  color: var(--text-muted);
  font-size: 12px;
  transition: transform 0.3s;
}

.chat-toggle.collapsed {
  transform: rotate(-90deg);
}

.chat-body {
  transition: all 0.3s ease;
}

.chat-body.collapsed {
  display: none;
}

.chat-messages {
  max-height: 520px;
  min-height: 80px;
  overflow-y: auto;
  padding: 16px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-messages:empty::after {
  content: '点击上方展开，输入消息开始对话';
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 32px 0;
}

/* Chat Messages */
.chat-msg {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  animation: fadeIn 0.3s ease;
}

.chat-msg-user {
  background: var(--accent-dim);
  border: 1px solid rgba(212, 165, 116, 0.2);
}

.chat-msg-assistant {
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.chat-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.chat-msg-user .chat-role { color: var(--accent); }
.chat-msg-assistant .chat-role { color: var(--blue); }

.chat-text {
  font-family: var(--font-mono);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
  color: var(--text-primary);
}

.chat-text.chat-error {
  color: var(--red);
}

.chat-thinking {
  background: rgba(192, 132, 252, 0.06);
  border: 1px solid rgba(192, 132, 252, 0.15);
  border-radius: 6px;
  padding: 10px 14px;
  margin-bottom: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(192, 132, 252, 0.8);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  max-height: 240px;
  overflow-y: auto;
}

/* Streaming cursor */
.chat-msg-streaming .chat-text::after {
  content: '\2588';
  animation: blink 0.7s step-end infinite;
  color: var(--accent);
  font-family: var(--font-mono);
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Chat Input Area */
.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.1);
}

.chat-input-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.chat-input-area textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input-area textarea:focus {
  border-color: var(--accent);
}

#chatRawInput {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.5;
  min-height: 200px;
}

.chat-send-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
  gap: 12px;
}

.chat-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Test Cards */
.test-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.test-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.test-card:hover {
  border-color: var(--border-hover);
}

.test-card.test-running {
  border-color: var(--accent);
  box-shadow: 0 0 24px rgba(212, 165, 116, 0.1);
}

.test-card.test-passed {
  border-color: rgba(74, 222, 128, 0.4);
}

.test-card.test-failed {
  border-color: rgba(248, 113, 113, 0.4);
}

.test-card.test-warning {
  border-color: rgba(251, 191, 36, 0.4);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.test-number {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text-muted);
  min-width: 44px;
}

.test-info h3 {
  font-size: 16px;
  font-weight: 600;
}

.test-tag {
  font-size: 12px;
  color: var(--accent);
  margin-top: 1px;
}

.test-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: background 0.3s;
}

.test-running .status-dot {
  background: var(--accent);
  animation: pulse 1s infinite;
}

.test-passed .status-dot { background: var(--green); }
.test-failed .status-dot { background: var(--red); }
.test-warning .status-dot { background: var(--yellow); }

.test-passed .status-text { color: var(--green); }
.test-failed .status-text { color: var(--red); }
.test-warning .status-text { color: var(--yellow); }
.test-running .status-text { color: var(--accent); }

.card-body {
  padding: 20px 24px;
}

.test-desc {
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.test-desc strong {
  color: var(--text-primary);
}

.test-desc code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.test-prompt {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-bottom: 16px;
}

.prompt-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.test-prompt pre {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
}

.test-result {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.result-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.result-content {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-all;
  line-height: 1.6;
  max-height: 300px;
  overflow-y: auto;
}

.result-thinking {
  border-color: rgba(192, 132, 252, 0.3);
  background: rgba(192, 132, 252, 0.05);
}

.result-code {
  max-height: 400px;
  font-size: 12px;
}

.result-analysis {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.6;
}

.result-analysis.analysis-pass {
  background: var(--green-dim);
  border: 1px solid rgba(74, 222, 128, 0.2);
  color: var(--green);
}

.result-analysis.analysis-fail {
  background: var(--red-dim);
  border: 1px solid rgba(248, 113, 113, 0.2);
  color: var(--red);
}

.result-analysis.analysis-warn {
  background: var(--yellow-dim);
  border: 1px solid rgba(251, 191, 36, 0.2);
  color: var(--yellow);
}

.result-analysis.analysis-info {
  background: var(--blue-dim);
  border: 1px solid rgba(96, 165, 250, 0.2);
  color: var(--blue);
}

.code-metrics {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.code-metrics .metric {
  background: var(--bg-input);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--border);
}

.metric-label {
  color: var(--text-muted);
  margin-right: 6px;
}

.metric-value {
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Identity results */
.identity-results {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.identity-item {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.identity-item .q {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.identity-item .a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-primary);
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
}

.footer-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: auto;
}

.test-timing {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  letter-spacing: 0.3px;
}

/* Info Section */
.info-section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.info-section h3 {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.info-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.info-item .info-icon {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 18px;
  color: var(--accent);
  min-width: 36px;
  opacity: 0.6;
}

.info-item h4 {
  font-size: 14px;
  margin-bottom: 4px;
}

.info-item p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.info-item code {
  background: var(--bg-input);
  padding: 1px 5px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

/* ============================================
   Guide Section
   ============================================ */
.guide-section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.guide-section h3 {
  font-size: 18px;
  margin-bottom: 24px;
  color: var(--text-secondary);
}

.guide-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.guide-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
}

.guide-block h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--accent);
}

.guide-block ol,
.guide-block ul {
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.9;
}

.guide-block li {
  margin-bottom: 2px;
}

.guide-block p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 8px;
}

.guide-block strong {
  color: var(--text-primary);
}

.guide-block code {
  background: var(--bg-input);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s;
  z-index: 99;
  box-shadow: var(--shadow);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Footer */
footer {
  text-align: center;
  padding: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 13px;
}

.footer-sub {
  margin-top: 4px;
  font-size: 12px;
}

.footer-build {
  margin-top: 6px;
  font-size: 11px;
  opacity: 0.5;
  font-family: 'SF Mono', 'Fira Code', monospace;
}

.footer-build:empty {
  display: none;
}

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

footer a:hover {
  text-decoration: underline;
}

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-hover);
}

/* Responsive */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 12px;
    padding: 16px 20px;
  }

  main {
    padding: 20px 16px 48px;
  }

  .config-grid {
    grid-template-columns: 1fr;
  }

  .config-actions {
    flex-direction: column;
  }

  .controls {
    flex-direction: column;
  }

  .btn-hero {
    width: 100%;
    justify-content: center;
  }

  .verdict-banner {
    flex-wrap: wrap;
  }

  .verdict-score {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }

  .card-header {
    flex-wrap: wrap;
  }

  .card-footer {
    flex-wrap: wrap;
  }

  .code-metrics {
    flex-direction: column;
  }

  .footer-note {
    margin-left: 0;
    width: 100%;
    margin-top: 4px;
  }

  .chat-messages {
    max-height: 360px;
    padding: 12px 16px;
  }

  .chat-input-area {
    padding: 12px 16px;
  }

  .chat-input-toolbar {
    flex-wrap: wrap;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
  }

  .guide-block {
    padding: 16px 18px;
  }
}
