/* ── AI Vision Checker ─────────────────────────────────────────── */
.aivc {
  background: radial-gradient(1200px 600px at 12% 0%, rgba(34,211,238,0.12), transparent 55%),
              radial-gradient(900px 520px at 85% 12%, rgba(212,175,55,0.10), transparent 55%),
              #070707;
  color: #d7d8dc;
  min-height: 100vh;
  padding: 30px 0 80px;
}
.aivc *, .aivc *::before, .aivc *::after { box-sizing: border-box; }

.aivc-container {
  width: min(94vw, 1200px);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Header ───────────────────────────────────────────────────── */
.aivc-header {
  text-align: center;
  margin-bottom: 40px;
}
.aivc-header h1 {
  margin-top: 20px;
  font-size: 2.2em;
  color: #22d3ee;
  font-weight: 750;
  letter-spacing: -0.01em;
}
.aivc-subtitle {
  font-size: 1.15em;
  color: #b8bcc4;
  margin: 14px 0 8px;
  font-weight: 600;
}
.aivc-description {
  font-size: 1.02em;
  color: #9aa0a8;
  max-width: 720px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* ── Form ─────────────────────────────────────────────────────── */
.aivc-form { max-width: 640px; margin: 0 auto; }
.aivc-input-group {
  display: flex;
  gap: 10px;
}
.aivc-input-group input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(34,211,238,0.3);
  background: rgba(255,255,255,0.05);
  color: #e8e9ec;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.aivc-input-group input:focus { border-color: #22d3ee; }
.aivc-input-group input::placeholder { color: #6b7280; }

.aivc-input-group button {
  padding: 12px 24px;
  border-radius: 12px;
  border: 1px solid #22d3ee;
  background: rgba(34,211,238,0.12);
  color: #22d3ee;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
}
.aivc-input-group button:hover {
  background: rgba(34,211,238,0.22);
  transform: translateY(-1px);
}
.aivc-input-group button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(34,211,238,0.3);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

.aivc-error {
  color: #f87171;
  margin-top: 10px;
  font-size: 0.92em;
}

/* ── Progress steps ──────────────────────────────────────────── */
.aivc-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}
.aivc-progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.85em;
  color: #6b7280;
  transition: all 0.3s;
}
.aivc-progress-step .step-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8em;
  transition: all 0.3s;
}
.aivc-progress-step.active {
  background: rgba(34,211,238,0.1);
  border-color: rgba(34,211,238,0.4);
  color: #22d3ee;
}
.aivc-progress-step.active .step-icon {
  background: #22d3ee;
  color: #070707;
  animation: pulse-step 1s ease-in-out infinite;
}
@keyframes pulse-step {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}
.aivc-progress-step.done {
  color: #22c55e;
  border-color: rgba(34,197,94,0.3);
}
.aivc-progress-step.done .step-icon {
  background: #22c55e;
  color: #070707;
}

/* ── Section ──────────────────────────────────────────────────── */
.aivc-section {
  background: rgba(10,10,10,0.62);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 28px 24px;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
}
.aivc-section h2 {
  color: #22d3ee;
  font-size: 1.35em;
  margin: 0 0 10px;
}
.aivc .aivc-section-desc {
  color: #9aa0a8 !important;
  font-size: 0.95em;
  margin-bottom: 16px;
}
.aivc .aivc-sub-title {
  color: #d4af37;
  font-size: 1.05em;
  margin: 14px 0 10px;
}

/* ── Summary cards ────────────────────────────────────────────── */
.aivc-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}
.aivc-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  transition: transform 0.2s;
}
.aivc-card:hover { transform: translateY(-2px); }
.aivc-card-value {
  font-size: 1.6em;
  font-weight: 750;
  color: #22d3ee;
  display: block;
  margin-bottom: 4px;
}
.aivc-card-value.green { color: #22c55e; }
.aivc-card-value.red { color: #ef4444; }
.aivc-card-value.orange { color: #fbbf24; }
.aivc-card-value.blue { color: #60a5fa; }
.aivc-card-label {
  font-size: 0.85em;
  color: #b8bcc4;
  font-weight: 600;
}

/* ── JS Impact bar ───────────────────────────────────────────── */
.aivc-impact-bar-wrap {
  margin-bottom: 16px;
}
.aivc-impact-bar {
  display: flex;
  height: 28px;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(255,255,255,0.06);
}
.aivc-impact-bar-raw {
  background: linear-gradient(135deg, rgba(34,197,94,0.6), rgba(34,197,94,0.35));
  transition: width 0.5s;
}
.aivc-impact-bar-js {
  background: linear-gradient(135deg, rgba(96,165,250,0.6), rgba(96,165,250,0.35));
  transition: width 0.5s;
}
.aivc-impact-bar-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.85em;
}
.aivc-impact-bar-labels .label-raw { color: #4ade80; }
.aivc-impact-bar-labels .label-js { color: #60a5fa; }

/* ── Content preview (JS-only elements) ──────────────────────── */
.aivc-content-preview {
  max-height: 400px;
  overflow-y: auto;
  padding: 12px;
  background: rgba(0,0,0,0.3);
  border-radius: 10px;
  border: 1px solid rgba(96,165,250,0.15);
}
.aivc-el-more {
  padding: 8px;
  color: #60a5fa;
  font-weight: 600;
  font-size: 0.9em;
  text-align: center;
}

/* ── Cloaking ────────────────────────────────────────────────── */
.aivc-cloaking-details {
  margin-top: 12px;
}
.aivc-cloaking-item {
  padding: 8px 14px;
  margin-bottom: 6px;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  font-size: 0.9em;
}

/* ── Injection analysis ──────────────────────────────────────── */
.aivc-injection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.aivc-injection-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px;
}
.aivc-injection-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.aivc-injection-label {
  font-weight: 700;
  color: #e8e9ec;
  font-size: 0.95em;
}
.aivc-injection-pct {
  font-size: 1.4em;
  font-weight: 750;
}
.aivc-injection-pct.green { color: #22c55e; }
.aivc-injection-pct.orange { color: #fbbf24; }
.aivc-injection-pct.blue { color: #60a5fa; }
.aivc-injection-pct.red { color: #ef4444; }
.aivc-injection-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.aivc-injection-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s;
}
.aivc-injection-bar-fill.green { background: #22c55e; }
.aivc-injection-bar-fill.orange { background: #fbbf24; }
.aivc-injection-bar-fill.blue { background: #60a5fa; }
.aivc-injection-bar-fill.red { background: #ef4444; }
.aivc-injection-words {
  font-size: 1.05em;
  font-weight: 600;
  color: #d0d4dc;
  margin-bottom: 4px;
}
.aivc-injection-desc {
  font-size: 0.82em;
  color: #8b90a0;
  line-height: 1.4;
}

/* ── Injection flags ─────────────────────────────────────────── */
.aivc-flags-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.aivc-flag-card {
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.04);
}
.aivc-flag-card.orange { border-color: rgba(251,191,36,0.3); background: rgba(251,191,36,0.06); }
.aivc-flag-card.red { border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.aivc-flag-card.green { border-color: rgba(34,197,94,0.3); background: rgba(34,197,94,0.06); }
.aivc-flag-label {
  display: block;
  font-weight: 700;
  font-size: 0.9em;
  color: #e8e9ec;
  margin-bottom: 2px;
}
.aivc-flag-info {
  font-size: 0.78em;
  color: #8b90a0;
}

/* ── Bot table ────────────────────────────────────────────────── */
.aivc-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.aivc .aivc-table,
.aivc .aivc-table thead,
.aivc .aivc-table tbody,
.aivc .aivc-table tr {
  background: transparent !important;
  background-color: transparent !important;
}
.aivc .aivc-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 0.93em;
  border: none !important;
  min-width: 0 !important;
}
.aivc .aivc-table th,
.aivc .aivc-table td {
  padding: 10px 12px !important;
  text-align: left !important;
  border: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
  white-space: nowrap;
  color: #e0e2e8 !important;
  font-size: 0.93em;
  background: transparent !important;
  background-color: transparent !important;
}
.aivc .aivc-table th {
  color: #22d3ee !important;
  font-weight: 700;
  font-size: 0.82em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.aivc .aivc-table td strong {
  color: #ffffff !important;
}
.aivc .aivc-table tbody tr:hover {
  background: rgba(34,211,238,0.07) !important;
}
.aivc .aivc-table .bot-note {
  color: #8b90a0 !important;
  font-size: 0.82em;
  font-weight: 400;
}
.aivc .badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85em;
}
.aivc .badge-green { background: rgba(34,197,94,0.22) !important; color: #4ade80 !important; }
.aivc .badge-red { background: rgba(239,68,68,0.20) !important; color: #f87171 !important; }
.aivc .badge-orange { background: rgba(251,191,36,0.20) !important; color: #fbbf24 !important; }
.aivc .badge-gray { background: rgba(255,255,255,0.10) !important; color: #c0c4cc !important; }

/* ── Directives ───────────────────────────────────────────────── */
.aivc-directives-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.aivc-directive-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
}
.aivc-directive-card h3 {
  color: #d4af37;
  font-size: 0.95em;
  margin: 0 0 8px;
}
.aivc-directive-card code {
  background: rgba(255,255,255,0.06);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.9em;
  color: #e8e9ec;
  word-break: break-all;
}
.aivc-directive-card .none {
  color: #6b7280;
  font-style: italic;
}

/* ── JSON-LD blocks ──────────────────────────────────────────── */
.aivc-jsonld-block {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}
.aivc-jsonld-block h3 {
  color: #d4af37;
  font-size: 0.95em;
  margin: 0 0 10px;
}
.aivc-jsonld-block pre {
  background: rgba(0,0,0,0.4);
  border-radius: 8px;
  padding: 14px;
  overflow-x: auto;
  margin: 0;
  max-height: 400px;
  overflow-y: auto;
}
.aivc-jsonld-block pre code {
  font-family: 'Fira Code', 'Consolas', monospace;
  font-size: 0.85em;
  color: #c8ccd4;
  background: none;
  padding: 0;
  white-space: pre;
}
.aivc-jsonld-block pre::-webkit-scrollbar { width: 6px; height: 6px; }
.aivc-jsonld-block pre::-webkit-scrollbar-track { background: transparent; }
.aivc-jsonld-block pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* ── Bot selector ─────────────────────────────────────────────── */
.aivc-bot-selector {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.aivc-bot-selector label {
  font-weight: 600;
  color: #b8bcc4;
}
.aivc-bot-selector select {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34,211,238,0.4);
  background: #1a1a2e;
  color: #f0f1f3;
  font-size: 0.95em;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2322d3ee' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.aivc-bot-selector select:focus { border-color: #22d3ee; }
.aivc-bot-selector select option {
  background: #1a1a2e;
  color: #f0f1f3;
  padding: 8px;
}

.aivc-bot-status {
  font-size: 0.88em;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 8px;
}
.aivc-bot-status.allowed {
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}
.aivc-bot-status.blocked {
  background: rgba(239,68,68,0.15);
  color: #ef4444;
}

/* ── View toggle ──────────────────────────────────────────────── */
.aivc-view-toggle {
  display: flex;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(34,211,238,0.3);
  margin-left: auto;
}
.aivc-toggle-btn {
  padding: 6px 16px;
  border: none;
  background: rgba(255,255,255,0.04);
  color: #9aa0a8;
  font-weight: 600;
  font-size: 0.85em;
  cursor: pointer;
  transition: all 0.2s;
}
.aivc-toggle-btn:not(:last-child) {
  border-right: 1px solid rgba(34,211,238,0.2);
}
.aivc-toggle-btn:hover {
  background: rgba(34,211,238,0.08);
  color: #d0d4dc;
}
.aivc-toggle-btn.active {
  background: rgba(34,211,238,0.18);
  color: #22d3ee;
}

/* ── Content view (highlighting) ──────────────────────────────── */
.aivc .aivc-content-view {
  max-height: 600px;
  overflow-y: auto;
  padding: 16px;
  background: rgba(0,0,0,0.3);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  line-height: 1.7;
  color: #eef0f3 !important;
}
.aivc-content-view::-webkit-scrollbar { width: 6px; }
.aivc-content-view::-webkit-scrollbar-track { background: transparent; }
.aivc-content-view::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.aivc .aivc-el {
  padding: 6px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  border-left: 3px solid transparent;
  font-size: 0.93em;
  color: #eef0f3 !important;
}
.aivc .aivc-el .tag-label {
  display: inline-block;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 1px 6px;
  border-radius: 4px;
  margin-right: 8px;
  vertical-align: middle;
  background: rgba(255,255,255,0.08);
  color: #b0b4bc !important;
}

/* Visibility colors */
.aivc .aivc-el.visible {
  background: rgba(34,197,94,0.12);
  border-left-color: #22c55e;
  color: #f0fdf4 !important;
}
.aivc .aivc-el.invisible {
  background: rgba(239,68,68,0.10);
  border-left-color: #ef4444;
  color: #fecaca !important;
  opacity: 0.75;
}
.aivc .aivc-el.js-only {
  background: rgba(96,165,250,0.12);
  border-left-color: #60a5fa;
  color: #dbeafe !important;
}
.aivc .aivc-el.noscript-content {
  background: rgba(251,191,36,0.12);
  border-left-color: #fbbf24;
  color: #fefce8 !important;
}
.aivc .aivc-el.iframe-content {
  background: rgba(168,85,247,0.12);
  border-left-color: #a855f7;
  color: #f3e8ff !important;
}
.aivc .aivc-el.blocked-all {
  background: rgba(239,68,68,0.08);
  border-left-color: #ef4444;
  color: #fca5a5 !important;
  opacity: 0.6;
}

/* ── JS Details ───────────────────────────────────────────────── */
.aivc-js-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}
.aivc-js-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 16px;
}
.aivc-js-item h3 {
  color: #d4af37;
  font-size: 0.92em;
  margin: 0 0 8px;
}
.aivc-js-item .val {
  font-size: 1.3em;
  font-weight: 700;
  color: #e8e9ec;
}
.aivc-js-item .val.warn { color: #fbbf24; }
.aivc-js-item .val.ok { color: #22c55e; }
.aivc-tag {
  display: inline-block;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  border-radius: 6px;
  font-size: 0.82em;
  font-weight: 600;
  background: rgba(34,211,238,0.12);
  color: #22d3ee;
}

/* ── Alerts ───────────────────────────────────────────────────── */
.aivc-alert {
  margin-top: 14px;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.93em;
  line-height: 1.6;
  border-left: 4px solid;
}
.aivc-alert strong { font-weight: 700; }
.aivc-alert-danger {
  background: rgba(239,68,68,0.10);
  border-left-color: #ef4444;
  color: #fca5a5;
}
.aivc-alert-danger strong { color: #f87171; }
.aivc-alert-warning {
  background: rgba(251,191,36,0.10);
  border-left-color: #fbbf24;
  color: #fde68a;
}
.aivc-alert-warning strong { color: #fbbf24; }
.aivc-alert-ok {
  background: rgba(34,197,94,0.10);
  border-left-color: #22c55e;
  color: #bbf7d0;
}
.aivc-alert-ok strong { color: #4ade80; }

/* ── Source credit ────────────────────────────────────────────── */
.aivc-source {
  margin-top: 16px;
  font-size: 0.84em;
  color: #6b7280;
  text-align: right;
}
.aivc-source a {
  color: #22d3ee;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.aivc-source a:hover { color: #67e8f9; }

/* ── Iframes list ─────────────────────────────────────────────── */
.aivc-iframes-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.aivc-iframes-list li {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(168,85,247,0.08);
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: 10px;
  font-size: 0.92em;
  word-break: break-all;
}
.aivc-iframes-list li strong { color: #a855f7; }

/* ── Actions ──────────────────────────────────────────────────── */
.aivc-actions {
  text-align: center;
  margin-top: 12px;
}
.aivc-btn-secondary {
  padding: 10px 22px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.05);
  color: #b8bcc4;
  font-weight: 600;
  font-size: 0.95em;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.aivc-btn-secondary:hover {
  background: rgba(255,255,255,0.10);
  color: #e8e9ec;
}

/* ── Legend ────────────────────────────────────────────────────── */
.aivc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.aivc .aivc-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84em;
  color: #d0d4dc !important;
}
.aivc-legend-swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
}
.swatch-green { background: rgba(34,197,94,0.35); border: 1px solid #22c55e; }
.swatch-red { background: rgba(239,68,68,0.25); border: 1px solid #ef4444; }
.swatch-orange { background: rgba(251,191,36,0.30); border: 1px solid #fbbf24; }
.swatch-purple { background: rgba(168,85,247,0.30); border: 1px solid #a855f7; }
.swatch-blue { background: rgba(96,165,250,0.30); border: 1px solid #60a5fa; }

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 640px) {
  .aivc-header h1 { font-size: 1.6em; }
  .aivc-input-group { flex-direction: column; }
  .aivc-input-group button { width: 100%; }
  .aivc-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .aivc-section { padding: 20px 14px; }
  .aivc-table { font-size: 0.82em; }
  .aivc-table th, .aivc-table td { padding: 8px 8px; }
  .aivc-injection-grid { grid-template-columns: 1fr; }
  .aivc-bot-selector { flex-direction: column; align-items: flex-start; }
  .aivc-view-toggle { margin-left: 0; }
  .aivc-progress { gap: 6px; }
  .aivc-progress-step { padding: 6px 10px; font-size: 0.78em; }
}
