.page-shell {
  max-width: 1100px;
  margin: 0 auto;
}

.hero-card,
.search-card,
.result-card {
  background: #151b24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.45);
  padding: 32px;
}

.hero-card {
  margin-top: 20px;
  position: relative;
  overflow: hidden;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top right, rgba(247, 147, 26, 0.07), transparent 30%),
    radial-gradient(circle at bottom left, rgba(77, 163, 255, 0.06), transparent 32%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero-title {
  margin: 0;
  max-width: 680px;
  font-size: clamp(34px, 2.5vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.97);
}

.hero-subtitle {
  margin: 20px 0 0 0;
  max-width: 760px;
  font-size: 18px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.82);
}

.form-alert {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1050;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}

.toast-alert {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(248, 113, 113, 0.35);
  border-radius: 16px;
  background: rgba(24, 16, 20, 0.96);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.94);
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: auto;
}

.toast-alert.visible {
  transform: translateX(0);
  opacity: 1;
}

.toast-copy {
  min-width: 0;
}

.toast-title {
  margin: 0 0 6px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fda4af;
}

.toast-message {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

.toast-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 1);
}

.search-card {
  margin-top: 28px;
  padding: 28px;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2,
.section-header h3 {
  margin: 0 0 8px 0;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: -0.02em;
}

.section-header h2 {
  font-size: 30px;
}

.section-header h3 {
  font-size: 20px;
}

.section-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 15px;
  line-height: 1.6;
}

.searchForm {
  width: 100%;
}

.input-label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
}

.search-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: stretch;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.10);
}

.search-bar:focus-within {
  border-color: rgba(247, 147, 26, 0.8);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.16);
}

.search-bar #addressInput,
.search-bar .search-button {
  height: 58px;
  border: none;
  outline: none;
  font-size: 15px;
}

.search-bar #addressInput {
  min-width: 0;
  background: transparent;
  padding: 0 18px;
  color: rgba(255, 255, 255, 0.96);
}

.search-bar #addressInput::placeholder {
  color: rgba(255, 255, 255, 0.62);
}


.search-bar .search-button {
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 0;
  background: var(--accent);
  color: #111;
  padding: 0 24px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: none;
  transition: filter 0.14s ease;
}

.search-bar .search-button:hover {
  filter: brightness(1.04);
  transform: none;
}

.search-bar .search-button:active {
  transform: none;
}

.search-icon {
  font-size: 16px;
}

.results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-top: 28px;
  align-items: start;
}

.result-card {
  min-height: 100%;
}

.code,
.address-preview {
  font-family: "JetBrains Mono", monospace;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 18px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.90);
  white-space: pre-wrap;
  word-break: break-word;
}

.wallet-preview-row {
  display: flex;
  align-items: stretch;
  gap: 12px;
}

.wallet-preview-row .address-preview {
  flex: 1;
}

.icon-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.icon-copy-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.98);
}

.icon-copy-btn.copied {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.14);
  color: #bbf7d0;
}

.icon-copy-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.wallet-side-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.wallet-side-link:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.98);
}

.wallet-side-link.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
}

.stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 20px;
  min-width: 0;
}

.stat label {
  display: block;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
  line-height: 1.1;
  color: rgba(255, 255, 255, 0.97);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.stat-note {
  display: block;
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
}

#riskProbability[data-risk="very_high"] {
  color: #f87171;
}

#riskProbability[data-risk="high"] {
  color: #fb923c;
}

#riskProbability[data-risk="mixed_signal"] {
  color: #facc15;
}

#riskProbability[data-risk="low"] {
  color: #4ade80;
}

#riskProbability[data-risk="very_low"] {
  color: #67e8f9;
}

.details-panel {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.details-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.details-title {
  margin: 0 0 14px 0;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.95);
}

.details-header .details-title {
  margin-bottom: 0;
}

.wallet-activity-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.wallet-activity-card {
  display: flex;
  flex-direction: column;
}

.wallet-activity-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.wallet-activity-card strong {
  margin-top: 18px;
  font-size: 22px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.detail-copy-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  font-size: 16px;
}

.findings-list {
  display: grid;
  gap: 10px;
}

.finding-item,
.finding-empty {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 16px;
}

.finding-empty {
}

.finding-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.finding-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
}

.finding-badge {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.finding-badge.increases_risk {
  color: #fecaca;
  background: rgba(248, 113, 113, 0.16);
}

.finding-badge.decreases_risk {
  color: #bbf7d0;
  background: rgba(74, 222, 128, 0.14);
}

.finding-explanation {
  display: none;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.finding-item.open .finding-explanation {
  display: block;
}

.finding-explanation-toggle {
  margin-top: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.15s ease;
}

.finding-explanation-toggle:hover {
  color: rgba(255, 255, 255, 1);
}

.finding-explanation-label {
  margin: 0 0 6px 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}

.finding-explanation-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.7;
}

.finding-empty {
  color: rgba(255, 255, 255, 0.68);
}

@media (max-width: 900px) {
  .search-bar {
    grid-template-columns: 1fr;
    border-radius: 16px;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 12px;
  }

  .search-bar:focus-within {
    border: none;
    box-shadow: none;
  }

  .search-bar #addressInput,
  .search-bar .search-button {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.10);
  }

  .search-bar .search-button {
    border-left: 1px solid rgba(255, 255, 255, 0.15);
  }

  .results-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hero-card,
  .search-card,
  .result-card {
    padding: 22px;
  }

  .hero-title {
    font-size: clamp(32px, 10vw, 44px);
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .section-header h2 {
    font-size: 24px;
  }

  .section-header h3 {
    font-size: 18px;
  }

  .stat strong {
    font-size: 24px;
  }

  .details-header,
  .finding-title-row,
  .wallet-activity-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .wallet-preview-row,
  .wallet-activity-head {
    width: 100%;
  }

  .icon-copy-btn {
    flex-shrink: 0;
  }

  .form-alert {
    top: 16px;
    right: 16px;
    width: min(360px, calc(100vw - 24px));
  }
}
