/* ═══════════════════════════════════════════════════════════
   styles.css — Bulk SEO Audit Tool
   Premium dark glassmorphism design
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────── */
:root {
  --bg: #0b0b14;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(124, 92, 252, 0.6);

  --purple: #7c5cfc;
  --purple-light: #9d82fd;
  --purple-dim: rgba(124, 92, 252, 0.15);
  --purple-glow: rgba(124, 92, 252, 0.35);

  --teal: #00d4aa;
  --teal-dim: rgba(0, 212, 170, 0.15);
  --teal-glow: rgba(0, 212, 170, 0.3);

  --text-primary: #f0f0fa;
  --text-secondary: #9898bb;
  --text-muted: #5c5c80;

  --success: #22d47e;
  --error: #ff5b6a;
  --warning: #ffaa00;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;

  --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(124, 92, 252, 0.2);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

/* ── Background Orbs ────────────────────────────────────── */
.bg-orbs {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-1 {
  width: 600px; height: 600px;
  background: var(--purple);
  top: -150px; left: -150px;
  animation-duration: 22s;
}
.orb-2 {
  width: 500px; height: 500px;
  background: var(--teal);
  top: 40%; right: -150px;
  animation-duration: 18s;
  animation-delay: -5s;
}
.orb-3 {
  width: 400px; height: 400px;
  background: #c084fc;
  bottom: -100px; left: 30%;
  animation-duration: 25s;
  animation-delay: -10s;
}
@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(40px, -40px) scale(1.05); }
}

/* ── Layout ─────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(11, 11, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon { width: 32px; height: 32px; flex-shrink: 0; }
.logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}
.logo-text .accent { color: var(--purple-light); }

.header-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--purple-dim);
  color: var(--purple-light);
  border: 1px solid rgba(124, 92, 252, 0.3);
  letter-spacing: 0.03em;
}
.badge-teal {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(0, 212, 170, 0.3);
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  padding: 72px 0 48px;
  text-align: center;
}
.hero-inner { max-width: 700px; margin: 0 auto; }
.hero-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--teal);
  background: var(--teal-dim);
  border: 1px solid rgba(0, 212, 170, 0.25);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}
.hero-title {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(135deg, var(--purple-light), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.75;
}

/* ── Main Content ───────────────────────────────────────── */
.main-content { padding-bottom: 80px; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 32px;
  margin-bottom: 24px;
  transition: box-shadow var(--transition), border-color var(--transition);
  box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-hover); }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: 4px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 28px;
  width: fit-content;
}
.tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 20px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}
.tab:hover { color: var(--text-primary); }
.tab-active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 4px 12px var(--purple-glow);
}
.tab-active svg { opacity: 1; }

/* ── Input ──────────────────────────────────────────────── */
.tab-panel { animation: fadeIn 0.25s ease; }
.tab-panel.hidden { display: none; }

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

.input-group { margin-bottom: 24px; }
.input-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}
.label-count {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--teal);
  background: var(--teal-dim);
  padding: 2px 8px;
  border-radius: 999px;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.url-input {
  width: 100%;
  padding: 14px 18px 14px 44px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.url-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--purple-dim), 0 0 20px var(--purple-dim);
}
.url-input::placeholder { color: var(--text-muted); }

.url-textarea {
  width: 100%;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: 'Inter', monospace;
  line-height: 1.7;
  outline: none;
  resize: vertical;
  min-height: 160px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.url-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--purple-dim);
}
.url-textarea::placeholder { color: var(--text-muted); }

.input-hint {
  margin-top: 6px;
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-row {
  display: flex;
  gap: 12px;
  align-items: center;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background var(--transition);
}
.btn:hover::after { background: rgba(255,255,255,0.06); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--purple), #5b3de8);
  color: #fff;
  box-shadow: 0 4px 20px var(--purple-glow);
}
.btn-primary:hover { box-shadow: 0 8px 30px var(--purple-glow); transform: translateY(-1px); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-teal {
  background: linear-gradient(135deg, var(--teal), #00a884);
  color: #fff;
  box-shadow: 0 4px 20px var(--teal-glow);
}
.btn-teal:hover { box-shadow: 0 8px 30px var(--teal-glow); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.09); }

.btn-sm { padding: 9px 18px; font-size: 0.85rem; }

.btn-icon { font-size: 1.1rem; }

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 28px; height: 28px;
  border: 3px solid rgba(124, 92, 252, 0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Progress Card ──────────────────────────────────────── */
.progress-card { padding: 28px 32px; }
.progress-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}
.progress-spinner { flex-shrink: 0; }
.progress-info { flex: 1; min-width: 0; }
.progress-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}
.progress-url {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.progress-fraction {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--purple-light);
  white-space: nowrap;
}
.progress-track {
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--purple), var(--teal));
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px var(--purple-glow);
}

/* ── Stats Row ──────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.stat-purple .stat-value { color: var(--purple-light); }
.stat-teal .stat-value { color: var(--teal); }
.stat-success .stat-value { color: var(--success); }
.stat-error .stat-value { color: var(--error); }

/* ── Results Table Card ─────────────────────────────────── */
.results-card { padding: 0; overflow: hidden; }
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 12px;
}
.results-title {
  font-size: 1.1rem;
  font-weight: 700;
}
.results-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.table-scroll {
  overflow-x: auto;
  max-height: 520px;
  overflow-y: auto;
}
.table-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.table-scroll::-webkit-scrollbar-track { background: transparent; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 999px; }

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  white-space: nowrap;
}
.results-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
}
.results-table th {
  background: rgba(11, 11, 20, 0.95);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.7rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.results-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  color: var(--text-primary);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tbody tr:hover { background: rgba(255,255,255,0.02); }

.td-url {
  font-size: 0.75rem;
  color: var(--purple-light);
  max-width: 180px;
}
.td-num {
  color: var(--text-muted);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.td-len {
  font-weight: 600;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.len-good { color: var(--success); }
.len-warn { color: var(--warning); }
.len-bad { color: var(--error); }

.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.pill-success { background: rgba(34, 212, 126, 0.15); color: var(--success); }
.pill-error { background: rgba(255, 91, 106, 0.15); color: var(--error); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
}
.footer-inner { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.footer-text { font-size: 0.8rem; color: var(--text-muted); }
.footer-text.muted { opacity: 0.6; }

/* ── Utility ────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .card { padding: 20px 18px; }
  .hero { padding: 48px 0 32px; }
  .hero-title { font-size: 2rem; }
  .btn-row { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .results-header { flex-direction: column; align-items: flex-start; }
  .header-badges { display: none; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
}
