:root {
  --bg-main: #090d16;
  --bg-card: rgba(18, 26, 43, 0.75);
  --bg-card-hover: rgba(26, 37, 61, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-highlight: rgba(0, 242, 254, 0.3);
  
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --neon-green: #10b981;
  --neon-blue: #3b82f6;
  --neon-cyan: #06b6d4;
  --neon-purple: #8b5cf6;
  --neon-amber: #f59e0b;
  --neon-red: #ef4444;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --shadow-glow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Ambient Glow Background Orbs */
.bg-glow {
  position: fixed;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.15;
}
.bg-glow-1 {
  top: -100px;
  left: -100px;
  background: radial-gradient(circle, var(--neon-cyan), var(--neon-blue));
}
.bg-glow-2 {
  bottom: -150px;
  right: -100px;
  background: radial-gradient(circle, var(--neon-purple), var(--neon-green));
}

/* Glassmorphism Card Style */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-glow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}
.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Navbar Header */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  background: rgba(13, 19, 33, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
}
.logo-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.badge-tag {
  font-size: 11px;
  background: rgba(6, 182, 212, 0.2);
  color: var(--neon-cyan);
  border: 1px solid rgba(6, 182, 212, 0.4);
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
}
.logo-subtitle {
  font-size: 12px;
  color: var(--text-muted);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 8px;
  background: rgba(0, 0, 0, 0.3);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}
.nav-tab.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(59, 130, 246, 0.2));
  color: #fff;
  border: 1px solid rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.2);
}

/* Live Status Dot */
.live-status {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: 30px;
}
.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--neon-green);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}
.live-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--neon-green);
  letter-spacing: 0.5px;
}

/* Main Container & Tabs */
.main-container {
  max-width: 1400px;
  margin: 32px auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
}
.filter-group label {
  font-size: 14px;
  color: var(--text-muted);
}
.custom-select {
  background: rgba(13, 19, 33, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}
.custom-select:focus {
  border-color: var(--neon-cyan);
}

/* Stat Cards Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.stat-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-card.border-green { border-left: 4px solid var(--neon-green); }
.stat-card.border-blue { border-left: 4px solid var(--neon-blue); }
.stat-card.border-purple { border-left: 4px solid var(--neon-purple); }
.stat-card.border-amber { border-left: 4px solid var(--neon-amber); }

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-title {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.icon-green { background: rgba(16, 185, 129, 0.15); color: var(--neon-green); }
.icon-blue { background: rgba(59, 130, 246, 0.15); color: var(--neon-blue); }
.icon-purple { background: rgba(139, 92, 246, 0.15); color: var(--neon-purple); }
.icon-amber { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); }

.stat-value {
  font-size: 36px;
  font-weight: 700;
  margin: 14px 0 8px 0;
  font-family: 'JetBrains Mono', monospace;
}
.stat-foot {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.text-green { color: var(--neon-green); }
.text-blue { color: var(--neon-blue); }
.text-purple { color: var(--neon-purple); }
.text-amber { color: var(--neon-amber); }

/* Charts Section */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.chart-card h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chart-wrapper {
  height: 280px;
  position: relative;
}

/* Data Table */
.table-card {
  margin-bottom: 32px;
}
.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.table-header h3 {
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.table-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}
.badge-count {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  color: var(--neon-cyan);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.data-table th {
  background: rgba(0, 0, 0, 0.3);
  padding: 14px 16px;
  font-size: 12px;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color);
}
.data-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
}
.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.font-mono {
  font-family: 'JetBrains Mono', monospace;
}
.flag-icon {
  font-size: 18px;
  margin-right: 8px;
  vertical-align: middle;
}
.duration-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--neon-amber);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}
.referrer-badge {
  background: rgba(59, 130, 246, 0.15);
  color: var(--neon-blue);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
}

.empty-state {
  text-align: center;
  padding: 48px !important;
  color: var(--text-muted);
}
.empty-state i {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state .subtext {
  font-size: 12px;
  display: block;
  margin-top: 8px;
  color: var(--text-dim);
}

/* Inspector Hero & Search Box */
.inspector-hero {
  text-align: center;
  padding: 40px 24px;
  margin-bottom: 32px;
}
.inspector-hero h2 {
  font-size: 26px;
  margin-bottom: 8px;
}
.inspector-hero p {
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 28px auto;
}
.search-box {
  display: flex;
  gap: 12px;
  max-width: 750px;
  margin: 0 auto 20px auto;
}
.search-input-wrapper {
  position: relative;
  flex: 1;
}
.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 18px;
}
.search-input-wrapper input {
  width: 100%;
  background: rgba(13, 19, 33, 0.9);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 16px 20px 16px 50px;
  border-radius: var(--radius-md);
  font-size: 16px;
  outline: none;
  transition: all 0.2s ease;
}
.search-input-wrapper input:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.3);
}

.quick-examples {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-dim);
}
.btn-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 4px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
}
.btn-chip:hover {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
  background: rgba(6, 182, 212, 0.1);
}

/* Inspect Results Grid */
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
}
.bg-blue { background: rgba(59, 130, 246, 0.15); color: var(--neon-blue); }
.bg-green { background: rgba(16, 185, 129, 0.15); color: var(--neon-green); }
.bg-purple { background: rgba(139, 92, 246, 0.15); color: var(--neon-purple); }
.bg-amber { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); }

.card-detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
}
.detail-label {
  color: var(--text-muted);
}
.detail-val {
  font-weight: 500;
  color: var(--text-main);
  text-align: right;
  max-width: 60%;
  word-break: break-all;
}
.highlight-green { color: var(--neon-green); font-weight: 700; }
.highlight-amber { color: var(--neon-amber); font-weight: 700; }

/* Loading Spinner */
.inspect-loading {
  text-align: center;
  padding: 60px 24px;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(6, 182, 212, 0.1);
  border-top: 4px solid var(--neon-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Buttons & Inputs */
.btn {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--neon-cyan), var(--neon-blue));
  color: #fff;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: var(--neon-red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}
.btn-lg {
  padding: 16px 28px;
  font-size: 16px;
  border-radius: var(--radius-md);
}
.w-full { width: 100%; }

/* Domains Layout */
.domains-layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
}
.domain-form-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.card-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input {
  width: 100%;
  background: rgba(13, 19, 33, 0.8);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}
.form-group input:focus {
  border-color: var(--neon-cyan);
}

.domain-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.domain-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.domain-item-title {
  font-size: 16px;
  font-weight: 600;
}
.domain-item-url {
  font-size: 13px;
  color: var(--neon-cyan);
  font-family: 'JetBrains Mono', monospace;
}

.snippet-box {
  background: rgba(10, 14, 23, 0.9);
  border: 1px solid rgba(6, 182, 212, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: #a5f3fc;
  position: relative;
  word-break: break-all;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.btn-copy {
  background: rgba(6, 182, 212, 0.2);
  border: 1px solid rgba(6, 182, 212, 0.4);
  color: var(--neon-cyan);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.btn-copy:hover {
  background: rgba(6, 182, 212, 0.3);
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--neon-cyan);
  color: var(--text-main);
  padding: 14px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 1000;
  transition: all 0.3s ease;
}
.toast i { color: var(--neon-cyan); font-size: 18px; }

.hidden { display: none !important; }

/* ==============================================
   TAB 4: GALERIA DE SITES
   ============================================== */
.sites-gallery-header {
  text-align: center;
  padding: 30px 24px;
  margin-bottom: 24px;
}
.sites-gallery-header h2 {
  font-size: 24px;
  margin-bottom: 8px;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sites-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.site-card {
  padding: 0; /* Override glass-card default padding */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.site-card-img-wrapper {
  width: 100%;
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
  background: rgba(13, 19, 33, 0.8);
}
.site-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.site-card:hover .site-card-img {
  transform: scale(1.05);
}
.site-card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.site-card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}
.site-card-url {
  font-size: 13px;
  color: var(--neon-cyan);
  text-decoration: none;
  word-break: break-all;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.site-card-url:hover {
  color: #fff;
}
.site-card-details {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ==============================================
   LOGIN OVERLAY
   ============================================== */
.login-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(10px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 40px 32px;
}
.login-header {
  text-align: center;
  margin-bottom: 32px;
}
.login-header .logo-icon {
  margin: 0 auto 16px auto;
}
.login-header h2 {
  font-size: 24px;
  margin-bottom: 4px;
}
.login-header p {
  color: var(--neon-red);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.login-error {
  margin-top: 16px;
  color: var(--neon-red);
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 10px;
  border-radius: var(--radius-sm);
  text-align: center;
  font-size: 13px;
}
.text-red {
  color: var(--neon-red) !important;
}
