/* reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #000000;
  --surface:   #111111;
  --border:    #222222;
  --text:      #ffffff;
  --muted:     #888888;
  --green:     #4ade80;
  --red:       #f87171;
  --highlight: #1a2a1a;
  --red-bg:    #2a1a1a;
  --radius:    8px;
  --font:      'Google Sans', 'Segoe UI', sans-serif;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 48px 16px 80px;
}

main {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* header */
h1 {
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.subtitle {
  margin-top: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* controls */
.controls, .inputs { display: flex; flex-direction: column; gap: 16px; }

.row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.row label {
  width: 130px;
  font-size: 0.85rem;
  color: var(--muted);
  flex-shrink: 0;
}

select, input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s;
  width: 100%;
}

select { cursor: pointer; max-width: 220px; }

select:focus, input:focus { border-color: #444; }

.input-group { display: flex; flex-direction: column; gap: 8px; }
.input-group label { font-size: 0.85rem; color: var(--muted); }

/* button */
button#analyze-btn {
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 28px;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.2s;
}

button#analyze-btn:hover { opacity: 0.85; }
button#analyze-btn:active { opacity: 0.7; }

/* result */
.result {
  display: flex;
  flex-direction: column;
  gap: 20px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.result.visible {
  opacity: 1;
  transform: translateY(0);
}

.result.hidden { display: none; }

/* score */
.score-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.score-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: lowercase;
}

.score-value {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  transition: color 0.4s;
}

.score-value.safe  { color: var(--green); }
.score-value.risky { color: var(--red);   }

/* verdict */
.verdict {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.6;
}

/* address display */
.addr-display { display: flex; flex-direction: column; gap: 10px; }

.addr-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.addr-tag {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
  padding-top: 2px;
  width: 58px;
}

.addr-text {
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  word-break: break-all;
  color: var(--text);
}

/* highlight spans inside addr-text */
.match   { color: var(--green); font-weight: 600; }
.mismatch { color: var(--text); }

/* scam-flagged character highlight with animation */
@keyframes flag {
  0%   { background: transparent; }
  40%  { background: rgba(248, 113, 113, 0.3); }
  100% { background: rgba(248, 113, 113, 0.15); }
}

.flagged {
  color: var(--red);
  font-weight: 600;
  border-radius: 3px;
  animation: flag 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* findings */
.findings {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.findings li {
  font-size: 0.82rem;
  color: var(--muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.6;
}

.findings li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: #444;
}

.findings li.bad  { color: var(--red);   }
.findings li.good { color: var(--green); }

/* divider between sections */
section + section { border-top: 1px solid var(--border); padding-top: 32px; }
