:root {
  --text: #f4f8ff;
  --muted: #bcc8df;
  --panel: #070d1a;
  --panel-border: rgba(220, 235, 255, 0.28);
  --safe: #00ff66;
  --danger: #ff1f1f;
  --action-blue: #56c6ff;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  background: #03050a;
}

.hero-background {
  position: fixed;
  inset: 0;
  background: url("safelink_bg.png") no-repeat center center;
  background-size: cover;
  /* Negatif z-index, body zemini üzerinde "arkada kalıp saklanır"; sabit sıra ile üst üste güvenilir. */
  z-index: 0;
}

#buildingLightsCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
  opacity: 0.75;
}

.app {
  position: relative;
  z-index: 3;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 24px 36px;
}

.stage {
  position: relative;
  width: min(900px, 100%);
  min-height: min(620px, 88vh);
  border: none;
  background: transparent;
  box-shadow: none;
  padding: clamp(16px, 2.4vw, 28px);
}

.brand {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 40;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  height: clamp(34px, 5.2vw, 52px);
  width: auto;
  display: block;
  filter: drop-shadow(0 0 8px rgba(33, 231, 157, 0.32));
}

.menu {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 40;
}

.menu-btn {
  list-style: none;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid rgba(217, 234, 255, 0.4);
  background: rgba(4, 12, 28, 0.76);
  cursor: pointer;
  display: grid;
  place-content: center;
  gap: 4px;
}

.menu-btn span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #dceaff;
}

.menu-panel {
  position: absolute;
  top: 30px;
  right: 0;
  width: 220px;
  border: 1px solid rgba(212, 230, 255, 0.44);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  padding: 10px;
  font-size: 0.86rem;
  line-height: 1.5;
  color: #d6e8ff;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  border-radius: 12px;
}

.menu-panel__brand {
  margin: 2px 6px 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 230, 255, 0.16);
}

.menu-panel__brand img {
  height: 28px;
  width: auto;
  max-width: 100%;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(33, 231, 157, 0.24));
}

.menu:hover .menu-panel,
.menu:focus-within .menu-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e9f3ff;
  text-decoration: none;
}

.menu-toggle {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 8px;
  color: #e9f3ff;
  cursor: pointer;
}

.menu-toggle:hover {
  background: rgba(120, 160, 210, 0.2);
}

.menu-toggle input {
  accent-color: #56c6ff;
}

.language-switch {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin: 0 10px 8px;
  color: #e9f3ff;
  font-size: 0.82rem;
}

.language-switch select {
  border: 1px solid rgba(217, 234, 255, 0.36);
  border-radius: 8px;
  background: rgba(4, 12, 28, 0.86);
  color: #e9f3ff;
  padding: 4px 8px;
}

.menu-status {
  margin: 0 10px 5px;
  color: #9db3cf;
  font-size: 0.74rem;
  line-height: 1.3;
  max-height: 2.85em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.menu-extension-more {
  margin: 0 10px 8px;
  font-size: 0.71rem;
  line-height: 1.38;
  color: #afc4dd;
  border-radius: 8px;
  border: 1px solid rgba(212, 230, 255, 0.16);
  overflow: hidden;
  background: rgba(6, 12, 24, 0.45);
}

.menu-extension-more__summary {
  cursor: pointer;
  list-style: none;
  padding: 7px 10px;
  font-weight: 600;
  color: #cae4ff;
  user-select: none;
}

.menu-extension-more__summary::-webkit-details-marker {
  display: none;
}

.menu-extension-more__summary::after {
  content: "+";
  float: right;
  font-weight: 700;
  color: #82dfff;
}

.menu-extension-more[open] .menu-extension-more__summary::after {
  content: "−";
}

.menu-extension-more__body {
  margin: 0;
  padding: 0 10px 10px;
  font-size: 0.71rem;
  color: #9db3cf;
  line-height: 1.4;
}

.menu-link:hover {
  background: rgba(120, 160, 210, 0.2);
}

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.58);
}

.info-modal:target {
  display: flex;
}

.info-modal__card {
  width: min(720px, 100%);
  max-height: min(82vh, 780px);
  overflow: auto;
  border: 1px solid rgba(210, 230, 255, 0.45);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  padding: 20px;
  color: #eaf4ff;
  position: relative;
}

.info-modal__card h2 {
  margin: 0 0 12px;
}

.info-modal__card p,
.info-modal__card li {
  color: #d8e8fb;
}

.info-modal__close {
  position: absolute;
  top: 8px;
  right: 12px;
  color: #eaf4ff;
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
}

.about-placeholder {
  min-height: 180px;
  border: 1px dashed rgba(208, 225, 247, 0.55);
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #9db3cf;
  background: rgba(10, 18, 36, 0.35);
  margin: 12px 0;
}

.content {
  display: grid;
  justify-items: center;
  margin-top: 28px;
  text-align: center;
}

.status-icon {
  width: clamp(78px, 13.2vw, 120px);
  height: clamp(78px, 13.2vw, 120px);
  position: relative;
  margin-bottom: 10px;
}

.status-icon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.icon-radar-gif {
  object-fit: contain;
}

.icon-radar-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.icon-radar-wrap .icon-radar-gif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  transform: none;
  filter: grayscale(1) brightness(1.62) contrast(1.72);
  mix-blend-mode: screen;
  object-fit: contain;
}

.icon-radar-wrap::before {
  content: "";
  position: absolute;
  inset: 16%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(210, 220, 235, 0.22) 0%, rgba(210, 220, 235, 0.08) 56%, rgba(210, 220, 235, 0) 78%);
  pointer-events: none;
}

.status-icon video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  mix-blend-mode: normal;
  filter: none;
}

.status-icon[data-state="idle"] .icon-radar-wrap,
.status-icon[data-state="safe"] .icon-safe-video,
.status-icon[data-state="danger"] .icon-danger-video,
.status-icon[data-state="suspicious"] .icon-danger-video {
  opacity: 1;
  transform: scale(1);
}

.icon-radar .radar-ring {
  animation: radar-sweep 3.8s linear infinite;
  transform-origin: 50% 50%;
}

.icon-check circle,
.icon-check .draw {
  stroke: var(--safe);
}

.icon-cross circle,
.icon-cross .draw {
  stroke: var(--danger);
}

@keyframes radar-sweep {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-check .draw,
.icon-cross .draw {
  /* Placeholder state: custom check/cross animations will be swapped in later. */
  animation: none;
  stroke-dasharray: none;
  stroke-dashoffset: 0;
}

.headline {
  margin: 8px 0 6px;
  font-size: clamp(1.3rem, 3vw, 1.95rem);
  font-weight: 600;
}

.score {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 1rem;
}

.scan-form {
  width: min(680px, 100%);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.url-input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(204, 224, 250, 0.46);
  background: rgba(3, 8, 18, 0.88);
  color: #f2f7ff;
  padding: 0 12px;
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.url-input::placeholder {
  color: #9eb5d6;
}

.url-input:focus,
.url-input:focus-visible {
  background: rgba(3, 8, 18, 0.88);
  color: #f2f7ff;
  border-color: rgba(138, 196, 255, 0.8);
  outline: none;
}

.url-input:-webkit-autofill,
.url-input:-webkit-autofill:hover,
.url-input:-webkit-autofill:focus,
.url-input:-webkit-autofill:active {
  -webkit-text-fill-color: #f2f7ff;
  -webkit-box-shadow: 0 0 0 1000px rgba(3, 8, 18, 0.88) inset;
  box-shadow: 0 0 0 1000px rgba(3, 8, 18, 0.88) inset;
  transition: background-color 9999s ease-out 0s;
}

.btn-check {
  height: 46px;
  border: none;
  border-radius: 12px;
  padding: 0 22px;
  font-size: 0.87rem;
  font-weight: 700;
  color: #03111e;
  background: linear-gradient(180deg, #88ddff, var(--action-blue));
  cursor: pointer;
  box-shadow: 0 3px 12px rgba(86, 198, 255, 0.28);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.btn-check:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(86, 198, 255, 0.36);
}

.btn-check:active:not(:disabled) {
  transform: translateY(0);
}

.btn-check:focus-visible {
  outline: 2px solid rgba(130, 220, 255, 0.85);
  outline-offset: 2px;
}

.btn-check:disabled {
  opacity: 0.75;
  cursor: wait;
}

.error-msg {
  min-height: 20px;
  margin: 8px 0 0;
  color: #ffb4b4;
  font-size: 0.82rem;
}

.action-stack {
  width: min(680px, 100%);
  margin-top: 10px;
  display: grid;
  gap: 9px;
  justify-items: center;
}

.reason-card {
  width: min(560px, 96%);
  border: 1px solid rgba(255, 200, 87, 0.55);
  border-radius: 14px;
  background: rgba(8, 13, 26, 0.74);
  color: #f7fbff;
  text-align: left;
  box-shadow: 0 0 26px rgba(255, 200, 87, 0.12);
  overflow: hidden;
}

.reason-card[hidden] {
  display: none;
}

.reason-card summary {
  cursor: pointer;
  list-style: none;
  padding: 13px 16px;
  font-size: 0.9rem;
  font-weight: 800;
  color: #ffe6a8;
}

.reason-card summary::-webkit-details-marker {
  display: none;
}

.reason-card summary::after {
  content: "+";
  float: right;
  color: #9cf7ec;
}

.reason-card[open] summary::after {
  content: "-";
}

.reason-list {
  margin: 0;
  padding: 0 18px 14px 34px;
  color: #dceaff;
  font-size: 0.84rem;
  line-height: 1.5;
}

.reason-list li + li {
  margin-top: 6px;
}

.redirect-btn {
  width: min(420px, 96%);
  min-height: 44px;
  border: 1px solid rgba(0, 255, 102, 0.9);
  border-radius: 12px;
  color: #eafff0;
  background: linear-gradient(180deg, #39ff88 0%, #00b84a 100%);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 255, 118, 0.22);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.redirect-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 255, 118, 0.3);
}

.redirect-btn:active {
  transform: translateY(0);
}

.redirect-btn:focus-visible {
  outline: 2px solid rgba(164, 255, 206, 0.95);
  outline-offset: 2px;
}

.redirect-btn[hidden] {
  display: none;
}

.risk-note {
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: #ff7070;
  text-shadow: 0 0 10px rgba(255, 65, 65, 0.75), 2px 2px 5px rgba(0, 0, 0, 0.9);
}

.risk-note-suspicious {
  color: #ffc14a;
  text-shadow: 0 0 12px rgba(255, 193, 74, 0.55), 2px 2px 5px rgba(0, 0, 0, 0.85);
}

.risk-note[hidden] {
  display: none;
}

.continue-link {
  color: #f4f8ff;
  font-size: 0.83rem;
  opacity: 0.9;
}

.continue-link[hidden] {
  display: none;
}

.usom-btn {
  width: min(320px, 90%);
  min-height: 44px;
  border: 1px solid rgba(255, 31, 31, 0.95);
  color: #fff3f3;
  background: linear-gradient(180deg, #ff3b3b, #d60000);
  font-size: 0.91rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-grid;
  place-items: center;
}

.usom-btn[hidden] {
  display: none;
}

.edge-flow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
}

.edge-flow.is-visible {
  opacity: 1;
}

.edge-flow.is-fadeout {
  opacity: 0;
  transition: opacity 1s ease;
}

.edge-path {
  fill: none;
  stroke-width: 5;
  filter: drop-shadow(0 0 8px currentColor);
}

.edge-flow.safe .edge-path {
  color: var(--safe);
  stroke: var(--safe);
}

.edge-flow.danger .edge-path {
  color: var(--danger);
  stroke: var(--danger);
}

@media (max-width: 700px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  .btn-check {
    width: 100%;
  }
}

.btn-qr {
  position: absolute;
  right: 160px;
  height: 46px;
  display: flex;
  align-items: center;
  background: transparent;
  border: none;
  color: #cbd5e0;
  cursor: pointer;
  z-index: 10;
}

.btn-qr:hover,
.btn-qr:focus-visible {
  color: #6ed3ff;
}