/* =====================================================
   PWNED CHECKER — STYLESHEET
   ===================================================== */

.nav-active { color: var(--accent) !important; background: rgba(0,212,170,.1) !important; }
.flex-1 { flex: 1; }
.mono { font-family: 'Courier New', monospace; background: var(--bg3); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* =====================================================
   HERO
   ===================================================== */
.pwned-hero {
  position: relative; overflow: hidden;
  padding: 80px 0 60px;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(239,68,68,.12) 0%, transparent 70%);
}
.pwned-hero-bg { position: absolute; inset: 0; pointer-events: none; }
.ph-shape { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .15; }
.ph-shape.s1 { width: 500px; height: 500px; background: #ef4444; top:-200px; right:-100px; }
.ph-shape.s2 { width: 300px; height: 300px; background: #7c3aed; bottom:-100px; left:5%; }

.pwned-hero-content { position: relative; text-align: center; }
.pwned-hero-logo {
  width: 88px; height: 88px; border-radius: 24px; margin: 0 auto 24px;
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25);
  display: flex; align-items: center; justify-content: center; color: #f87171;
}
.pwned-hero-title {
  font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 900;
  color: #fff; margin-bottom: 14px; line-height: 1.2;
}
.pwned-hero-desc { color: var(--muted); max-width: 560px; margin: 0 auto 36px; font-size: .97rem; }
.pwned-hero-desc strong { color: var(--text); }

/* Hero stats */
.hero-stats-row {
  display: flex; align-items: center; justify-content: center;
  gap: 0; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 32px;
  max-width: 600px; margin: 0 auto;
}
.hero-stat-item { text-align: center; padding: 0 28px; }
.hero-stat-num { display: block; font-size: 1.6rem; font-weight: 800; color: var(--danger); }
.hero-stat-lbl { font-size: .75rem; color: var(--muted); margin-top: 4px; display: block; }
.hero-stat-sep { width: 1px; height: 40px; background: var(--border); }

/* =====================================================
   TABS
   ===================================================== */
.pwned-tabs-bar {
  background: var(--bg2); border-bottom: 1px solid var(--border);
  position: sticky; top: 68px; z-index: 90;
}
.pwned-tabs { display: flex; gap: 4px; padding: 10px 0; overflow-x: auto; scrollbar-width: none; }
.pwned-tabs::-webkit-scrollbar { display: none; }
.pwned-tab {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid transparent;
  color: var(--muted); font-family: var(--font); font-size: .88rem;
  padding: 8px 20px; border-radius: 100px; cursor: pointer;
  white-space: nowrap; transition: all .2s; font-weight: 500;
}
.pwned-tab:hover { color: var(--text); border-color: var(--border); }
.pwned-tab.active {
  background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.3);
  color: #f87171; font-weight: 700;
}

/* =====================================================
   MAIN
   ===================================================== */
.pwned-main { padding: 48px 0 80px; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* =====================================================
   CHECK CARD
   ===================================================== */
.check-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  max-width: 760px; margin: 0 auto;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.check-card-header {
  display: flex; align-items: flex-start; gap: 18px; margin-bottom: 28px;
}
.check-card-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.email-icon { background: rgba(59,130,246,.12); color: #60a5fa; }
.pass-icon  { background: rgba(0,212,170,.12);  color: var(--accent); }
.check-card-header h2 { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.check-card-header p  { font-size: .85rem; color: var(--muted); }

.search-row { display: flex; gap: 12px; margin-bottom: 12px; }
.privacy-note-sm {
  display: flex; align-items: center; gap: 7px;
  font-size: .78rem; color: var(--muted); margin-bottom: 24px;
}
.kanon-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(0,212,170,.06); border: 1px solid rgba(0,212,170,.2);
  border-radius: 8px; padding: 10px 14px; font-size: .8rem;
  color: var(--muted); margin-bottom: 20px; line-height: 1.5;
}

/* =====================================================
   RESULTS
   ===================================================== */
.result-safe {
  background: rgba(34,197,94,.07); border: 1px solid rgba(34,197,94,.25);
  border-radius: 12px; padding: 22px 24px; margin-top: 20px;
}
.result-pwned {
  background: rgba(239,68,68,.07); border: 1px solid rgba(239,68,68,.25);
  border-radius: 12px; padding: 22px 24px; margin-top: 20px;
}
.result-header {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.result-icon { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.result-safe  .result-icon { background: rgba(34,197,94,.15);  color: #4ade80; }
.result-pwned .result-icon { background: rgba(239,68,68,.15);  color: #f87171; }
.result-title { font-size: 1.05rem; font-weight: 800; }
.result-safe  .result-title { color: #4ade80; }
.result-pwned .result-title { color: #f87171; }
.result-sub   { font-size: .82rem; color: var(--muted); margin-top: 3px; }

/* Breach chips in email result */
.breach-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.breach-chip {
  display: flex; align-items: center; gap: 7px;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  border-radius: 8px; padding: 6px 12px; font-size: .78rem; color: var(--text);
  cursor: pointer; transition: all .2s;
}
.breach-chip:hover { border-color: var(--danger); background: rgba(239,68,68,.15); }
.breach-chip-logo {
  width: 20px; height: 20px; border-radius: 4px; object-fit: contain;
  background: var(--bg3);
}

/* Password count badge */
.pwn-count {
  display: inline-block; background: rgba(239,68,68,.15); color: #f87171;
  border: 1px solid rgba(239,68,68,.3); border-radius: 8px;
  padding: 6px 14px; font-size: 1rem; font-weight: 800; margin-top: 10px;
}

/* Recommendations */
.result-recs { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.06); }
.result-recs h4 { font-size: .82rem; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.result-recs ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.result-recs li { font-size: .83rem; color: var(--text); display: flex; gap: 8px; }
.result-recs li::before { content: '→'; color: var(--accent); flex-shrink: 0; }

/* =====================================================
   HOW IT WORKS
   ===================================================== */
.how-it-works {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px; margin-top: 24px;
}
.how-it-works h4 { font-size: .85rem; font-weight: 700; color: var(--accent); margin-bottom: 16px; }
.how-steps {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 8px;
}
.how-step {
  display: flex; align-items: flex-start; gap: 10px; flex: 1; min-width: 140px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; font-size: .78rem; color: var(--muted);
  line-height: 1.5;
}
.how-num {
  width: 22px; height: 22px; border-radius: 6px; flex-shrink: 0;
  background: rgba(0,212,170,.12); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800;
}
.how-arrow { color: var(--muted); font-size: 1.2rem; flex-shrink: 0; }

/* =====================================================
   BREACH DATABASE
   ===================================================== */
.breaches-toolbar {
  display: flex; gap: 14px; flex-wrap: wrap;
  margin-bottom: 20px; align-items: center;
}
.breaches-search-box { flex: 1; min-width: 220px; }

.breach-filters { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.filter-select {
  background: var(--card); border: 1px solid var(--border);
  color: var(--text); font-family: var(--font); font-size: .85rem;
  padding: 10px 14px; border-radius: 8px; cursor: pointer; outline: none;
  transition: border-color .2s;
}
.filter-select:focus { border-color: var(--accent); }

.breach-filter-check {
  display: flex; align-items: center; gap: 8px;
  font-size: .83rem; color: var(--muted); cursor: pointer; user-select: none;
}
.breach-filter-check input { display: none; }
.breach-filter-check .checkmark {
  width: 16px; height: 16px; border-radius: 4px; flex-shrink: 0;
  background: var(--bg3); border: 1.5px solid var(--border); position: relative; transition: all .2s;
}
.breach-filter-check input:checked + .checkmark { background: var(--accent); border-color: var(--accent); }
.breach-filter-check input:checked + .checkmark::after {
  content: ''; position: absolute; left: 3px; top: 0px;
  width: 5px; height: 9px; border: 2px solid #0a0f1e; border-top: none; border-left: none;
  transform: rotate(45deg);
}

.breaches-summary {
  font-size: .83rem; color: var(--muted); margin-bottom: 16px;
}
.breaches-summary span { color: var(--accent); font-weight: 700; }

/* Breaches Grid */
.breaches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.skeleton-breach {
  height: 160px; border-radius: var(--radius);
  background: linear-gradient(90deg, var(--bg3) 25%, var(--border) 50%, var(--bg3) 75%);
  background-size: 600px 100%;
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer { 0%{background-position:-600px 0} 100%{background-position:600px 0} }

/* Breach Card */
.breach-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px;
  cursor: pointer; transition: all .25s;
  display: flex; flex-direction: column; gap: 10px;
}
.breach-card:hover { border-color: rgba(239,68,68,.3); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(239,68,68,.08); }
.breach-card.sensitive { border-color: rgba(245,158,11,.2); }
.breach-card.sensitive:hover { border-color: rgba(245,158,11,.4); box-shadow: 0 8px 24px rgba(245,158,11,.08); }

.bc-top { display: flex; align-items: center; gap: 12px; }
.bc-logo {
  width: 38px; height: 38px; border-radius: 8px; object-fit: contain;
  background: var(--bg3); border: 1px solid var(--border); padding: 3px; flex-shrink: 0;
}
.bc-logo-fallback {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #f87171;
}
.bc-name { font-size: .95rem; font-weight: 700; color: #fff; }
.bc-domain { font-size: .73rem; color: var(--muted); margin-top: 1px; }

.bc-desc {
  font-size: .78rem; color: var(--muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

.bc-footer {
  display: flex; justify-content: space-between; align-items: center;
  font-size: .72rem; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto;
  flex-wrap: wrap; gap: 6px;
}
.bc-count { color: var(--danger); font-weight: 700; }
.bc-date  { color: var(--muted); }

.bc-badges { display: flex; gap: 5px; flex-wrap: wrap; }
.bc-badge {
  font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 100px;
}
.bc-badge-verified  { background: rgba(34,197,94,.12);  color: #4ade80;  border: 1px solid rgba(34,197,94,.2); }
.bc-badge-sensitive { background: rgba(245,158,11,.12); color: #fbbf24;  border: 1px solid rgba(245,158,11,.2); }
.bc-badge-spam      { background: rgba(100,116,139,.12);color: var(--muted); border: 1px solid var(--border); }

/* =====================================================
   BREACH DETAIL MODAL
   ===================================================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.8);
  backdrop-filter: blur(6px); z-index: 200;
  opacity: 0; pointer-events: none; transition: opacity .3s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }

.breach-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(.96);
  width: min(680px, 94vw); max-height: 85vh;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 18px; overflow-y: auto; z-index: 201;
  padding: 32px; opacity: 0; pointer-events: none;
  transition: all .3s cubic-bezier(.4,0,.2,1);
}
.breach-modal.open { opacity: 1; pointer-events: all; transform: translate(-50%, -50%) scale(1); }

.bm-header { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; }
.bm-logo {
  width: 60px; height: 60px; border-radius: 14px; object-fit: contain;
  background: var(--bg3); border: 1px solid var(--border); padding: 4px; flex-shrink: 0;
}
.bm-logo-fb {
  width: 60px; height: 60px; border-radius: 14px; flex-shrink: 0;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; font-weight: 900; color: #f87171;
}
.bm-header h2 { font-size: 1.3rem; font-weight: 800; color: #fff; margin-bottom: 5px; }
.bm-domain { font-size: .83rem; color: var(--muted); }
.bm-badges { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }

.bm-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px;
}
.bm-stat {
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; text-align: center;
}
.bm-stat-num { font-size: 1.2rem; font-weight: 800; color: var(--accent); display: block; }
.bm-stat-lbl { font-size: .72rem; color: var(--muted); margin-top: 3px; display: block; }

.bm-desc {
  font-size: .88rem; color: var(--text); line-height: 1.8; margin-bottom: 20px;
}
.bm-section { margin-bottom: 18px; }
.bm-section h4 { font-size: .82rem; font-weight: 700; color: var(--accent); margin-bottom: 10px; }
.bm-classes { display: flex; flex-wrap: wrap; gap: 7px; }
.bm-class {
  background: var(--bg3); border: 1px solid var(--border);
  color: var(--muted); padding: 4px 12px; border-radius: 100px; font-size: .75rem;
}

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

/* =====================================================
   EMAIL BREACH DETAIL LIST
   ===================================================== */
.ebl-header {
  display: grid;
  grid-template-columns: 200px 1fr 1fr;
  gap: 8px;
  padding: 8px 14px;
  font-size: .72rem; font-weight: 700;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; margin-top: 18px;
  border-bottom: 1px solid var(--border);
}
.ebl-list { display: flex; flex-direction: column; margin-bottom: 20px; }

.ebl-row {
  display: grid;
  grid-template-columns: 200px 1fr 1fr 28px;
  gap: 10px; align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .18s;
}
.ebl-row:last-child { border-bottom: none; }
.ebl-row:hover { background: rgba(239,68,68,.05); }

.ebl-logo-wrap { display: flex; align-items: center; gap: 10px; }
.ebl-logo {
  width: 32px; height: 32px; border-radius: 7px;
  object-fit: contain; background: var(--bg3);
  border: 1px solid var(--border); padding: 2px; flex-shrink: 0;
}
.ebl-logo-fb {
  width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0;
  background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; font-weight: 800; color: #f87171;
}
.ebl-title  { font-size: .9rem; font-weight: 700; color: #fff; }
.ebl-domain { font-size: .72rem; color: var(--muted); margin-top: 2px; }

.ebl-stats { display: flex; flex-direction: column; gap: 4px; }
.ebl-stat  { display: flex; flex-direction: column; }
.ebl-stat-lbl { font-size: .68rem; color: var(--muted); }
.ebl-stat-val { font-size: .82rem; font-weight: 700; color: var(--text); }

.ebl-classes {
  font-size: .74rem; color: var(--muted); line-height: 1.6;
}
.ebl-arrow { color: var(--muted); display: flex; align-items: center; }
.ebl-row:hover .ebl-arrow { color: var(--danger); }

@media (max-width: 640px) {
  .ebl-header { display: none; }
  .ebl-row {
    grid-template-columns: 1fr 28px;
    grid-template-rows: auto auto;
  }
  .ebl-logo-wrap { grid-column: 1; }
  .ebl-stats { grid-column: 1; flex-direction: row; gap: 14px; }
  .ebl-classes { grid-column: 1; }
  .ebl-arrow { grid-column: 2; grid-row: 1; align-self: start; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */
@media (max-width: 640px) {
  .check-card { padding: 20px; }
  .search-row { flex-direction: column; }
  .hero-stats-row { gap: 16px; }
  .hero-stat-sep { display: none; }
  .breaches-toolbar { flex-direction: column; }
  .bm-stats { grid-template-columns: 1fr 1fr; }
  .how-steps { flex-direction: column; }
  .how-arrow { transform: rotate(90deg); }
}
