/* Streaming Dashboard — Subsavvy */

/* Override body background for dashboard (keep theme colors) */
body { background: var(--bg); }

.dash-page {
  padding: 100px 0 80px;
  min-height: 100vh;
}

/* Header */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}
.dash-title {
  font-family: 'Outfit', sans-serif;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 8px;
}
.dash-subtitle {
  color: var(--fg-2);
  font-size: 16px;
}

.stack-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
  font-size: 14px;
  color: var(--fg-2);
}
.stack-badge strong { color: var(--cyan); }
.stack-badge-dot {
  width: 8px; height: 8px;
  background: var(--cyan);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

/* Alerts */
#alerts-container {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.alert-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255,77,106,0.1);
  border: 1px solid rgba(255,77,106,0.3);
  border-radius: 12px;
  padding: 16px 20px;
  animation: slideDown 0.3s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.alert-icon { font-size: 20px; }
.alert-body { flex: 1; }
.alert-title {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--red);
  margin-bottom: 4px;
}
.alert-detail {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.5;
}
.alert-detail strong { color: var(--fg); }
.alert-dismiss {
  background: none;
  border: none;
  color: var(--fg-2);
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.2s;
}
.alert-dismiss:hover { background: rgba(255,255,255,0.1); }
.no-overlap-msg {
  color: var(--green);
  font-size: 13px;
  padding: 12px 16px;
  background: rgba(0,230,118,0.08);
  border: 1px solid rgba(0,230,118,0.2);
  border-radius: 10px;
}

/* Filters */
.dash-filters {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.filter-group { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 80px;
}
.filter-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-pill {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.filter-pill:hover { border-color: rgba(0,217,255,0.3); color: var(--fg); }
.filter-pill.active {
  background: rgba(0,217,255,0.15);
  border-color: rgba(0,217,255,0.4);
  color: var(--cyan);
}

/* Sort bar */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.sort-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sort-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
}
.sort-btn:hover { border-color: rgba(0,217,255,0.3); color: var(--fg); }
.sort-btn.active {
  background: rgba(0,217,255,0.1);
  border-color: rgba(0,217,255,0.3);
  color: var(--cyan);
}
.results-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--fg-2);
}

/* Comparison table */
.compare-table {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 48px;
}
.compare-table-header {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.4fr 0.8fr;
  padding: 14px 24px;
  background: rgba(255,255,255,0.03);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-2);
  border-bottom: 1px solid var(--border);
}
.compare-row {
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr 1.4fr 0.8fr;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  transition: background 0.2s;
  cursor: pointer;
}
.compare-row:last-child { border-bottom: none; }
.compare-row:hover { background: rgba(255,255,255,0.02); }
.compare-row-stacked {
  background: rgba(0,230,118,0.04);
  border-left: 3px solid var(--green);
}
.compare-row-stacked:hover { background: rgba(0,230,118,0.07); }

.compare-logo {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  font-family: 'Outfit', sans-serif;
  color: white;
  flex-shrink: 0;
}
.compare-service-name {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
}
.compare-service-tag {
  font-size: 11px;
  color: var(--fg-2);
  margin-top: 2px;
}
.compare-price-col { display: flex; flex-direction: column; gap: 4px; }
.compare-price {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
}
.ad-free-tag {
  font-size: 10px;
  color: var(--green);
}
.ad-tag {
  font-size: 10px;
  color: var(--fg-2);
}
.compare-score-col { display: flex; flex-direction: column; gap: 4px; }
.compare-score {
  font-size: 14px;
  color: var(--cyan);
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}
.score-bar {
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  border-radius: 4px;
  transition: width 0.3s;
}
.compare-best-for {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.4;
}
.compare-stack-col { display: flex; justify-content: flex-end; }
.stack-btn {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-2);
  cursor: pointer;
  transition: all 0.15s;
  font-family: 'DM Sans', sans-serif;
  white-space: nowrap;
}
.stack-btn:hover {
  border-color: rgba(0,217,255,0.3);
  color: var(--cyan);
}
.stack-btn-active {
  background: rgba(0,230,118,0.15);
  border-color: rgba(0,230,118,0.4);
  color: var(--green);
}

/* My Stack panel */
.stack-panel {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.stack-panel-header { margin-bottom: 24px; }
.stack-panel-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.stack-panel-header p { font-size: 14px; color: var(--fg-2); }
.stack-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}
.stack-toggle-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
  font-family: 'DM Sans', sans-serif;
}
.stack-toggle-btn:hover { border-color: rgba(0,217,255,0.3); }
.stack-toggle-btn.active {
  border-color: rgba(0,230,118,0.4);
  background: rgba(0,230,118,0.08);
}
.stack-toggle-icon {
  width: 28px; height: 28px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  font-family: 'Outfit', sans-serif;
}
.stack-toggle-name {
  flex: 1;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.stack-toggle-price {
  font-size: 12px;
  color: var(--fg-2);
}
.stack-toggle-check {
  font-size: 14px;
  color: var(--green);
  opacity: 0;
  transition: opacity 0.15s;
}
.stack-toggle-btn.active .stack-toggle-check { opacity: 1; }

.stack-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(0,217,255,0.08), rgba(255,184,77,0.06));
  border: 1px solid rgba(0,217,255,0.2);
  border-radius: 14px;
  flex-wrap: wrap;
  gap: 16px;
}
.stack-total-label { font-size: 14px; color: var(--fg-2); display: block; }
.stack-total-value {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--amber);
}
#stack-savings { color: var(--fg-2); font-size: 13px; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
}
.modal-content {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  color: var(--fg-2);
  font-size: 18px;
  cursor: pointer;
}
.modal-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: white;
}
.modal-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.modal-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.modal-subtitle { font-size: 13px; color: var(--fg-2); }
.modal-body { font-size: 14px; color: var(--fg-2); line-height: 1.6; margin-bottom: 20px; }
.modal-overlaps { display: flex; flex-direction: column; gap: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .compare-table-header { grid-template-columns: 1.5fr 1fr 0.8fr; }
  .compare-table-header span:nth-child(4) { display: none; }
  .compare-row { grid-template-columns: 1.5fr 1fr 0.8fr; }
  .compare-row span.compare-best-for { display: none; }
  .dash-title { font-size: 28px; }
  .dash-header { flex-direction: column; }
}

@media (max-width: 480px) {
  .compare-table-header { grid-template-columns: 1fr 1fr; }
  .compare-row { grid-template-columns: 1fr 1fr; }
  .compare-stack-col { display: none; }
  .dash-filters { padding: 16px; }
  .stack-panel { padding: 20px; }
}