body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 15px;
  max-width: 900px;
  margin: auto;
  background: #f5f5f5;
  min-height: 100vh;
}

.container {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

h2 {
  color: #2c3e50;
  margin-bottom: 6px;
  font-size: 1.8rem;
}
.subtitle {
  display: block;
  font-size: 0.85rem;
  color: #7f8c8d;
  font-weight: normal;
  margin-top: 4px;
}
.lead {
  color: #555;
  font-size: 0.9rem;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* Agent status pills */
.agent-status {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: #ecf0f1;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.agent-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: white;
  font-weight: 600;
}
.agent-dot { width: 8px; height: 8px; border-radius: 50%; }
.agent-dot.online { background: #27ae60; }
.agent-dot.offline { background: #e74c3c; }

textarea {
  width: 100%;
  height: 150px;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-family: monospace;
  font-size: 14px;
  resize: vertical;
  box-sizing: border-box;
}

.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.control-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.control-group label {
  font-weight: bold;
  font-size: 12px;
  color: #555;
}
select, button {
  padding: 12px 15px;
  border: 2px solid #3498db;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}
button {
  background: #3498db;
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
  border: none;
  width: 100%;
}
button:hover:not(:disabled) {
  background: #2980b9;
  transform: translateY(-1px);
}
button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}
.button-group {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}
.export-btn { background: #27ae60; border-color: #27ae60; }
.export-btn:hover { background: #229954; }

.info-box {
  margin: 20px 0;
  padding: 15px;
  background: #ecf0f1;
  border-radius: 8px;
  border-left: 4px solid #3498db;
  font-size: 14px;
  line-height: 1.6;
}
.info-note {
  font-size: 12px;
  color: #7f8c8d;
  margin-top: 6px;
}

.error-box {
  margin: 16px 0;
  padding: 12px 15px;
  background: #fdecea;
  border-left: 4px solid #e74c3c;
  border-radius: 8px;
  color: #c0392b;
  font-size: 14px;
}

.results-container { margin-top: 20px; }
.results-header {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 15px;
}
.results-title { font-size: 1.3rem; color: #2c3e50; margin: 0; }

.progress-bar {
  width: 100%;
  height: 20px;
  background: #ecf0f1;
  border-radius: 10px;
  overflow: hidden;
  margin: 10px 0;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  width: 0%;
  transition: width 0.3s ease;
}

.results-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 65vh;
  overflow-y: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  background: #fafafa;
}

.result-card {
  background: white;
  border-radius: 8px;
  border-left: 4px solid #bdc3c7;
  padding: 12px 14px;
  transition: all 0.2s;
}
.result-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.result-card.all-accessible { border-left-color: #27ae60; }
.result-card.all-blocked { border-left-color: #e74c3c; }
.result-card.mixed { border-left-color: #f39c12; }
.result-card.checking { border-left-color: #f39c12; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }

.result-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.result-domain {
  font-weight: bold;
  font-family: monospace;
  word-break: break-all;
  font-size: 14px;
}
.copy-btn {
  background: #95a5a6;
  color: white;
  border: none;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  cursor: pointer;
  transition: all 0.2s;
  width: auto;
  min-width: 40px;
  flex-shrink: 0;
}
.copy-btn:hover { background: #7f8c8d; transform: none; }
.copy-btn.copied { background: #27ae60; }

.provider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.provider-badge {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  color: white;
  min-width: 90px;
  flex: 1;
}
.provider-badge .provider-name { font-weight: bold; font-size: 10px; opacity: 0.85; text-transform: uppercase; }
.provider-badge .provider-verdict { font-weight: bold; }
.provider-badge .provider-detail { font-size: 10px; opacity: 0.9; word-break: break-word; }
.provider-badge.accessible { background: #27ae60; }
.provider-badge.blocked { background: #e74c3c; }
.provider-badge.error { background: #8e44ad; }
.provider-badge.checking { background: #f39c12; }
.provider-badge.unknown { background: #95a5a6; }
.provider-badge.stale { opacity: 0.7; }

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-weight: bold;
}
.summary-item {
  padding: 8px 12px;
  border-radius: 6px;
  color: white;
  font-size: 12px;
  flex: 1;
  text-align: center;
  min-width: 90px;
}
.summary-item.total { background: #34495e; }

.legend-note { color: #7f8c8d; font-size: 12px; margin-top: 10px; }

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2ecc71;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  z-index: 1000;
  transform: translateX(120%);
  transition: transform 0.3s ease;
}
.toast.show { transform: translateX(0); }

/* Mobile responsive */
@media (max-width: 768px) {
  body { padding: 10px; }
  .container { padding: 15px; border-radius: 8px; }
  h2 { font-size: 1.5rem; text-align: center; }
  textarea { height: 120px; font-size: 16px; }
  .controls { grid-template-columns: 1fr; gap: 15px; }
  .button-group { flex-direction: column; gap: 10px; }
  .results-header { text-align: center; }
  .results-title { font-size: 1.1rem; }
  .summary { justify-content: center; }
  .summary-item { font-size: 11px; padding: 6px 8px; }
  .results-grid { max-height: 55vh; padding: 10px; }
  .provider-row { flex-direction: column; }
  .provider-badge { min-width: unset; }
  .toast { top: 10px; right: 10px; left: 10px; transform: translateY(-120%); }
  .toast.show { transform: translateY(0); }
}

@media (max-width: 480px) {
  .container { padding: 12px; }
  h2 { font-size: 1.3rem; }
  .summary-item { font-size: 10px; padding: 5px 6px; }
  .result-domain { font-size: 13px; }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  body { background: #1a1a1a; color: #e0e0e0; }
  .container { background: #2d2d2d; box-shadow: 0 4px 6px rgba(0,0,0,0.3); }
  h2 { color: #ffffff; }
  .lead { color: #b5b5b5; }
  .agent-status { background: #3d3d3d; }
  .agent-pill { background: #2d2d2d; }
  textarea { background: #3d3d3d; border-color: #555; color: #e0e0e0; }
  .info-box { background: #3d3d3d; }
  .error-box { background: #3a2323; }
  .results-grid { background: #3d3d3d; border-color: #555; }
  .result-card { background: #4d4d4d; }
  .result-card:hover { background: #5a5a5a; }
  .legend-note, .info-note { color: #9aa0aa; }
}
