/* tracker-simulator.css */
/* Tracker Blocker Simulator specific styles */

.simulator-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 16px;
}

/* Input section card */
.input-section {
  background: linear-gradient(180deg, rgba(26, 31, 58, 0.95), rgba(19, 26, 49, 0.95));
  border-radius: 18px;
  padding: 1.6rem 1.5rem 1.4rem 1.5rem;
  margin-bottom: 1.8rem;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.input-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.input-section > * {
  position: relative;
  z-index: 1;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.4rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}

.tab {
  padding: 0.55rem 1.25rem;
  background: transparent;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.18s ease-out;
}

.tab.active {
  background: rgba(0, 212, 255, 0.16);
  color: var(--primary-cyan);
  border-color: rgba(0, 212, 255, 0.55);
  box-shadow: 0 10px 24px rgba(0, 212, 255, 0.25);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Inputs */
.url-input,
.html-textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: 11px;
  font-size: 0.94rem;
  border: 1px solid var(--border-color);
  background: rgba(5, 8, 16, 0.65);
  color: var(--text-primary);
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.url-input::placeholder,
.html-textarea::placeholder {
  color: #64748b;
}

.url-input:focus,
.html-textarea:focus {
  outline: none;
  border-color: var(--primary-cyan);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(5, 8, 16, 0.85);
}

.html-textarea {
  min-height: 200px;
  font-family: var(--mono);
  resize: vertical;
  margin-top: 0.5rem;
}

/* Buttons row */
.input-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

/* Example buttons */
.example-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.2rem;
}

/* Toggle switch */
.toggle-switch {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #4b5563;
  transition: 0.35s;
  border-radius: 999px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: var(--darker-bg);
  transition: 0.35s;
  border-radius: 999px;
}

input:checked + .slider {
  background: linear-gradient(135deg, var(--primary-cyan), var(--secondary-blue));
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Results layout */
.results-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.3rem;
  margin-top: 1.8rem;
}

/* Result cards */
.result-card {
  background: linear-gradient(180deg, rgba(26, 31, 58, 0.95), rgba(19, 26, 49, 0.95));
  border-radius: 16px;
  padding: 1.3rem 1.25rem 1.2rem 1.25rem;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.result-card > * {
  position: relative;
  z-index: 1;
}

.result-card h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  color: var(--text-primary);
  font-size: 1.02rem;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.stat {
  text-align: center;
  padding: 0.7rem;
  border-radius: 12px;
  background: rgba(5, 8, 16, 0.65);
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Tracker list */
.tracker-list {
  max-height: 300px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: rgba(5, 8, 16, 0.65);
}

.tracker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  font-size: 0.88rem;
}

.tracker-item:last-child {
  border-bottom: none;
}

.tracker-domain {
  font-family: var(--mono);
  color: var(--text-primary);
}

.tracker-type {
  font-size: 0.72rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: rgba(5, 8, 16, 0.65);
}

/* Type color accents */
.tracker-analytics { 
  background: rgba(59, 130, 246, 0.18); 
  color: #bfdbfe; 
  border-color: rgba(59, 130, 246, 0.6); 
}

.tracker-ad { 
  background: rgba(248, 113, 113, 0.18); 
  color: #fecaca; 
  border-color: rgba(248, 113, 113, 0.7); 
}

.tracker-social { 
  background: rgba(234, 179, 8, 0.18); 
  color: #fef3c7; 
  border-color: rgba(234, 179, 8, 0.7); 
}

.tracker-fingerprint { 
  background: rgba(129, 140, 248, 0.18); 
  color: #e0e7ff; 
  border-color: rgba(129, 140, 248, 0.7); 
}

.tracker-behavior { 
  background: rgba(45, 212, 191, 0.18); 
  color: #ccfbf1; 
  border-color: rgba(45, 212, 191, 0.7); 
}

.blocked {
  text-decoration: line-through;
  opacity: 0.55;
}

/* Privacy badge / score */
.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.3rem;
}

.badge-safe {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fde68a;
}

.badge-danger {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

/* Preview section */
.preview-section {
  background: linear-gradient(180deg, rgba(26, 31, 58, 0.95), rgba(19, 26, 49, 0.95));
  border-radius: 18px;
  padding: 1.5rem 1.5rem 1.4rem 1.5rem;
  margin-top: 1.6rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}

.preview-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 60%);
  opacity: 0.35;
  pointer-events: none;
}

.preview-section > * {
  position: relative;
  z-index: 1;
}

.preview-section h3 {
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
  color: var(--text-primary);
}

.preview-section p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.iframe-container {
  width: 100%;
  height: 400px;
  border-radius: 14px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  margin-top: 1rem;
  background: rgba(5, 8, 16, 0.65);
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: var(--darker-bg);
}

/* Loading spinner */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(148, 163, 184, 0.25);
  border-top: 3px solid var(--primary-cyan);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
  .simulator-container {
    padding: 18px 14px 20px 14px;
  }

  .results-section {
    grid-template-columns: 1fr;
  }

  .tabs {
    flex-direction: column;
    align-items: flex-start;
  }
}