/* ===== RESET & VARIABLES ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #06060e;
  --bg-secondary: #0d0d1a;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --bg-glass: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.14);
  --text: #e2e8f0;
  --text-secondary: #8892a4;
  --text-muted: #556070;
  --accent: #818cf8;
  --accent-bright: #a5b4fc;
  --accent-dim: #4f46e5;
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.1);
  --success-border: rgba(52, 211, 153, 0.2);
  --error: #f87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --error-border: rgba(248, 113, 113, 0.2);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.1);
  --warning-border: rgba(251, 191, 36, 0.2);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.3);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html {
  font-size: 16px;
}
body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ===== AMBIENT BACKGROUND ===== */
.ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
}
.blob-1 {
  width: 600px;
  height: 600px;
  background: #6366f1;
  top: -200px;
  right: -100px;
  animation: blobFloat 20s ease-in-out infinite;
}
.blob-2 {
  width: 500px;
  height: 500px;
  background: #8b5cf6;
  bottom: -150px;
  left: -100px;
  animation: blobFloat 25s ease-in-out infinite reverse;
}
.blob-3 {
  width: 400px;
  height: 400px;
  background: #06b6d4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: blobFloat 30s ease-in-out infinite 5s;
}
@keyframes blobFloat {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(30px, -40px) scale(1.05);
  }
  66% {
    transform: translate(-20px, 30px) scale(0.95);
  }
}

/* ===== UTILITIES ===== */
.hidden {
  display: none !important;
}

/* ===== APP & LAYOUT ===== */
.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(6, 6, 14, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: opacity var(--transition);
}
.logo:hover {
  opacity: 0.8;
}
.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-dim), #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.logo-ai {
  background: linear-gradient(135deg, var(--accent-bright), #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  margin-left: 2px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent-dim), #7c3aed);
  color: white;
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.3);
}
.btn-primary:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-ghost {
  background: var(--bg-glass);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--bg-card-hover);
  color: var(--text);
  border-color: var(--border-hover);
}
.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}
.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}
.btn-sm {
  padding: 6px 14px;
  font-size: 0.8rem;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== MAIN CONTENT ===== */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px;
}
.view.hidden {
  display: none;
}
.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.view-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.view-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
}
.empty-state.hidden {
  display: none;
}
.empty-icon {
  margin-bottom: 24px;
  color: var(--text-muted);
}
.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.empty-state p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

/* ===== SITES GRID ===== */
.sites-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

/* ===== SITE CARD ===== */
.site-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.site-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent, rgba(99, 102, 241, 0.03));
  opacity: 0;
  transition: opacity var(--transition);
}
.site-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.site-card:hover::before {
  opacity: 1;
}

.site-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}
.site-card-info {
  flex: 1;
  min-width: 0;
}
.site-card-name {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-card-url {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-badge {
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.status-badge.good {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}
.status-badge.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}
.status-badge.critical {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}
.status-badge.pending {
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.site-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}
.site-card-score {
  display: flex;
  align-items: center;
  gap: 6px;
}
.score-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.score-ring svg {
  transform: rotate(-90deg);
}
.score-ring-text {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 700;
}

.site-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  position: relative;
  z-index: 2;
}

/* Testing animation */
.site-card.testing {
  border-color: var(--accent);
  animation: testingPulse 2s ease-in-out infinite;
}
@keyframes testingPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
  }
  50% {
    box-shadow: 0 0 20px 4px rgba(99, 102, 241, 0.15);
  }
}

/* ===== REPORT VIEW ===== */
.report-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.report-score-circle {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-score-circle svg {
  transform: rotate(-90deg);
  position: absolute;
}
.report-score-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.report-score-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}
.report-info {
  flex: 1;
  min-width: 200px;
}
.report-site-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.report-site-url {
  font-size: 0.85rem;
  color: var(--accent-bright);
  text-decoration: none;
  word-break: break-all;
}
.report-site-url:hover {
  text-decoration: underline;
}
.report-timestamp {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}
.report-summary {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 12px;
  line-height: 1.5;
}
.report-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-top: 8px;
  background: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.15),
    rgba(139, 92, 246, 0.15)
  );
  color: var(--accent-bright);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Category cards */
.report-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 16px;
}
.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.category-card:hover {
  border-color: var(--border-hover);
}
.category-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.category-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
}
.category-icon {
  font-size: 1.2rem;
}
.category-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.category-status-dot.good {
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.category-status-dot.warning {
  background: var(--warning);
  box-shadow: 0 0 8px var(--warning);
}
.category-status-dot.critical {
  background: var(--error);
  box-shadow: 0 0 8px var(--error);
}
.category-chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
}
.category-card.expanded .category-chevron {
  transform: rotate(180deg);
}

.category-items {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.category-card.expanded .category-items {
  max-height: 2000px;
}

.category-items-inner {
  padding: 0 24px 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.report-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.85rem;
  line-height: 1.4;
}
.report-item + .report-item {
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}
.item-status {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  margin-top: 1px;
}
.item-status.ok {
  background: var(--success-bg);
  color: var(--success);
}
.item-status.warning {
  background: var(--warning-bg);
  color: var(--warning);
}
.item-status.error {
  background: var(--error-bg);
  color: var(--error);
}
.item-text {
  flex: 1;
  color: var(--text-secondary);
  word-break: break-word;
}
.item-text.ok {
  color: var(--text);
}
.item-text.error {
  color: var(--error);
}
.item-details {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== REPORT SECTIONS (collapsible) ===== */
.report-section {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.report-section:hover {
  border-color: var(--border-hover);
}
.report-section-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  user-select: none;
}
.report-section-header h3 {
  font-size: 1rem;
  font-weight: 600;
  flex: 1;
}
.section-stats {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.stat-badge {
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
}
.stat-badge.good {
  background: var(--success-bg);
  color: var(--success);
}
.stat-badge.bad {
  background: var(--error-bg);
  color: var(--error);
}
.section-chevron {
  transition: transform var(--transition);
  color: var(--text-muted);
  flex-shrink: 0;
}
.report-section.collapsed .section-chevron {
  transform: rotate(180deg);
}
.section-content {
  padding: 0 24px 24px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  transition: all 0.3s ease;
}
.report-section.collapsed .section-content {
  display: none;
}

/* ===== IMAGE GALLERY ===== */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.gallery-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
}
.gallery-item:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.gallery-item.broken {
  border-color: var(--error-border);
}

.gallery-thumb {
  width: 100%;
  height: 120px;
  overflow: hidden;
  position: relative;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-thumb img {
  transform: scale(1.08);
}
.gallery-thumb.thumb-error {
  background: var(--error-bg);
}
.gallery-thumb.thumb-error::after {
  content: "❌";
  font-size: 1.5rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.7rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  min-height: 32px;
}
.gallery-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.gallery-status-dot.loaded {
  background: var(--success);
}
.gallery-status-dot.broken {
  background: var(--error);
}
.gallery-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.gallery-size {
  color: var(--text-muted);
  font-size: 0.65rem;
  flex-shrink: 0;
}

/* ===== SCREENSHOTS ===== */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.screenshot-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}
.screenshot-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.screenshot-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: top;
  display: block;
  transition: transform 0.3s ease;
}
.screenshot-card:hover img {
  transform: scale(1.03);
}
.screenshot-label {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.screenshot-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.screenshot-card:hover .screenshot-zoom {
  opacity: 1;
}

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(12px);
}
.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 95vw;
  max-height: 95vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.lightbox-content img {
  max-width: 95vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox-caption {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  text-align: center;
}

/* ===== MODALS ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}
.modal-overlay.hidden {
  display: none;
}
.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow);
  animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-header {
  padding: 24px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text);
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}
.form-group:last-child {
  margin-bottom: 0;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.input::placeholder {
  color: var(--text-muted);
}
select.input {
  cursor: pointer;
}
.form-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow);
  min-width: 280px;
  animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success {
  background: #065f46;
  color: #a7f3d0;
  border: 1px solid rgba(52, 211, 153, 0.3);
}
.toast.error {
  background: #7f1d1d;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.toast.info {
  background: #1e1b4b;
  color: #c7d2fe;
  border: 1px solid rgba(129, 140, 248, 0.3);
}
@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
.toast-exit {
  animation: toastOut 0.3s ease forwards;
}
@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(40px) scale(0.95);
  }
}

/* ===== LOADING SPINNER ===== */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== NEXT CHECK TIMER ===== */
.next-check-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  color: var(--text-muted);
}
.next-check-bar strong {
  color: var(--primary);
  font-family: "Courier New", monospace;
  font-size: 1rem;
  letter-spacing: 1px;
}

/* ===== PROGRESS BAR ===== */
.site-progress-container {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.site-progress-log {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  overflow: hidden;
}
.site-progress-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 0.3s ease;
}

.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(6, 6, 14, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  gap: 12px;
}
.loading-overlay .spinner {
  width: 32px;
  height: 32px;
  border-width: 3px;
}
.loading-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  animation: loadingDots 1.5s infinite;
}
@keyframes loadingDots {
  0%,
  20% {
    content: ".";
  }
  40% {
    content: "..";
  }
  60%,
  100% {
    content: "...";
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .main {
    padding: 20px 16px;
  }
  .sites-grid {
    grid-template-columns: 1fr;
  }
  .report-categories {
    grid-template-columns: 1fr;
  }
  .report-header-card {
    flex-direction: column;
    text-align: center;
    gap: 20px;
  }
  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .header-inner {
    padding: 0 16px;
  }
  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  .screenshots-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .btn span {
    display: none;
  }
  .btn svg {
    margin: 0;
  }
  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  }
  .gallery-thumb {
    height: 80px;
  }
}

/* ===== NO REPORT STATE ===== */
.no-report {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-report h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}
.no-report p {
  font-size: 0.9rem;
}

.forbidden-content-section {
  border-color: var(--error) !important;
}

.forbidden-page-item {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
  border-left: 3px solid var(--warning);
}

.forbidden-page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.forbidden-page-url {
  font-size: 0.85rem;
  color: var(--text-primary);
  word-break: break-all;
}

.forbidden-page-title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 2px 8px;
  border-radius: 4px;
}

.forbidden-page-count {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: rgba(255, 59, 48, 0.1);
  padding: 2px 8px;
  border-radius: 4px;
  color: var(--error);
}

.forbidden-words-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px 0;
}

.forbidden-words-list::-webkit-scrollbar {
  width: 4px;
}

.forbidden-words-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.forbidden-words-list::-webkit-scrollbar-thumb {
  background: var(--warning);
  border-radius: 2px;
}

.forbidden-word-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 8px;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
  transition: background 0.2s;
}

.forbidden-word-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.forbidden-word-number {
  color: var(--text-secondary);
  font-size: 0.8rem;
  min-width: 24px;
  font-weight: 600;
  opacity: 0.6;
}

.forbidden-word-badge {
  background: rgba(255, 59, 48, 0.15);
  color: var(--error);
  padding: 0 8px;
  border-radius: 4px;
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.8rem;
  min-width: 60px;
  text-align: center;
}

.forbidden-word-context {
  color: var(--text-secondary);
  font-size: 0.85rem;
  word-break: break-word;
  flex: 1;
}

.stat-badge.bad {
  background: rgba(255, 59, 48, 0.15);
  color: var(--error);
}

.stat-badge.good {
  background: rgba(52, 199, 89, 0.15);
  color: var(--success);
}

/* ===== AUTH ===== */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 50;
}
.auth-card {
  width: min(100%, 420px);
  padding: 32px;
  border-radius: 18px;
  background: rgba(17, 18, 31, 0.94);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 24px 70px rgba(0,0,0,0.4);
  backdrop-filter: blur(18px);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}
.auth-card > p {
  margin: 0 0 24px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}
.auth-submit {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.auth-error {
  margin: 8px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255, 59, 48, 0.12);
  border: 1px solid rgba(255, 59, 48, 0.22);
  color: var(--error);
  font-size: 0.85rem;
}
.header-user {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.forbidden-page-url-link {
  color: var(--text-primary);
  text-decoration: none;
  word-break: break-all;
}
.forbidden-page-url-link:hover {
  text-decoration: underline;
}
.forbidden-word-open {
  flex: 0 0 auto;
  font-size: 0.78rem;
  color: var(--primary);
  text-decoration: none;
  padding: 2px 7px;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent);
  border-radius: 5px;
  white-space: nowrap;
}
.forbidden-word-open:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
}

@media (max-width: 600px) {
  .auth-card { padding: 24px 20px; }
  .header-user { display: none; }
  .forbidden-word-item { flex-wrap: wrap; }
  .forbidden-word-context { flex-basis: 100%; }
}
