:root {
  --accent: #ffcc00;
  --accent-dark: #e6b800;
  --green: #0a5;
  --green-dark: #084;
  --text: #222;
  --muted: #555;
  --border: #ddd;
  --danger-color: #e74c3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background: #fff;
  color: var(--text);
  max-width: 640px;
  margin: 75px auto 0;
  padding: 0 16px 40px;
  text-align: center;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Site header (shared with ipadam.com) */
.site-title {
  display: block;
  font-family: 'Arial Black', Arial, Helvetica, sans-serif;
  font-weight: 900;
  font-size: 42px;
  letter-spacing: 2px;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  margin: 0 0 -6px;
  position: relative;
  left: -60px;
  -webkit-text-stroke: 2px #000;
  text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000,
    0 3px 0 #000, 3px 0 0 #000, 0 -3px 0 #000, -3px 0 0 #000;
}

.rb-container {
  position: relative;
  width: 100%;
  max-width: 549px;
  margin: 0 auto;
  padding: 0 12px;
  box-sizing: border-box;
}

.rb-top {
  background: var(--accent);
  height: 23px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px 0 12px;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 12px;
  text-transform: uppercase;
  margin: 0;
  position: relative;
}

.rb-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-wrap: nowrap;
  margin-left: auto;
}

.rb-nav a {
  color: #000;
  text-decoration: none;
  font-weight: 700;
  padding: 0 4px;
  line-height: 28px;
}

.rb-nav a:hover {
  text-decoration: underline;
}

.rb-nav a.active {
  text-decoration: underline;
}

.rb-sep {
  color: #000;
  margin: 0 4px;
}

.rb-inner {
  background: #fff;
  height: 32px;
  margin: 0;
  box-sizing: border-box;
}

.rb-overlay {
  position: absolute;
  top: -71px;
  left: -26px;
  width: 126px;
  height: 126px;
  object-fit: contain;
  z-index: 5;
  pointer-events: none;
}

/* DNS Toolbox */
main.tool {
  text-align: left;
  margin-top: 24px;
}

main.tool h1 {
  text-align: center;
  margin: 0 0 6px;
}

.subtitle {
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  margin: 0 0 20px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  margin-bottom: 20px;
}

#domain-container, #port-container, #submit-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

#port-container {
  margin-top: 10px;
}

.form-label {
  font-weight: bold;
  margin-right: 4px;
}

.form-control {
  flex: 1;
  min-width: 180px;
  padding: 8px 10px;
  border: 1px solid #bbb;
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}

.form-control:focus {
  outline: none;
  border-color: var(--green);
}

select.form-control {
  background-color: white;
  cursor: pointer;
}

.btn {
  background-color: var(--accent);
  color: #000;
  border: none;
  border-radius: 4px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  background-color: var(--accent-dark);
}

/* Results Area */
#txtHint {
  color: var(--danger-color);
  font-weight: bold;
  display: block;
  margin-bottom: 12px;
}

.info {
  margin-bottom: 20px;
}

.info h3 {
  color: var(--green);
  margin-bottom: 10px;
  font-size: 18px;
}

.info span {
  display: block;
  margin-bottom: 14px;
  line-height: 1.6;
}

.info table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  table-layout: fixed;
}

.info th, .info td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  word-break: break-word;
}

.info th:first-child, .info td:first-child {
  width: 35%;
}

.info th {
  background-color: var(--accent);
  font-weight: bold;
}

.info tr:last-child td {
  border-bottom: none;
}

/* Response Tables */
[class*="responseRow"] {
  margin-bottom: 20px;
  overflow-x: auto;
}

[class*="responseRow"] table {
  width: 100%;
  border-collapse: collapse;
}

[class*="responseRow"] table tr td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  word-break: break-word;
}

/* Each record-type section of a full DNS lookup */
.dns-group {
  margin-bottom: 20px;
}

/* Separates each record when a lookup returns several */
[class*="responseRow"] table tr.record-start td {
  border-top: 3px solid var(--border);
}

[class*="responseRow"] table tr:last-child td {
  border-bottom: none;
}

.thead {
  background-color: var(--accent) !important;
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  padding: 10px;
}

.left-row {
  width: 140px;
  font-weight: bold;
}

/* Loading Spinner */
.sk-three-bounce {
  margin: 2rem auto;
  width: 80px;
  text-align: center;
}

.sk-three-bounce .sk-child {
  width: 18px;
  height: 18px;
  background-color: var(--green);
  border-radius: 100%;
  display: inline-block;
  animation: sk-three-bounce 1.4s ease-in-out 0s infinite both;
}

.sk-three-bounce .sk-bounce1 {
  animation-delay: -0.32s;
}

.sk-three-bounce .sk-bounce2 {
  animation-delay: -0.16s;
}

@keyframes sk-three-bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* Footer */
footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: #888;
  text-align: center;
}

footer a {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
  body {
    margin-top: 44px;
  }

  .site-title {
    left: 0;
    font-size: 30px;
  }

  .rb-overlay {
    width: 100px;
    height: 100px;
    top: -45px;
    left: -22px;
  }

  .rb-top {
    font-size: 11px;
  }

  .rb-nav {
    gap: 4px;
  }

  .form-control {
    width: 100%;
  }

  #domain-container, #port-container, #submit-container {
    flex-direction: column;
    align-items: stretch;
  }

  .form-label {
    margin-bottom: 4px;
  }

  .btn {
    width: 100%;
  }

  .left-row {
    width: 100px;
  }
}
