/* =====================================================
   Global Reset & Variables
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #1d6fa4;
  --blue-dark: #145580;
  --blue-light:#e8f4fd;
  --green:     #27ae60;
  --green-bg:  #eafaf1;
  --red:       #c0392b;
  --red-bg:    #fdf2f2;
  --yellow:    #f39c12;
  --yellow-bg: #fef9e7;
  --gray-100:  #f7f8fa;
  --gray-200:  #e9ecef;
  --gray-400:  #adb5bd;
  --gray-600:  #6c757d;
  --gray-800:  #343a40;
  --radius:    10px;
  --shadow:    0 2px 16px rgba(0,0,0,.09);
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.55;
}

/* =====================================================
   Header
   ===================================================== */
.site-header {
  background: var(--blue);
  color: #fff;
  padding: .85rem 1.5rem;
}
.header-inner { max-width: 900px; margin: 0 auto; }
.logo { font-size: 1.2rem; font-weight: 700; letter-spacing: .5px; }

/* =====================================================
   Hero / Search
   ===================================================== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 3rem 1.5rem 3.5rem;
}
.hero h1 { font-size: 2rem; margin-bottom: .4rem; }
.hero-sub { opacity: .85; margin-bottom: 1.75rem; font-size: 1.05rem; }

.search-bar {
  display: flex;
  max-width: 580px;
  margin: 0 auto .75rem;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.25);
}
.search-bar input {
  flex: 1;
  padding: .85rem 1.4rem;
  font-size: 1.05rem;
  border: none;
  outline: none;
  color: var(--gray-800);
}
.search-bar button {
  padding: .85rem 1.6rem;
  background: var(--yellow);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: background .2s;
  white-space: nowrap;
}
.search-bar button:hover:not(:disabled) { background: #d68910; }
.search-bar button:disabled { background: var(--gray-400); cursor: not-allowed; }
.btn-icon { margin-right: .25rem; }

.search-hint { font-size: .82rem; opacity: .75; }
.search-hint code {
  background: rgba(255,255,255,.2);
  padding: 1px 4px;
  border-radius: 3px;
}

/* Inline input error */
.input-error {
  min-height: 1.2em;
  font-size: .82rem;
  color: #ffd0cc;
  margin-top: .35rem;
}

/* Recent searches */
.recent-searches {
  margin-top: 1rem;
}
.recent-label {
  font-size: .8rem;
  opacity: .75;
  margin-bottom: .4rem;
}
.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  justify-content: center;
}
.recent-chip {
  background: rgba(255,255,255,.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  padding: .25rem .8rem;
  font-size: .82rem;
  cursor: pointer;
  transition: background .15s;
}
.recent-chip:hover { background: rgba(255,255,255,.32); }

/* =====================================================
   Result Area
   ===================================================== */
#result-area {
  max-width: 820px;
  margin: -1.5rem auto 2rem;
  padding: 0 1rem;
}

/* ---- Loading spinner ---- */
.loading {
  text-align: center;
  padding: 2.5rem;
  font-size: 1rem;
  color: var(--gray-600);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.spinner {
  display: inline-block;
  width: 28px; height: 28px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
  margin-right: .5rem;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- Report card wrapper ---- */
.report-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: slideUp .3s ease;
}
@keyframes slideUp {
  from { opacity:0; transform: translateY(12px); }
  to   { opacity:1; transform: translateY(0); }
}

/* ---- Report header ---- */
.report-header {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid var(--gray-200);
}
.avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
}
.report-header-info h2 {
  font-size: 1.35rem;
  margin-bottom: .2rem;
}
.report-phone {
  font-size: 1rem;
  color: var(--gray-600);
  margin-bottom: .4rem;
}

/* spam badge */
.badge {
  display: inline-block;
  padding: .2rem .65rem;
  border-radius: 20px;
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.badge-safe   { background: var(--green-bg);  color: var(--green); }
.badge-spam   { background: var(--red-bg);    color: var(--red);   }
.badge-warn   { background: var(--yellow-bg); color: var(--yellow);}

/* ---- Sections grid ---- */
.report-sections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 600px) {
  .report-sections { grid-template-columns: 1fr; }
}

.report-section {
  padding: 1.2rem 1.6rem;
  border-bottom: 1px solid var(--gray-200);
  border-right: 1px solid var(--gray-200);
}
.report-section:nth-child(even) { border-right: none; }
.report-section:last-child,
.report-section:nth-last-child(2):nth-child(odd) { border-bottom: none; }

.report-section h3 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--gray-600);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

.info-row {
  display: flex;
  gap: .5rem;
  margin-bottom: .45rem;
  font-size: .93rem;
}
.info-label {
  color: var(--gray-600);
  min-width: 100px;
  font-weight: 500;
  flex-shrink: 0;
}
.info-value { color: var(--gray-800); word-break: break-word; }

/* tag list (relatives, other numbers) */
.tag-list { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .3rem; }
.tag {
  background: var(--blue-light);
  color: var(--blue-dark);
  border-radius: 20px;
  padding: .2rem .7rem;
  font-size: .85rem;
}

/* social links — plain text, no mailto */
.social-item {
  font-size: .9rem;
  color: var(--gray-800);
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* spam meter */
.spam-meter { margin-top: .5rem; }
.spam-bar-bg {
  background: var(--gray-200);
  border-radius: 6px;
  height: 10px;
  overflow: hidden;
  margin-bottom: .35rem;
}
.spam-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width .5s ease;
}
.spam-bar-fill.low    { background: var(--green); }
.spam-bar-fill.medium { background: var(--yellow); }
.spam-bar-fill.high   { background: var(--red); }
.spam-label-text { font-size: .85rem; color: var(--gray-600); }

/* search count */
.search-count-row {
  font-size: .9rem;
  color: var(--gray-600);
  padding: .8rem 1.6rem;
  border-top: 1px solid var(--gray-200);
  text-align: right;
}

/* ---- Not found & error ---- */
.status-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.8rem;
  text-align: center;
  animation: slideUp .3s ease;
}
.status-icon { font-size: 2.5rem; margin-bottom: .6rem; }
.status-card h2 { margin-bottom: .5rem; font-size: 1.15rem; }
.status-card p  { color: var(--gray-600); font-size: .95rem; }

/* =====================================================
   How It Works
   ===================================================== */
.how-it-works {
  max-width: 820px;
  margin: 0 auto 3rem;
  padding: 0 1rem;
}
.how-it-works h2 {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--gray-800);
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 600px) { .steps { grid-template-columns: 1fr; } }

.step {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.2rem;
  text-align: center;
}
.step-icon { font-size: 1.8rem; display: block; margin-bottom: .5rem; }
.step h3 { font-size: .95rem; margin-bottom: .35rem; }
.step p  { font-size: .85rem; color: var(--gray-600); }

/* =====================================================
   Footer
   ===================================================== */
.site-footer {
  background: var(--gray-800);
  color: var(--gray-400);
  text-align: center;
  padding: 1.1rem;
  font-size: .85rem;
}
