:root {
  --bg: #4d91cd;
  --surface: #1a2133;
  --surface-2: #232c44;

  --text: #e6e9f0;
  --text-dim: #9aa4bd;

  --primary: #4f8cff;
  --primary-hover: #3d76e0;

  --danger: #ff5f6d;
  --success: #3ddc97;

  --border: #2c3550;

  --radius: 12px;
}


/* -------------------------------------------------------------------------- */
/* Base                                                                       */
/* -------------------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;

  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;

  background: var(--bg);
  color: var(--text);

  line-height: 1.5;
}


/* -------------------------------------------------------------------------- */
/* Layout                                                                     */
/* -------------------------------------------------------------------------- */

.container {
  max-width: 720px;

  margin: 0 auto;

  padding:
    24px
    16px
    48px;
}


/* -------------------------------------------------------------------------- */
/* Header                                                                     */
/* -------------------------------------------------------------------------- */

header {
  text-align: center;

  margin-bottom: 32px;
}

h1 {
  font-size: 2rem;

  margin:
    0
    0
    8px;
}

.subtitle {
  color: #ffffff;

  font-size: 1rem;

  max-width: 520px;

  margin: 0 auto;
}


/* -------------------------------------------------------------------------- */
/* Cards                                                                      */
/* -------------------------------------------------------------------------- */

.card {
  background: #ffffff;

  border:
    1px
    solid
    #000000;

  border-radius: var(--radius);

  padding:
    28px
    20px;

  text-align: center;

  margin-bottom: 24px;

  color: #000000;
}

.hidden {
  display: none;
}


/* -------------------------------------------------------------------------- */
/* Buttons                                                                    */
/* -------------------------------------------------------------------------- */

.btn-primary,
.btn-secondary {
  font-size: 1rem;
  font-weight: 600;

  padding:
    14px
    32px;

  border-radius: 999px;

  cursor: pointer;

  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    color 0.15s ease,
    transform 0.1s ease;
}


.btn-primary {
  background: #000000;

  color: #ffffff;

  border: none;
}

.btn-primary:hover {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
}


.btn-secondary {
  background: transparent;

  color: #000000;

  border:
    1px
    solid
    #000000;

  margin-top: 16px;
}

.btn-secondary:hover {
  background: #000000;
  color: #ffffff;
}


.btn-primary:active,
.btn-secondary:active {
  transform: scale(0.98);
}


/*
 * Keyboard accessibility.
 */
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
a:focus-visible {
  outline:
    3px
    solid
    #000000;

  outline-offset: 3px;
}


/* -------------------------------------------------------------------------- */
/* Hint                                                                       */
/* -------------------------------------------------------------------------- */

.hint {
  color: #000000;

  font-size: 0.85rem;

  margin:
    12px
    0
    0;
}


/* -------------------------------------------------------------------------- */
/* Spinner                                                                    */
/* -------------------------------------------------------------------------- */

.spinner {
  width: 36px;
  height: 36px;

  border:
    3px
    solid
    #000000;

  border-top-color: #000000;

  border-radius: 50%;

  margin:
    0
    auto
    16px;

  animation:
    spin
    0.8s
    linear
    infinite;
}


@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


/* -------------------------------------------------------------------------- */
/* Verdict                                                                    */
/* -------------------------------------------------------------------------- */

.verdict {
  padding: 14px;

  border-radius: 8px;

  font-weight: 600;

  margin-bottom: 20px;

  color: #000000;
}


.verdict.safe {
  background: #d4edda;

  color: #155724;

  border:
    1px
    solid
    #c3e6cb;
}


.verdict.leak {
  background: #f8d7da;

  color: #721c24;

  border:
    1px
    solid
    #f5c6cb;
}

.verdict.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}


/* -------------------------------------------------------------------------- */
/* Results table                                                              */
/* -------------------------------------------------------------------------- */

/*
 * Ako tabela ne moze da stane na malom ekranu,
 * scrolluje se horizontalno umesto da razbije layout.
 */
.table-wrapper {
  width: 100%;

  overflow-x: auto;
}


table {
  width: 100%;

  border-collapse: collapse;

  font-size: 0.9rem;

  text-align: left;
}


thead th {
  color: #000000;

  font-weight: 600;

  padding:
    8px
    6px;

  border-bottom:
    1px
    solid
    #000000;

  font-size: 0.8rem;

  text-transform: uppercase;

  letter-spacing: 0.03em;

  white-space: nowrap;
}


tbody td {
  padding:
    10px
    6px;

  border-bottom:
    1px
    solid
    #000000;

  word-break: break-word;

  color: #000000;
}


/* -------------------------------------------------------------------------- */
/* Explanation                                                                */
/* -------------------------------------------------------------------------- */

.explainer {
  background: #ffffff;

  border:
    1px
    solid
    #000000;

  border-radius: var(--radius);

  padding: 20px;

  color: #000000;

  font-size: 0.9rem;
}


.explainer h2 {
  color: #000000;

  font-size: 1.2rem;

  margin:
    0
    0
    12px;
}


.explainer p:last-child {
  margin-bottom: 0;
}


/* -------------------------------------------------------------------------- */
/* Footer                                                                     */
/* -------------------------------------------------------------------------- */

footer {
  text-align: center;

  color: #ffffff;

  font-size: 0.8rem;

  margin-top: 32px;
}


footer p {
  margin-bottom: 10px;
}


.footer-links {
  display: flex;

  justify-content: center;

  gap: 18px;

  flex-wrap: wrap;
}


.footer-links a {
  color: #ffffff;

  text-decoration: none;
}


.footer-links a:hover {
  color: #cccccc;

  text-decoration: underline;
}


/* -------------------------------------------------------------------------- */
/* Privacy dialog                                                             */
/* -------------------------------------------------------------------------- */

.privacy-dialog {
  width:
    min(
      92vw,
      560px
    );

  max-height: 85vh;

  overflow-y: auto;

  padding: 0;

  background: #0f1420;

  color: #ffffff;

  border:
    1px
    solid
    #333333;

  border-radius: var(--radius);

  box-shadow:
    0
    24px
    80px
    rgba(0, 0, 0, 0.55);
}


/*
 * Browser backdrop iza <dialog>.
 */
.privacy-dialog::backdrop {
  background:
    rgba(0, 0, 0, 0.72);

  backdrop-filter: blur(3px);
}


.privacy-dialog-content {
  padding:
    28px
    26px;
}


.privacy-dialog h2 {
  margin:
    0
    0
    16px;

  font-size: 1.45rem;
}


.privacy-dialog p {
  color: #ffffff;

  font-size: 0.92rem;

  margin:
    0
    0
    14px;
}


.privacy-dialog a {
  color: #ffffff;

  text-decoration: underline;
}

.privacy-dialog a:focus-visible {
  outline: none;
}


.privacy-dialog a:hover {
  color: #cccccc;
}


.privacy-dialog-actions {
  display: flex;

  align-items: center;

  justify-content: center;

  gap: 18px;

  margin-top: 24px;
  flex-wrap: wrap;
}

.privacy-dont-show {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #cccccc;
  cursor: pointer;
  order: -1;
  width: 100%;
  justify-content: center;
}

.privacy-dont-show input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.privacy-link {
  font-size: 0.9rem;

  text-decoration: none;
}

.privacy-link:focus-visible {
  outline: none;
}


.privacy-link:hover {
  text-decoration: underline;
}


/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 600px) {

  .container {
    padding:
      20px
      14px
      40px;
  }


  h1 {
    font-size: 1.65rem;
  }


  .card {
    padding:
      22px
      14px;
  }


  .privacy-dialog-content {
    padding:
      22px
      18px;
  }


  .privacy-dialog-actions {
    flex-direction: column;

    align-items: stretch;
  }


  .privacy-dialog-actions .btn-primary {
    width: 100%;
  }


  .privacy-link {
    text-align: center;
  }

  .privacy-dont-show {
    order: -1;
    width: 100%;
  }
}


@media (max-width: 480px) {

  table {
    font-size: 0.8rem;
  }


  /*
   * Na veoma uskim ekranima sakrivamo Location kolonu.
   */
  thead th:nth-child(3),
  tbody td:nth-child(3) {
    display: none;
  }

}


/* -------------------------------------------------------------------------- */
/* Reduced motion                                                             */
/* -------------------------------------------------------------------------- */

/*
 * Ako korisnik u OS-u trazi smanjene animacije,
 * postujemo tu preference.
 */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;

    transition-duration: 0.01ms !important;

    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;
  }

}

/* -------------------------------------------------------------------------- */
/* Legal pages                                                                */
/* -------------------------------------------------------------------------- */

.legal-section {
  text-align: left;
  color: #000000;
}

.legal-section h2 {
  margin-top: 0;
  font-size: 1.25rem;
  color: #000000;
}

.legal-section h3 {
  margin-top: 24px;
  margin-bottom: 8px;
  font-size: 1rem;
  color: #000000;
}

.legal-section p,
.legal-section li {
  color: #000000;
}

.legal-section strong {
  color: #000000;
}

.legal-section a {
  color: #000000;
  text-decoration: underline;
}

.legal-section a:hover {
  color: #333333;
}

.legal-section ul {
  padding-left: 22px;
}

.legal-section li {
  margin-bottom: 8px;
}

.legal-back {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.legal-back-link {
  display: inline-block;
  text-decoration: none;
  background: #000000;
  color: #ffffff;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.legal-back-link:hover {
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
}

.legal-back-link:active {
  transform: scale(0.98);
}

.legal-back-link:focus-visible {
  outline: 3px solid #000000;
  outline-offset: 3px;
}