/* Modern look and feel */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap');

:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --primary: #2563eb;
  --primary-contrast: #ffffff;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 4px 16px rgba(17, 24, 39, 0.08);
  --code-bg: #0f172a;
  --code-fg: #e5e7eb;
  --table-head: #f3f4f6;
  --table-stripe: #fafafa;
  --txt-fg: #0f172a; /* darker text for SPF/TXT in light mode */
  --txt-bg: #eef2ff; /* subtle highlight for SPF/TXT in light mode */
}

html.dark {
  --bg: #0b1220;
  --surface: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-contrast: #111827;
  --border: #1f2a44;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --code-bg: #111827;
  --code-fg: #e5e7eb;
  --table-head: #0d1a2f;
  --table-stripe: #0c1628;
  --txt-fg: var(--text);
  --txt-bg: #0d1a2f; /* subtle highlight for SPF/TXT in dark mode */
}

html { height: 100%; }
body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#holder{
    min-height: 100%;
    position:relative;
}

#body{
    padding-bottom: 100px;    /* height of footer */
}

h1, h2, h3 { margin: 0.5rem 0 1rem; text-align: center; }
h1 { font-size: 2rem; font-weight: 600; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.125rem; font-weight: 600; color: var(--muted); }

pre {
  text-align: left;
  font-size: 0.95rem;
  background: var(--code-bg);
  color: var(--code-fg);
  padding: 1rem;
  border-radius: var(--radius);
  overflow: auto;
}

/* Ensure appropriate monospace fonts for code */
pre, code, kbd, samp {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

table { width: 100%; border-collapse: collapse; }
table td, table th { overflow-wrap: anywhere; }
table th, table td { border: 1px solid var(--border); padding: 0.5rem 0.75rem; }
table thead th { background: var(--table-head); text-align: left; }
tr:nth-child(even) { background: var(--table-stripe); }

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

tr {
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

.tborder table, tr, td{ border: 1px solid var(--border); max-width: 100%; }
.nmap {
  text-align: left;
  margin: 24px auto;
  padding: 24px;
  max-width: 1100px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.site-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(17,24,39,0.02);
  z-index: 10;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.brand img { border-radius: 8px; }
.brand-name { font-size: 1rem; }
.site-nav a { margin: 0 8px; color: var(--text); opacity: 0.8; }
.site-nav a:hover { opacity: 1; text-decoration: none; color: var(--primary); }

/* Theme toggle */
.theme-toggle {
  appearance: none;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.theme-toggle:hover { border-color: var(--border); }
.theme-toggle .icon { font-size: 16px; line-height: 1; }
.right {
  position: fixed;
  top: 88px;
  right: 24px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
}
.right form { text-align: left; }
.right input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}
.right input[type="submit"] {
  margin-top: 10px;
  padding: 10px 14px;
  background: var(--primary);
  color: var(--primary-contrast);
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}
.right input[type="submit"]:hover { filter: brightness(0.95); }
.right label { font-size: 0.9rem; color: var(--muted); }
.center { text-align: center; margin: auto; }

.lallign { display: inline-block; text-align: left; }
.ssl { column-count: 4; column-gap: 16px; }
#container { display: flex; flex-direction: row; flex-wrap: nowrap; justify-content: center; }
#container > div { width: 500px; height: 100px; }
#footer {
  text-align: center;
  color: var(--muted);
  padding: 32px 0 48px;
}

/* Make SPF/TXT section more visible */
.txt-section,
.txt-section td {
  color: var(--txt-fg);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Container styling (avoid double styling on table) */
.txt-section:not(table) {
  background: var(--txt-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}

/* Ensure inner table stays clean */
table.txt-section { background: transparent; border: none; }
.txt-section td { background: transparent; }

/* Responsive tweaks */
@media (max-width: 1100px) {
  .nmap { margin: 16px 16px; }
}
@media (max-width: 900px) {
  .right { position: static; width: auto; margin: 16px; }
}
@media (min-width: 1200px) {
  .nmap { margin-right: 400px; }
}
