.seo-heading {
  margin-top: 50rem;
  margin-bottom: 4rem;
}
/* Ensure top ad is visible below navbar */

/* Match navDropdown to navbar links */
.navbar-links select#navDropdown {
  background: #181c2b;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  font-size: 1rem;
  margin: 0 4px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
  cursor: pointer;
}
.navbar-links select#navDropdown:focus,
.navbar-links select#navDropdown:hover {
  background: #232b3a;
  color: #fff;
  box-shadow: 0 2px 8px #181c2b22;
}
.navbar-links select#navDropdown option {
  color: #e0e0e0;
  background: #232b3a;
}
/* --- Simple, soft hover and highlight effects --- */
a, .navbar-links li a, .footer-links a, .footer-social-icon {
  transition: color 0.18s, background 0.18s, box-shadow 0.18s, border 0.18s;
  padding: 8px 18px;
  border-radius: 5px;
}
a:hover, .navbar-links li a:hover, .footer-links a:hover, .footer-social-icon:hover {
  color: #fff !important;
  background: #232b3a;
  border-radius: 5px;
  box-shadow: 0 2px 8px #181c2b22;
  text-decoration: none;
  padding: 8px 18px;
}
.navbar-links select#navDropdown {
  background: #181c2b;
  color: #fff;
  border: none;
  border-radius: 5px;
  padding: 8px 18px;
  font-size: 1rem;
  margin: 0 4px;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  outline: none;
  cursor: pointer;
}
.navbar-links select#navDropdown:focus,
.navbar-links select#navDropdown:hover {
  background: #232b3a;
  color: #fff;
  box-shadow: 0 2px 8px #181c2b22;
}
.navbar-links select#navDropdown option {
  color: #222;
  background: #fff;
}

button, .go-btn, .retest-btn, .clear-history-btn {
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, border 0.18s;
}
button:hover, .go-btn:hover, .retest-btn:hover, .clear-history-btn:hover {
  background: #232b3a !important;
  color: #fff !important;
  box-shadow: 0 2px 8px #181c2b22;
  border: 1.5px solid #a259ff;
}

.test-results, .info-section, .history-table, .ad-box, .main-panel {
  transition: box-shadow 0.18s, transform 0.18s, border 0.18s;
}
.test-results:hover, .info-section:hover, .history-table:hover, .ad-box:hover, .main-panel:hover {
  box-shadow: 0 4px 16px #181c2b22;
  border: 2px solid #a259ff;
  transform: scale(1.01);
}

.navbar-logo, .navbar-logo span {
  transition: color 0.18s, text-shadow 0.18s;
}
.navbar-logo {
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 380px;
  padding-right: 16px;
  color: #222;
  display: flex;
  align-items: center;
}
.navbar-logo .highlight {
  color: #2196f3;
  font-weight: 700;
  margin-left: 2px;
}
.navbar-logo:hover, .navbar-logo span:hover {
  color: #fff !important;
  text-shadow: 0 1px 4px #a259ff55;
}

.navbar-hamburger {
  transition: box-shadow 0.18s, background 0.18s;
}
.navbar-hamburger:hover, .navbar-hamburger.open {
  background: #232b3a;
  box-shadow: 0 2px 8px #181c2b22;
  border-radius: 8px;
}
/* Hamburger menu X animation */
.navbar-hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: #a259ff;
}
.navbar-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.navbar-hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
  background: #a259ff;
}
/* Hamburger menu styles */
.navbar-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  cursor: pointer;
  z-index: 1001;
}
.navbar-hamburger span {
  display: block;
  width: 28px;
  height: 4px;
  margin: 4px 0;
  background: #19e3ff;
  border-radius: 2px;
  transition: 0.3s;
}

@media (max-width: 700px) {
  .navbar-hamburger {
    display: flex;
    position: static;
    margin-left: 12px;
    margin-right: 0;
    top: auto;
    transform: none;
  }
  .navbar-links {
    display: none !important;
    position: absolute;
    top: 64px;
    left: 0;
    width: 100vw;
    background: #181c2b;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0 0 12px 0;
    z-index: 1000;
    box-shadow: 0 2px 8px #0002;
  }
  .navbar-links.open {
    display: flex !important;
  }
  .navbar {
    position: fixed;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    left: 0;
    right: 0;
    flex-wrap: nowrap;
    overflow-x: hidden;
    height: 80px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
  }
@media (max-width: 900px) {
  .navbar-logo {
    font-size: 1.5rem;
    max-width: 180px;
    padding-right: 8px;
  }
  .navbar {
    height: 56px !important;
    padding-left: 8px;
    padding-right: 8px;
  }
}
  .navbar-hamburger {
    top: 24px;
  }
  .navbar-links li {
    width: 100%;
    text-align: left;
    padding: 12px 24px;
    border-bottom: 1px solid #232b3a;
  }
  .navbar-links li:last-child {
    border-bottom: none;
  }
}
html, body {
  height: 100%z;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  background: linear-gradient(135deg, #1e2a38 0%, #3a1c71 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
}

.speedometer {
  width: clamp(220px, 60vw, 340px);
  height: clamp(140px, 40vw, 240px);
  position: relative;
  margin-left: 8px;
}

.dial {
  width: 100%;
  height: 100%;
  border-top-left-radius: 170px;
  border-top-right-radius: 170px;
  background: transparent;
  position: relative;
  overflow: visible;
  box-shadow: none;
}

.arc-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 1;
@media (max-width: 400px) {
  .speedometer {
    width: 98vw;
    height: 38vw;
    min-width: 180px;
    min-height: 110px;
  }
}
}

.needle {
  position: absolute;
  bottom: 18px; /* move up to center cap */
  left: 50%;
  width: 2.2px;
  height: 92px;
  background: linear-gradient(to top, #fff 80%, #fff0 100%);
  box-shadow: 0 0 8px 1px #fff6;
  border-radius: 1.5px;
  transform-origin: bottom;
  transform: rotate(-90deg);
  transition: transform 0.5s cubic-bezier(.4,2,.6,1);
  opacity: 0.85;
  z-index: 2;
}

.center-cap {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 18px;
  height: 18px;
  background: #222d;
  border: 2px solid #fff;
  border-radius: 50%;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: 0 0 4px 1px #fff3;
}

.speed-label {
  text-align: center;
  color: #b0b6c6;
  font-size: 1.05rem;
  letter-spacing: 1.5px;
  margin-top: 18px;
  margin-bottom: 0;
  font-weight: 400;
  text-transform: uppercase;
}

.speed-main {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
}

.speed-value {
  font-size: 4.6rem;
  color: #a259ff;
  font-weight: 200;
  letter-spacing: 2.5px;
  text-shadow: 0 2px 12px #000a;
  margin: 44px 0 0 0;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
}

.arc-svg text {
  font-size: 1.1rem;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-weight: 400;
  letter-spacing: 1.2px;
  fill: #e0e0e0;
  paint-order: stroke fill;
  stroke: #101426;
  stroke-width: 0.7px;
  dominant-baseline: middle;
}

.arc-svg line {
  stroke-linecap: round;
}

.arc-svg line[stroke-width="8"] {
  stroke: #a259ff;
  opacity: 0.9;
}

.arc-svg line[stroke-width="3"] {
  stroke: #43e97b;
  opacity: 0.4;
}

.arc-svg path[stroke="#2c3950"] {
  stroke: #3a425a;
  opacity: 0.4;
  stroke-width: 38px;
}

.unit-label {
  font-size: 1.2rem;
  color: #7fffd4;
  opacity: 0.7;
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.speed-divider {
  width: 120px;
  height: 2px;
  background: #222c;
  margin: 12px auto 18px auto;
  border-radius: 2px;
}

/* Remove ticks */
.ticks, .tick, .tick.major { display: none !important; }

.stats-panel {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 18px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 90px;
  margin-bottom: 0;
}

.stat-label {
  color: #b0b6c6;
  font-size: 0.95rem;
  letter-spacing: 1.5px;
  margin-bottom: 6px;
  font-weight: 400;
  text-transform: uppercase;
}

.stat-value {
  color: #19e3ff;
  font-size: 1.5rem;
  font-weight: 500;
  letter-spacing: 1px;
  margin-bottom: 2px;
}

.connection-info {
  text-align: center;
  color: #b0b6c6;
  font-size: 0.95rem;
  margin-top: 18px;
  opacity: 0.7;
}

.clear-history-btn {
  display: block;
  margin: 24px auto 8px auto;
  padding: 8px 20px;
  background: #222c;
  color: #19e3ff;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}
.clear-history-btn:hover {
  background: #2a3a4c;
}

.history-table {
  width: 95%;
  max-width: 1000px;
  margin: 24px auto 64px auto;
  border-collapse: separate;
  border-spacing: 0;
  background: #181c2b;
  color: #e0e0e0;
  font-size: 1.08rem;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  border-radius: 16px;
  box-shadow: 0 4px 32px #a259ff22;
  overflow: hidden;
}
.history-table th, .history-table td {
  padding: 14px 18px;
  text-align: center;
}
.history-table th {
  background: #2d1e4a;
  color: #a259ff;
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: 2px solid #a259ff;
}
.history-table tr:nth-child(even) {
  background: #232b3a;
}
.history-table tr:nth-child(odd) {
  background: #181c2b;
}
.history-table tr:hover {
  background: #3a1c71cc;
  color: #6f1d1d;
}
.history-table td:nth-child(2) {
  color: #43e97b;
  font-weight: 600;
}
.history-table td:nth-child(3) {
  color: #a259ff;
  font-weight: 600;
}
.history-average-row {
  background: #181c2b;
  color: #a259ff;
  font-weight: 700;
  border-top: 2px solid #a259ff;
}

.go-btn {
  display: block;
  margin: 32px auto 18px auto;
  padding: 18px 48px;
  background: linear-gradient(90deg, #43e97b 0%, #a259ff 100%);
  color: #1e2a38;
  font-size: 2rem;
  font-weight: 700;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  box-shadow: 0 4px 24px #19e3ff33;
  transition: background 0.2s, color 0.2s;
}
.go-btn:hover {
  background: linear-gradient(90deg, #3aff7a 0%, #19e3ff 100%);
  color: #181c2b;
}

.main-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: clamp(320px, 95vw, 600px);
}

testAgainBtn {
  display: block;
  margin: 18px auto 32px auto;
}

.button-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 32px 0;
}
#goBtnSection {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin: 0 auto !important;
  padding: 0;
  box-sizing: border-box;
}
.go-btn {
  display: block;
  margin: 0 auto !important;
  float: none;
}

.app-header {
  width: 100%;
  text-align: center;
  font-size: 2.1rem;
  font-weight: 700;
  color: #19e3ff;
  background: #181c2b;
  padding: 22px 0 14px 0;
  box-shadow: 0 2px 8px #0002;
  letter-spacing: 2px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
}

.app-footer {
  width: 100vw;
  background: #2d1e4a;
  color: #e0e0e0;
  text-align: center;
  padding: 24px 0 16px 0;
  font-size: 1rem;
  border-top: 1px solid #3a1c71;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 300;
}
.simple-footer {
  max-width: 100vw;
  margin: 0 auto;
  display: block;
}

.app-content {
  margin-top: 80px;
  margin-bottom: 60px;
}

.ad-box {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2d1e4a;
  color: #43e97b;
  border: 2px dashed #a259ff;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 18px auto;
  text-align: center;
  border-radius: 10px;
  box-sizing: border-box;
}
.ad-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  max-width: 100vw;
  height: 90px;
  z-index: 200;
  border-radius: 0 0 10px 10px;
}
.ad-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
  max-width: 100vw;
  height: 90px;
  margin-bottom: 0;
  z-index: 200;
  border-radius: 10px 10px 0 0;
}
.ad-right {
  width: 300px;
  min-width: 200px;
  max-width: 320px;
  height: 600px;
  margin-left: 32px;
  margin-top: 0;
  margin-bottom: 0;
  align-self: flex-start;
}
.ad-right-2 {
  margin-left: 32px;
  margin-top: 24px;
}
.ad-left {
  width: 300px;
  min-width: 200px;
  max-width: 320px;
  height: 600px;
  margin-right: 32px;
  margin-top: 0;
  margin-bottom: 0;
  align-self: flex-start;
}
@media (max-width: 1200px) {
  .ad-left {
    width: 220px;
    min-width: 120px;
    height: 400px;
    margin-right: 16px;
  }
}
@media (max-width: 900px) {
  .ad-left {
    width: 90vw;
    max-width: 320px;
    height: 250px;
    margin-right: 0;
    margin-top: 18px;
    margin-bottom: 18px;
  }
}
.app-content-with-ads {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-top: 0;
  padding-bottom: 0;
  box-sizing: border-box;
}
@media (max-width: 1200px) {
  .ad-right, .ad-right-2 {
    width: 220px;
    min-width: 120px;
    height: 400px;
    margin-left: 16px;
  }
}
@media (max-width: 900px) {
  .app-content-with-ads {
    flex-direction: column;
    align-items: center;
    padding-top: 0;
    padding-bottom: 0;
  }
  .ad-right, .ad-right-2 {
    width: 90vw;
    max-width: 320px;
    height: 250px;
    margin-left: 0;
    margin-top: 18px;
    margin-bottom: 18px;
  }
  .ad-right-2 {
    margin-top: 0;
  }
}
.app-content-main {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.meter-center-content {
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.speed-main {
  align-self: flex-end;
  margin-right: 20px;
}
@media (max-width: 900px) {
  .app-content-with-ads {
    flex-direction: column;
    align-items: center;
    padding-top: 110px;
    padding-bottom: 110px;
  }
  .ad-right {
    width: 90vw;
    max-width: 320px;
    height: 250px;
    margin-left: 0;
    margin-top: 18px;
    margin-bottom: 18px;
  }
}
nav{
  background-color: #19e3ff;
}
.navbar {
  width: 100vw;
  box-sizing: border-box;
  background: #181c2b;
  color: #19e3ff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 72px;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 300;
  box-shadow: 0 2px 8px #0002;
}
.navbar-logo {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #19e3ff;
}
.navbar-logo span {
  color: #a259ff;
}
.navbar-links {
  display: flex;
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
  margin-left: auto;
}
.navbar-links li a {
  color: #b0b6c6;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: color 0.2s;
}
.navbar-links li a:hover {
  color: #19e3ff;
}
.navbar-user {
  font-size: 2rem;
  color: #19e3ff;
  margin-left: 16px;
  order: 2;
}
.navbar-user-icon {
  vertical-align: middle;
}

.footer-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 0 10px 0;
}
.footer-links a {
  color: #19e3ff;
  text-decoration: none;
  margin: 0 8px;
  font-size: 1rem;
  transition: color 0.2s;
}
.footer-links a:hover {
  color: #3aff7a;
}
.footer-social {
  margin-top: 4px;
}
.footer-social-icon {
  font-size: 1.3rem;
  margin: 0 6px;
  color: #19e3ff;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-social-icon:hover {
  color: #3aff7a;
}
/* Remove column flex-direction for .navbar on mobile to keep logo and links on the same line */
@media (max-width: 700px) {
  .navbar {
    flex-direction: row;
    height: auto;
    padding: 8px 8px;
    max-width: 100vw;
    overflow-x: visible;
    white-space: normal;
    left: 0;
    right: 0;
  }
  .navbar-links {
    gap: 16px;
    flex-wrap: wrap;
    overflow-x: visible;
    white-space: normal;
    width: 100%;
    justify-content: flex-end;
  }
  .footer-main {
    gap: 4px;
    padding: 12px 0 8px 0;
  }
}
.app-content-with-ads {
  margin-top: 0;
}

.retest-btn {
  display: block;
  margin: 12px auto 0 auto;
  padding: 12px 36px;
  background: linear-gradient(90deg, #43e97b 0%, #a259ff 100%);
  color: #1e2a38;
  font-size: 1.3rem;
  font-weight: 700;
  border: none;
  border-radius: 32px;
  cursor: pointer;
  box-shadow: 0 4px 24px #a259ff33;
  transition: background 0.2s, color 0.2s;
}
.retest-btn:hover {
  background: linear-gradient(90deg, #a259ff 0%, #43e97b 100%);
  color: #fff;
}

.seo-heading {
  margin-top: 8px;
  margin-bottom: 0;
  text-align: center;
  color: #a259ff;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 1px;
}
@media (max-width: 700px) {
  .seo-heading {
    margin-top: 90px;
    font-size: 1.2rem;
  }
}

.test-progress-bar {
  width: 100%;
  max-width: 340px;
  height: 10px;
  background: #232b3a;
  border-radius: 8px;
  margin: 8px auto 18px auto;
  overflow: hidden;
  box-shadow: 0 2px 8px #a259ff22;
}
.test-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #43e97b 0%, #a259ff 100%);
  border-radius: 8px;
  transition: width 0.2s linear;
}

.test-status-msg {
  text-align: center;
  color: #43e97b;
  font-size: 1.1rem;
  margin: 10px 0 0 0;
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  min-height: 1.5em;
  font-weight: 600;
}

.ad-history-bottom {
  width: 100vw;
  max-width: 100vw;
  height: 90px;
  margin: 18px 0 32px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #2d1e4a;
  color: #43e97b;
  border: 2px dashed #a259ff;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  border-radius: 10px;
  box-sizing: border-box;
}

.test-results {
  margin: clamp(12px, 3vw, 24px) auto clamp(18px, 6vw, 48px) auto;
  padding: clamp(12px, 4vw, 24px) 0 clamp(8px, 2vw, 18px) 0;
  max-width: clamp(280px, 90vw, 520px);
  background: linear-gradient(135deg, #232b3a 60%, #2d1e4a 100%);
  border-radius: clamp(8px, 2vw, 16px);
  box-shadow: 0 4px 32px #a259ff33;
  border: 2px solid #a259ff44;
  display: flex;
  flex-direction: row;
  justify-content: space-around;
  align-items: stretch;
  gap: clamp(12px, 4vw, 32px);
  font-family: 'Oswald', 'Arial Narrow', Arial, sans-serif;
  font-size: clamp(0.98rem, 2.5vw, 1.12rem);
  color: #e0e0e0;
  transition: box-shadow 0.2s, transform 0.2s;
  left: 0;
  right: 0;
}
.test-results > div {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
}
.test-results .result-label {
  font-size: 1.05rem;
  color: #a259ff;
  font-weight: 700;
  margin-bottom: 2px;
  text-align: center;
  letter-spacing: 0.5px;
}
.test-results .result-value {
  font-size: 2.1rem;
  font-weight: 800;
  color: #43e97b;
  text-align: center;
  letter-spacing: 1.2px;
  text-shadow: 0 2px 8px #000a;
}
.test-results:hover {
  box-shadow: 0 8px 48px #a259ff55;
  transform: scale(1.02);
}

@media (max-width: 400px) {
  .test-results {
    flex-direction: column;
    gap: clamp(6px, 2vw, 16px);
    font-size: clamp(0.92rem, 3vw, 1.02rem);
    padding: clamp(6px, 2vw, 12px) 0 clamp(4px, 1vw, 8px) 0;
    min-width: 0;
    max-width: 99vw;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: clamp(24px, 10vw, 64px);
  }
  .test-results > div {
    padding: 0 2vw;
  }
  .test-results .result-value {
    font-size: clamp(1.2rem, 7vw, 1.7rem);
  }
}

.info-section {
  width: 100vw;
  max-width: 100vw;
  margin: 48px 0 32px 0;
  padding: 32px 24px;
  background: #232b3a;
  border-radius: 12px;
  box-shadow: 0 2px 12px #a259ff22;
  color: #e0e0e0;
  text-align: center;
}
.info-section h2 {
  color: #a259ff;
  margin-bottom: 12px;
  font-size: 1.4rem;
}
.info-section a {
  color: #43e97b;
  text-decoration: underline;
}
.info-section a:hover {
  color: #a259ff;
}
@media (max-width: 1024px) {
  .ad-box, .ad-left, .ad-right, .ad-history-bottom, .ad-top {
    display: none !important;
  }
}
