@import url('https://fonts.googleapis.com/css2?family=Fira+Mono:wght@400;500&family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&display=swap');

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #060910;
  --bg-secondary: #0a0e16;
  --surface: #0d1117;
  --surface-hover: #111827;
  --border: #1c2333;
  --border-bright: #2a3650;
  --accent: #00ffe5;
  --accent-dim: rgba(0, 255, 229, 0.12);
  --accent-glow: rgba(0, 255, 229, 0.35);
  --danger: #ff3c5f;
  --danger-dim: rgba(255, 60, 95, 0.08);
  --warn: #ffb800;
  --warn-dim: rgba(255, 184, 0, 0.08);
  --safe: #00e676;
  --safe-dim: rgba(0, 230, 118, 0.08);
  --muted: #4f5a6e;
  --muted-bright: #6c7ea1;
  --text: #cdd5e0;
  --text-bright: #e2e8f4;
  --mono: 'Fira Mono', monospace;
  --display: 'Bebas Neue', sans-serif;
  --body: 'DM Sans', sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --transition: 0.2s ease;
}

html,
body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 255, 229, 0.012) 2px,
    rgba(0, 255, 229, 0.012) 4px
  );
  pointer-events: none;
  z-index: 999;
}

body::after {
  content: '';
  position: fixed;
  width: 800px;
  height: 800px;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 255, 229, 0.035) 0%,
    transparent 65%
  );
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  padding: 64px 24px 120px;
}

header {
  text-align: center;
  margin-bottom: 60px;
  animation: fadeDown 0.7s ease both;
}

.logo-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.logo-icon {
  width: 46px;
  height: 46px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 0 20px var(--accent-glow),
    inset 0 0 12px rgba(0, 255, 229, 0.05);
  animation: pulse-border 3s ease-in-out infinite;
  background: rgba(0, 255, 229, 0.03);
}

.logo-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--accent);
  filter: drop-shadow(0 0 4px var(--accent));
}

@keyframes pulse-border {
  0%,
  100% {
    box-shadow:
      0 0 20px var(--accent-glow),
      inset 0 0 12px rgba(0, 255, 229, 0.05);
  }
  50% {
    box-shadow:
      0 0 36px rgba(0, 255, 229, 0.6),
      inset 0 0 20px rgba(0, 255, 229, 0.08);
  }
}

h1 {
  font-family: var(--display);
  font-size: clamp(42px, 7vw, 78px);
  letter-spacing: 5px;
  color: #fff;
  line-height: 1;
  padding-top: 6px;
  text-shadow: 0 0 40px rgba(255, 255, 255, 0.08);
}

h1 span {
  color: var(--accent);
  text-shadow: 0 0 30px var(--accent-glow);
}

.tagline {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-bright);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-top: 10px;
}

.search-wrap {
  position: relative;
  margin-bottom: 40px;
  animation: fadeUp 0.7s 0.15s ease both;
}

.search-wrap label {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2.5px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 10px;
  opacity: 0.85;
}

.input-row {
  display: flex;
  gap: 10px;
}

input[type='text'] {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 15px;
  color: var(--text-bright);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

input[type='text']::placeholder {
  color: var(--muted);
  font-size: 14px;
}

input[type='text']:focus {
  border-color: var(--accent);
  background: var(--bg-secondary);
  box-shadow:
    0 0 0 3px rgba(0, 255, 229, 0.08),
    0 0 20px rgba(0, 255, 229, 0.06);
}

button#analyzeBtn {
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: var(--radius-sm);
  padding: 16px 30px;
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: 2.5px;
  cursor: pointer;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition);
  white-space: nowrap;
  font-weight: 700;
  position: relative;
  overflow: hidden;
}

button#analyzeBtn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.15) 0%,
    transparent 60%
  );
  pointer-events: none;
}

button#analyzeBtn:hover {
  background: #fff;
  box-shadow:
    0 0 28px rgba(0, 255, 229, 0.5),
    0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

button#analyzeBtn:active {
  transform: translateY(0);
  box-shadow: none;
}

button#analyzeBtn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.status-bar {
  font-family: var(--mono);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  margin-bottom: 32px;
  min-height: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeUp 0.7s 0.25s ease both;
  letter-spacing: 0.5px;
}

.status-bar .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
  opacity: 0.8;
  transition: background 0.3s;
}

.status-bar.loading .dot {
  background: var(--accent);
  animation: blink 0.75s infinite;
  box-shadow: 0 0 6px var(--accent);
}

.status-bar.error .dot {
  background: var(--danger);
  box-shadow: 0 0 6px var(--danger);
}

.status-bar.success .dot {
  background: var(--safe);
  box-shadow: 0 0 6px var(--safe);
}

@keyframes blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.15;
  }
}

#results {
  animation: fadeUp 0.5s ease both;
}

.verdict {
  border-radius: var(--radius-md);
  padding: 28px 32px;
  margin-bottom: 24px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  border: 1px solid;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(4px);
}

.verdict::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  opacity: 0.4;
}

.verdict.phishing {
  border-color: rgba(255, 60, 95, 0.5);
  background: var(--danger-dim);
  box-shadow:
    0 0 40px rgba(255, 60, 95, 0.06),
    inset 0 1px 0 rgba(255, 60, 95, 0.15);
}

.verdict.phishing::before {
  background: linear-gradient(90deg, transparent, var(--danger), transparent);
}

.verdict.safe {
  border-color: rgba(0, 230, 118, 0.4);
  background: var(--safe-dim);
  box-shadow:
    0 0 40px rgba(0, 230, 118, 0.06),
    inset 0 1px 0 rgba(0, 230, 118, 0.15);
}

.verdict.safe::before {
  background: linear-gradient(90deg, transparent, var(--safe), transparent);
}

.verdict.unknown {
  border-color: rgba(255, 184, 0, 0.4);
  background: var(--warn-dim);
  box-shadow:
    0 0 40px rgba(255, 184, 0, 0.06),
    inset 0 1px 0 rgba(255, 184, 0, 0.15);
}

.verdict.unknown::before {
  background: linear-gradient(90deg, transparent, var(--warn), transparent);
}

.verdict-icon {
  font-size: 38px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 4px;
}

.verdict-body {
  flex: 1;
  min-width: 0;
}

.verdict-title {
  font-family: var(--display);
  font-size: 34px;
  letter-spacing: 3px;
  line-height: 1;
  margin-bottom: 8px;
}

.verdict.phishing .verdict-title {
  color: var(--danger);
  text-shadow: 0 0 20px rgba(255, 60, 95, 0.4);
}
.verdict.safe .verdict-title {
  color: var(--safe);
  text-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}
.verdict.unknown .verdict-title {
  color: var(--warn);
  text-shadow: 0 0 20px rgba(255, 184, 0, 0.4);
}

.verdict-reason {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.75;
  max-width: 560px;
  margin-bottom: 12px;
  opacity: 0.9;
}

.verdict-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.confidence-badge {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid;
}

.verdict.phishing .confidence-badge {
  border-color: var(--danger);
  color: var(--danger);
  background: rgba(255, 60, 95, 0.08);
}
.verdict.safe .confidence-badge {
  border-color: var(--safe);
  color: var(--safe);
  background: rgba(0, 230, 118, 0.08);
}
.verdict.unknown .confidence-badge {
  border-color: var(--warn);
  color: var(--warn);
  background: rgba(255, 184, 0, 0.08);
}

.score-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  min-width: 82px;
}

.score-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative;
  transition: box-shadow 0.3s;
}

.verdict.phishing .score-ring {
  border-color: var(--danger);
  box-shadow:
    0 0 20px rgba(255, 60, 95, 0.35),
    inset 0 0 12px rgba(255, 60, 95, 0.05);
}
.verdict.safe .score-ring {
  border-color: var(--safe);
  box-shadow:
    0 0 20px rgba(0, 230, 118, 0.35),
    inset 0 0 12px rgba(0, 230, 118, 0.05);
}
.verdict.unknown .score-ring {
  border-color: var(--warn);
  box-shadow:
    0 0 20px rgba(255, 184, 0, 0.35),
    inset 0 0 12px rgba(255, 184, 0, 0.05);
}

.score-num {
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}

.verdict.phishing .score-num {
  color: var(--danger);
}
.verdict.safe .score-num {
  color: var(--safe);
}
.verdict.unknown .score-num {
  color: var(--warn);
}

.score-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
  margin-top: 1px;
}

.score-desc {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 1px;
  color: var(--muted-bright);
  text-transform: uppercase;
  text-align: center;
}

.signals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.signal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition: border-color var(--transition);
}

.signal-card.red {
  border-color: rgba(255, 60, 95, 0.3);
  background: linear-gradient(
    135deg,
    rgba(255, 60, 95, 0.04) 0%,
    var(--surface) 60%
  );
}

.signal-card.green {
  border-color: rgba(0, 230, 118, 0.25);
  background: linear-gradient(
    135deg,
    rgba(0, 230, 118, 0.04) 0%,
    var(--surface) 60%
  );
}

.signal-card-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.signal-card.red .signal-card-title {
  color: var(--danger);
}
.signal-card.green .signal-card-title {
  color: var(--safe);
}

.signal-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.55;
  padding: 5px 0;
  border-bottom: 1px solid rgba(28, 35, 51, 0.6);
  color: var(--text);
}

.signal-item:last-child {
  border-bottom: none;
}

.signal-item .sig-icon {
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 11px;
}

.no-signals {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  font-style: italic;
  padding: 4px 0;
}

.section-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.9;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.whois-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.whois-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  transition:
    border-color var(--transition),
    background var(--transition);
}

.whois-card:hover {
  border-color: var(--border-bright);
  background: var(--surface-hover);
}

.whois-card-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  opacity: 0.85;
}

.whois-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 12px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(28, 35, 51, 0.5);
}

.whois-row:last-child {
  border-bottom: none;
}

.whois-key {
  color: var(--muted-bright);
  font-family: var(--mono);
  flex-shrink: 0;
  font-size: 10.5px;
}

.whois-val {
  color: var(--text-bright);
  text-align: right;
  word-break: break-all;
  font-size: 12px;
  font-weight: 500;
  text-emphasis: italic;
}

.raw-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  color: var(--muted-bright);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
  transition:
    border-color var(--transition),
    color var(--transition),
    background var(--transition);
  width: 100%;
  justify-content: space-between;
}

.raw-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.raw-toggle .arrow {
  transition: transform 0.2s ease;
}
.raw-toggle.open .arrow {
  transform: rotate(180deg);
}

.raw-block {
  display: none;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.75;
  color: #7a8899;
  overflow-x: auto;
  white-space: pre;
  margin-bottom: 24px;
  max-height: 420px;
  overflow-y: auto;
}

.raw-block.visible {
  display: block;
}

.loader {
  display: none;
  text-align: center;
  padding: 70px 0;
}

.loader.active {
  display: block;
}

.loader-grid {
  display: inline-grid;
  grid-template-columns: repeat(5, 9px);
  gap: 6px;
  margin-bottom: 22px;
}

.loader-cell {
  width: 9px;
  height: 9px;
  background: var(--border);
  border-radius: 3px;
  animation: gridFlash 1.4s ease-in-out infinite;
}

.loader-cell:nth-child(1) {
  animation-delay: 0s;
}
.loader-cell:nth-child(2) {
  animation-delay: 0.1s;
}
.loader-cell:nth-child(3) {
  animation-delay: 0.2s;
}
.loader-cell:nth-child(4) {
  animation-delay: 0.3s;
}
.loader-cell:nth-child(5) {
  animation-delay: 0.4s;
}
.loader-cell:nth-child(6) {
  animation-delay: 0.5s;
}
.loader-cell:nth-child(7) {
  animation-delay: 0.6s;
}
.loader-cell:nth-child(8) {
  animation-delay: 0.7s;
}
.loader-cell:nth-child(9) {
  animation-delay: 0.8s;
}
.loader-cell:nth-child(10) {
  animation-delay: 0.9s;
}

@keyframes gridFlash {
  0%,
  100% {
    background: var(--border);
    box-shadow: none;
  }
  50% {
    background: var(--accent);
    box-shadow:
      0 0 10px var(--accent),
      0 0 20px rgba(0, 255, 229, 0.3);
  }
}

.loader-text {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted-bright);
  letter-spacing: 3px;
  text-transform: uppercase;
  animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.error-box {
  background: rgba(255, 60, 95, 0.07);
  border: 1px solid rgba(255, 60, 95, 0.4);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--danger);
  line-height: 1.6;
}

.error-box::before {
  content: '⚠ ';
}

footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  text-align: center;
  padding: 20px 0 24px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
  border-top: 1px solid var(--border);
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-bright);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

::selection {
  background: rgba(0, 255, 229, 0.2);
  color: #fff;
}

@media (max-width: 600px) {
  .container {
    padding: 40px 16px 100px;
  }
  .verdict {
    flex-direction: column;
    gap: 16px;
  }
  .score-wrap {
    flex-direction: row;
    align-self: auto;
  }
  .signals-grid {
    grid-template-columns: 1fr;
  }
  .whois-grid {
    grid-template-columns: 1fr;
  }
  .input-row {
    flex-direction: column;
  }
  button#analyzeBtn {
    width: 100%;
  }
  h1 {
    letter-spacing: 3px;
  }
}
