@import url("https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,600;0,9..40,700;1,9..40,400&family=Syne:wght@600;700;800&display=swap");

:root {
  --bg0: #070b12;
  --bg1: #101826;
  --bg2: #162033;
  --ink: #e8eef7;
  --muted: #8b9bb3;
  --line: rgba(232, 238, 247, 0.12);
  --pass: #3ecf8e;
  --warn: #f0b429;
  --fail: #ff6b6b;
  --accent: #5ee0c4;
  --accent-2: #f0a46a;
  --font: "DM Sans", "Segoe UI", sans-serif;
  --display: "Syne", "Avenir Next", sans-serif;
  --pad-x: clamp(1rem, 4vw, 1.5rem);
  --touch: 2.75rem;
}
* { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html, body { margin: 0; min-height: 100%; }
body.theme-dark {
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(94, 224, 196, 0.12), transparent 55%),
    radial-gradient(700px 380px at 100% 0%, rgba(240, 164, 106, 0.1), transparent 50%),
    linear-gradient(165deg, var(--bg0), var(--bg1) 45%, #0c1420);
  background-attachment: fixed;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
a { color: var(--accent); }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem var(--pad-x);
  padding-top: max(0.85rem, env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 18, 0.78);
  position: sticky;
  top: 0;
  z-index: 20;
}
.logo {
  color: var(--ink);
  text-decoration: none;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  flex-shrink: 0;
  white-space: nowrap;
}
.logo span { color: var(--accent); }

.hero-band {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero-inner {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem var(--pad-x) 2.35rem;
}
.score-inner {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.score-copy { flex: 1 1 16rem; min-width: 0; }
.hero-inner h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.55rem, 5.5vw, 2.6rem);
  margin: 0 0 0.55rem;
  line-height: 1.15;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.lede, .hint, .eyebrow { color: var(--muted); }
.lede { margin: 0; max-width: 38rem; }
.eyebrow {
  margin: 0 0 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.check-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  max-width: 640px;
}
.domain-input {
  flex: 1 1 240px;
  min-height: var(--touch);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 44, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.domain-input:focus {
  outline: 2px solid rgba(94, 224, 196, 0.45);
  outline-offset: 1px;
}
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0.75rem 1.35rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #3ecf8e);
  color: #041018;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.form-error { color: var(--fail); margin: 0.75rem 0 0; }

.score-badge {
  width: 8.25rem;
  height: 8.25rem;
  flex-shrink: 0;
  border-radius: 28% 72% 35% 65% / 55% 30% 70% 45%;
  background:
    radial-gradient(circle at 30% 25%, rgba(94, 224, 196, 0.35), transparent 55%),
    linear-gradient(145deg, #1a273a, #0d1522);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  animation: float-in 0.7s ease-out;
}
.score-num {
  font-family: var(--display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.score-label { font-size: 0.78rem; color: var(--muted); margin-top: 0.35rem; }

.meta-row { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; }
.pill {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 44, 0.7);
}
.pill.pass { color: var(--pass); }
.pill.warn { color: var(--warn); }
.pill.fail { color: var(--fail); }

.report-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem var(--pad-x) 3rem;
  display: grid;
  gap: 0.85rem;
}

.top-check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex: 1 1 auto;
  justify-content: flex-end;
  max-width: 520px;
  min-width: 0;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.top-check input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: var(--touch);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(18, 28, 44, 0.9);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.top-check button {
  border: 0;
  border-radius: 10px;
  min-height: var(--touch);
  padding: 0.55rem 1rem;
  background: linear-gradient(135deg, var(--accent), #3ecf8e);
  color: #041018;
  font-family: var(--display);
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.section-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 28, 44, 0.72);
  overflow: hidden;
  animation: rise 0.45s ease-out both;
}
.section-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: var(--touch);
  padding: 0.85rem 1.05rem;
  font-family: var(--display);
  font-weight: 700;
  border-bottom: 1px solid transparent;
  -webkit-tap-highlight-color: transparent;
}
.section-block[open] .section-summary { border-bottom-color: var(--line); }
.section-summary::-webkit-details-marker { display: none; }
.sec-status {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  font-family: var(--font);
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.report-table, .summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.report-table th,
.summary-table th,
.report-table td,
.summary-table td {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  vertical-align: top;
  text-align: left;
}
.report-table thead th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(7, 11, 18, 0.45);
}
.col-cat { width: 7rem; }
.col-status { width: 4.5rem; }
.col-test { width: 14rem; }
.cat-cell {
  font-family: var(--display);
  font-weight: 700;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-align: center;
  background: rgba(7, 11, 18, 0.35);
  color: var(--accent);
  border-right: 1px solid var(--line);
}
.status-cell { text-align: center; }
.status-icon {
  display: inline-flex;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  border: 1px solid currentColor;
}
.test-cell {
  font-weight: 600;
  color: var(--ink);
}
.info-detail {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--ink);
  line-height: 1.45;
}
.info-fix { margin-top: 0.35rem; color: var(--accent-2); }
.info-ref { margin-top: 0.25rem; color: var(--muted); font-size: 0.8rem; }
.row-warn .info-cell { background: rgba(240, 180, 41, 0.08); }
.row-fail .info-cell { background: rgba(255, 107, 107, 0.1); }

.whois-block { padding-bottom: 0.25rem; }
.whois-title {
  margin: 0;
  padding: 0.95rem 1.05rem;
  font-family: var(--display);
  font-size: 1.15rem;
  border-bottom: 1px solid var(--line);
}
.summary-table th {
  width: 14rem;
  color: var(--muted);
  font-weight: 600;
  background: rgba(7, 11, 18, 0.28);
}
.whois-note {
  margin: 0;
  padding: 0.75rem 1.05rem 1rem;
  color: var(--warn);
  font-size: 0.9rem;
}

/* Sadece durum göstergelerine renk — section'a miras kalmasın */
.sec-status.status-pass,
.status-icon.status-pass,
.score-badge.status-a,
.score-badge.status-aplus { color: var(--pass); }

.sec-status.status-warn,
.status-icon.status-warn,
.score-badge.status-b,
.score-badge.status-c { color: var(--warn); }

.sec-status.status-fail,
.status-icon.status-fail,
.score-badge.status-d,
.score-badge.status-f { color: var(--fail); }

.sec-status.status-skip,
.sec-status.status-unknown,
.status-icon.status-skip,
.status-icon.status-unknown { color: var(--muted); }

.sec-title { color: var(--ink); }

/* Sorgulama yükleme ekranı */
.query-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(600px 320px at 50% 40%, rgba(94, 224, 196, 0.12), transparent 60%),
    rgba(7, 11, 18, 0.88);
  backdrop-filter: blur(8px);
}
.query-loader[hidden] { display: none !important; }
.query-loader-inner {
  text-align: center;
  max-width: 22rem;
}
.dns-radar {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1.25rem;
}
.dns-radar::before,
.dns-radar::after,
.dns-radar span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(94, 224, 196, 0.25);
}
.dns-radar::before {
  animation: radar-pulse 1.6s ease-out infinite;
}
.dns-radar::after {
  inset: 18%;
  animation: radar-pulse 1.6s ease-out 0.35s infinite;
}
.dns-radar span {
  inset: 36%;
  background: rgba(94, 224, 196, 0.15);
  border-color: var(--accent);
  animation: radar-core 1.2s ease-in-out infinite;
}
.loader-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
}
.loader-domain {
  margin: 0.45rem 0 0;
  color: var(--accent);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.loader-hint {
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}
body.is-loading {
  overflow: hidden;
}

@keyframes radar-pulse {
  0% { transform: scale(0.55); opacity: 0.9; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes radar-core {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(94, 224, 196, 0.35); }
  50% { transform: scale(1.08); box-shadow: 0 0 18px 2px rgba(94, 224, 196, 0.25); }
}

@keyframes float-in {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: none; }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .score-badge, .section-block { animation: none; }
  .dns-radar::before,
  .dns-radar::after,
  .dns-radar span { animation: none; }
}

/* —— Mobile: tabloyu koru, sıkışmayı çöz —— */
@media (max-width: 720px) {
  .topbar {
    flex-wrap: wrap;
    align-items: stretch;
    padding: 0.75rem var(--pad-x);
    padding-top: max(0.75rem, env(safe-area-inset-top, 0px));
  }
  .logo { font-size: 1.2rem; }
  .top-check {
    flex: 1 1 100%;
    max-width: none;
  }
  .top-check button { min-width: 5.5rem; }

  .hero-inner { padding: 1.75rem var(--pad-x) 1.5rem; }
  .score-inner {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 1.15rem;
  }
  .score-badge {
    width: 6.5rem;
    height: 6.5rem;
    align-self: flex-start;
  }
  .score-num { font-size: 1.85rem; }
  .check-form { flex-direction: column; max-width: none; }
  .domain-input, .cta { width: 100%; flex: none; }

  .report-main {
    padding: 1rem var(--pad-x) 2.5rem;
    gap: 0.7rem;
  }

  /* Kategori zaten section başlığında — mobilde gizle */
  .report-table .col-cat,
  .report-table .cat-cell {
    display: none;
  }

  /* Başlık satırını sadeleştir */
  .report-table thead .col-status { width: 3.25rem; }
  .report-table thead .col-test { width: 34%; }
  .report-table thead th {
    padding: 0.55rem 0.65rem;
    font-size: 0.7rem;
  }

  .report-table td {
    padding: 0.65rem;
  }
  .status-cell {
    width: 2.75rem;
    padding-left: 0.55rem;
    padding-right: 0.35rem;
  }
  .test-cell {
    width: 34%;
    font-size: 0.88rem;
    line-height: 1.35;
  }
  .info-cell {
    font-size: 0.86rem;
  }
  .info-detail {
    /* IP / host kırılımını daha okunur yap */
    word-break: normal;
    overflow-wrap: break-word;
    line-break: anywhere;
  }

  /*
   * Dar ekranda tabloyu yatay kaydırılabilir tut:
   * minimum genişlik vererek kolonların ezilmesini engelle.
   */
  .table-wrap {
    margin: 0;
    border-radius: 0;
  }
  .report-table {
    min-width: 34rem;
    table-layout: fixed;
  }
  .report-table .col-status,
  .report-table .status-cell { width: 3.5rem; }
  .report-table .col-test,
  .report-table .test-cell { width: 10.5rem; }
  .report-table .col-info,
  .report-table .info-cell { width: auto; }

  /* Kaydırma ipucu */
  .table-wrap::after {
    content: "";
    display: block;
    pointer-events: none;
  }

  .summary-table th,
  .summary-table td {
    display: block;
    width: 100%;
    border: 0;
  }
  .summary-table tr {
    display: block;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line);
  }
  .summary-table tr:last-child { border-bottom: 0; }
  .summary-table th {
    padding: 0 0 0.2rem;
    background: transparent;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .summary-table td {
    padding: 0;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .logo { font-size: 1.1rem; }
  .pill { font-size: 0.75rem; }
}
