@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
  --bg-primary: #080c14;
  --bg-secondary: #0d1321;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --bg-input: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(139, 92, 246, 0.5);

  --accent-purple: #8b5cf6;
  --accent-blue: #3b82f6;
  --accent-cyan: #06b6d4;
  --accent-pink: #ec4899;
  --accent-green: #10b981;
  --accent-red: #ef4444;
  --accent-orange: #f59e0b;

  --grad-main: linear-gradient(135deg, #8b5cf6, #3b82f6, #06b6d4);
  --grad-card: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.1));
  --grad-btn: linear-gradient(135deg, #7c3aed, #2563eb);
  --grad-btn-hover: linear-gradient(135deg, #6d28d9, #1d4ed8);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 40px rgba(139, 92, 246, 0.2);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-btn: 0 4px 20px rgba(139, 92, 246, 0.4);
}

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 20% 10%, rgba(139,92,246,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(59,130,246,0.10) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 50%, rgba(6,182,212,0.05) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.4); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* ===================== HEADER ===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8, 12, 20, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-icon {
  width: 38px; height: 38px;
  background: var(--grad-main);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(139,92,246,0.4);
  animation: pulse-logo 3s ease-in-out infinite;
}

@keyframes pulse-logo {
  0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,0.4); }
  50% { box-shadow: 0 0 35px rgba(139,92,246,0.7); }
}

.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.header-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16,185,129,0.12);
  border: 1px solid rgba(16,185,129,0.25);
  color: var(--accent-green);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent-green);
  border-radius: 50%;
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ===================== MAIN LAYOUT ===================== */
.main {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ===================== HERO ===================== */
.hero {
  text-align: center;
  margin-bottom: 48px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.25);
  color: var(--accent-purple);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1.5px;
}

.gradient-text {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===================== STATS ===================== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  border-radius: var(--radius-full);
  transition: opacity 0.3s ease;
  opacity: 0;
}

.stat-card.total::before { background: var(--accent-blue); }
.stat-card.submitted::before { background: var(--accent-green); }
.stat-card.failed::before { background: var(--accent-red); }
.stat-card.pending::before { background: var(--accent-orange); }

.stat-card:hover { background: var(--bg-card-hover); transform: translateY(-2px); }
.stat-card:hover::before { opacity: 1; }

.stat-value {
  font-size: 36px;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  line-height: 1;
  margin-bottom: 6px;
}

.stat-card.total .stat-value { color: var(--accent-blue); }
.stat-card.submitted .stat-value { color: var(--accent-green); }
.stat-card.failed .stat-value { color: var(--accent-red); }
.stat-card.pending .stat-value { color: var(--accent-orange); }

.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ===================== GLASS CARD ===================== */
.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-card);
  transition: border-color 0.3s ease;
}

.glass-card:hover { border-color: rgba(255,255,255,0.12); }

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-title .icon {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.card-title .icon.purple { background: rgba(139,92,246,0.2); }
.card-title .icon.blue { background: rgba(59,130,246,0.2); }
.card-title .icon.cyan { background: rgba(6,182,212,0.2); }

/* ===================== FORM ===================== */
.input-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group.full { grid-column: 1 / -1; }

.input-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.input-label span { color: var(--accent-purple); margin-left: 3px; }

.input-field, .select-field {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 12px 16px;
  width: 100%;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
}

.input-field::placeholder { color: var(--text-muted); }

.input-field:focus, .select-field:focus {
  border-color: var(--border-active);
  background: rgba(139,92,246,0.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.1);
}

.select-wrapper { position: relative; }

.select-wrapper::after {
  content: '▾';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 13px;
}

.select-field { cursor: pointer; }
.select-field option { background: #1a1f2e; color: var(--text-primary); }

.range-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
}

input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-track {
  background: var(--bg-input);
  height: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--grad-main);
  margin-top: -7px;
  box-shadow: 0 0 12px rgba(139,92,246,0.5);
}

.range-value {
  font-size: 14px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-purple);
  min-width: 40px;
  text-align: right;
}

.platform-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.platform-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  user-select: none;
}

.platform-tag.active {
  background: rgba(139,92,246,0.15);
  border-color: rgba(139,92,246,0.4);
  color: var(--accent-purple);
}

.platform-tag:not(.active) {
  background: var(--bg-input);
  border-color: var(--border);
  color: var(--text-muted);
}

.platform-tag:hover { transform: translateY(-1px); }

/* ===================== BUTTONS ===================== */
.btn-row {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.2s;
}

.btn:hover::after { opacity: 1; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled:hover::after { opacity: 0; }

.btn-primary {
  background: var(--grad-btn);
  color: #fff;
  box-shadow: var(--shadow-btn);
  flex: 1;
}

.btn-primary:hover:not(:disabled) {
  background: var(--grad-btn-hover);
  box-shadow: 0 6px 28px rgba(139,92,246,0.55);
  transform: translateY(-1px);
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-card-hover);
  border-color: rgba(255,255,255,0.15);
  color: var(--text-primary);
}

.btn-success {
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.3);
  color: var(--accent-green);
}

.btn-success:hover:not(:disabled) {
  background: rgba(16,185,129,0.25);
  transform: translateY(-1px);
}

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn.loading .spinner { display: block; }
.btn.loading .btn-icon { display: none; }

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

/* ===================== PROGRESS ===================== */
.progress-section {
  margin-top: 28px;
  display: none;
}

.progress-section.visible { display: block; }

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

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

.progress-pct {
  font-size: 13px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-purple);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.progress-bar-fill {
  height: 100%;
  background: var(--grad-main);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.4s ease;
  box-shadow: 0 0 10px rgba(139,92,246,0.5);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0; left: -100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer { to { left: 100%; } }

.progress-status {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  font-family: 'JetBrains Mono', monospace;
}

/* ===================== LOG ===================== */
.log-box {
  background: #060a10;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  height: 140px;
  overflow-y: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  margin-top: 16px;
  display: none;
}

.log-box.visible { display: block; }
.log-entry { padding: 2px 0; line-height: 1.6; }
.log-entry.success { color: var(--accent-green); }
.log-entry.error { color: var(--accent-red); }
.log-entry.info { color: var(--accent-cyan); }
.log-entry.warn { color: var(--accent-orange); }

/* ===================== RESULTS TABLE ===================== */
.results-section { margin-top: 32px; display: none; }
.results-section.visible { display: block; }

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.results-title {
  font-size: 18px;
  font-weight: 700;
}

.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }

thead th {
  background: rgba(255,255,255,0.04);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 14px 16px;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s ease;
}

tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255,255,255,0.03); }

tbody td {
  padding: 12px 16px;
  vertical-align: middle;
  color: var(--text-secondary);
}

.td-no {
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
  font-size: 12px;
}

.td-platform {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.platform-emoji {
  font-size: 14px;
  width: 24px;
  text-align: center;
}

.td-url a {
  color: var(--accent-blue);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  transition: color 0.2s;
  max-width: 280px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.td-url a:hover { color: var(--accent-cyan); text-decoration: underline; }

.type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.type-badge.web2 { background: rgba(139,92,246,0.15); color: var(--accent-purple); }
.type-badge.social { background: rgba(59,130,246,0.15); color: var(--accent-blue); }
.type-badge.directory { background: rgba(6,182,212,0.15); color: var(--accent-cyan); }
.type-badge.forum { background: rgba(245,158,11,0.15); color: var(--accent-orange); }
.type-badge.profile { background: rgba(236,72,153,0.15); color: var(--accent-pink); }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-badge.pending { background: rgba(245,158,11,0.12); color: var(--accent-orange); }
.status-badge.pending::before { background: var(--accent-orange); animation: blink 1s ease-in-out infinite; }

.status-badge.processing { background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.status-badge.processing::before { background: var(--accent-blue); animation: blink 0.6s ease-in-out infinite; }

.status-badge.submitted { background: rgba(16,185,129,0.12); color: var(--accent-green); }
.status-badge.submitted::before { background: var(--accent-green); }

.status-badge.failed { background: rgba(239,68,68,0.12); color: var(--accent-red); }
.status-badge.failed::before { background: var(--accent-red); }

/* ===================== PING SECTION ===================== */
.ping-section {
  margin-top: 20px;
  display: none;
  padding: 16px 20px;
  background: rgba(6,182,212,0.06);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: var(--radius-md);
}

.ping-section.visible { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.ping-wave {
  position: relative;
  width: 24px; height: 24px;
  flex-shrink: 0;
}

.ping-wave::before, .ping-wave::after {
  content: '';
  position: absolute;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  animation: wave 1.5s ease-out infinite;
}

.ping-wave::after { animation-delay: 0.5s; }

@keyframes wave {
  0% { inset: 30%; opacity: 1; }
  100% { inset: -20%; opacity: 0; }
}

.ping-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-cyan);
}

.ping-targets {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.ping-target {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
}

/* ===================== FOOTER ===================== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer span {
  background: var(--grad-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

/* ===================== ANIMATIONS ===================== */
.fade-in { animation: fadeIn 0.4s ease forwards; }

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

/* Counter bump animation */
@keyframes countBump {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.25); }
  100% { transform: scale(1); }
}

.count-bump { animation: countBump 0.35s cubic-bezier(0.34,1.56,0.64,1) forwards; }

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  min-width: 280px;
  max-width: 380px;
  backdrop-filter: blur(20px);
  animation: toastIn 0.3s ease, toastOut 0.3s ease 3.7s forwards;
  box-shadow: var(--shadow-card);
}

.toast.success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: var(--accent-green); }
.toast.error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: var(--accent-red); }
.toast.info { background: rgba(59,130,246,0.15); border: 1px solid rgba(59,130,246,0.3); color: var(--accent-blue); }

@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .main { padding: 24px 16px 60px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .input-grid { grid-template-columns: 1fr; }
  .input-group.full { grid-column: 1; }
  .glass-card { padding: 24px 20px; }
  .btn-row { flex-direction: column; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 28px; }
}
