.test {
  text-align: center;
  vertical-align: middle;
}

.btn-default{
  color: #fff;
  background-color: #355B6A;
  border-color: #fff;
}

.badge {
  background-color: #1C2427 !important;
  color: #FDF8EF !important;
  font-weight: 600 !important;
  padding: 6px 8px !important;
  border-radius: 50% !important;
  font-size: 12px !important;
  border: 2px solid #95BFBE !important;
  transition: all 0.3s ease !important;
}

.badge:hover {
  background-color: #95BFBE !important;
  color: #1C2427 !important;
  transform: scale(1.1);
}

/* Ensure FontAwesome icons display properly */
.fa, .fas, .far, .fal, .fad, .fab {
  font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "Font Awesome 6 Brands" !important;
}

/* Navigation menu styling */
.topnav .btn {
  text-decoration: none;
  transition: all 0.3s ease;
  border-radius: 20px;
  padding: 8px 16px;
}

.topnav .btn:hover {
  background: rgba(149, 191, 190, 0.2);
  transform: translateY(-1px);
}

.topnav i {
  margin-right: 6px;
}

/* Bootstrap 5 Popover styling with Nimag branding and better contrast */
.popover {
  --bs-popover-max-width: 300px;
  --bs-popover-bg: #FDF8EF;
  --bs-popover-border-color: #95BFBE;
  --bs-popover-border-width: 2px;
  background-color: var(--bs-popover-bg) !important;
  border-color: var(--bs-popover-border-color) !important;
  border-width: var(--bs-popover-border-width) !important;
  box-shadow: 0 10px 30px rgba(28, 36, 39, 0.2) !important;
  border-radius: 12px !important;
}

.popover-header {
  background-color: #95BFBE !important;
  color: #1C2427 !important;
  font-weight: 700 !important;
  border-bottom: 1px solid #BEA486 !important;
  padding: 12px 16px !important;
  border-radius: 10px 10px 0 0 !important;
  font-family: "Radix", "Chillax", sans-serif !important;
}

.popover-body {
  color: #1C2427 !important;
  background-color: #FDF8EF !important;
  padding: 16px !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  border-radius: 0 0 10px 10px !important;
}

/* Popover arrow styling */
.popover.bs-popover-bottom > .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::before {
  border-bottom-color: #95BFBE !important;
}

.popover.bs-popover-bottom > .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="bottom"] > .popover-arrow::after {
  border-bottom-color: #FDF8EF !important;
}

.popover.bs-popover-top > .popover-arrow::before,
.popover.bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::before {
  border-top-color: #95BFBE !important;
}

.popover.bs-popover-top > .popover-arrow::after,
.popover.bs-popover-auto[data-popper-placement^="top"] > .popover-arrow::after {
  border-top-color: #FDF8EF !important;
}

footer {
        bottom: 0;
        left: 0;
        position: fixed;
        text-align: center;
        width: 100%;
        height: 50px;
        padding: 1rem;
        background: rgba(253, 248, 239, 0.95);
        color: #1C2427;
        backdrop-filter: blur(10px);
        box-shadow: 0 -2px 20px rgba(28, 36, 39, 0.1);
      }

body {
  text-align: center;
  font-family: "Chillax", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, #95BFBE 0%, #1C2427 100%);
  color: #1C2427;
  width: auto;
  height: auto;
  margin: 0;
  margin-bottom: 60px;
  position: relative;
  min-height: 100vh;
}

h1 {
  color: #404040;
}

h2 {
  color: white;
}

h6 {
  text-align: left;
  font-size: 8px;
  padding: 15px;
}

ol {
  text-align: left;
}

a.link {
  color: #FFFFFF;
}

#startStopBtn {
  display: inline-block;
  margin: 0 auto;
  color: #FDF8EF;
  background: linear-gradient(135deg, #95BFBE 0%, #1C2427 100%);
  border: none;
  border-radius: 50px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  width: 10em;
  height: 3.5em;
  line-height: 3.5em;
  cursor: pointer;
  box-shadow: 0 8px 30px rgba(149, 191, 190, 0.3);
  font-family: "Radix", "Chillax", sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

#startStopBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(149, 191, 190, 0.5);
}

#startStopBtn.running {
  background: linear-gradient(135deg, #BEA486 0%, #1C2427 100%);
  color: #FDF8EF;
  box-shadow: 0 8px 30px rgba(190, 164, 134, 0.4);
}

#startStopBtn:before {
  content: "GO";
  font-size: x-large;
}

#startStopBtn.running:before {
  content: "STOP";
  font-size: x-large;
}

#test {
  margin-top: 4em;
  margin-bottom: auto;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2em;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.popover{
        min-width: 20em !important;
        background-color: #355B6A;
        color: white;
}
.popover-title{
        background-color: #355B6A;
        border-bottom: 0px;
}
.popover.bottom>.arrow:after{
        border-bottom-color: #355B6A;
}

.header {
  height: 55px;
  width: auto;
  background: #355B6A;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 10px;
}

.warning ol {
  display: inline-block;
}

.topnav {
  background: rgba(253, 248, 239, 0.95);
  height: 50px;
  width: 100%;
  vertical-align: center;
  border-right: 0px;
  border: none;
  border-radius: 0;
  padding-top: 6px;
  padding-left: 30px;
  padding-right: 30px;
  box-shadow: 0 2px 20px rgba(28, 36, 39, 0.1);
  backdrop-filter: blur(10px);
}

.btn-default {
  color: #FFFFFF;
  background-color: #355B6A;
  border-color: #FFFFFF;
}

.btn-default:hover {
  color: #FFFFFF;
  background-color: #355B6A;
  border-color: #FFFFFF;
}

.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open>.dropdown-toggle.btn-default.focus, .open>.dropdown-toggle.btn-default:focus, .open>.dropdown-toggle.btn-default:hover {
  color: #FFFFFF;
  background-color: #355B6A;
  border-color: #FFFFFF;
}

.btn-default.active.focus, .btn-default.active:focus, .btn-default.active:hover, .btn-default:active.focus, .btn-default:active:focus, .btn-default:active:hover, .open>.dropdown-toggle.btn-default.focus, .open>.dropdown-toggle.btn-default:focus, .open>.dropdown-toggle.btn-default:hover {
  color: #FFFFFF;
  background-color: #355B6A;
  border-color: #FFFFFF;
}

.btn-default.focus, .btn-default:focus {
  color: #FFFFFF;
  background-color: #355B6A;
  border-color: #FFFFFF;
}

.dropdown-menu{
  min-width: auto;
  z-index: 1000;
}

a.topnav-nimaglogo {
  float: left;
}

div.warning {
  background: rgba(255, 255, 255, 0.9);
  margin-top: 20px;
  display: inline-block;
  width: 90%;
  max-width: 800px;
  padding: 20px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

div.browserWarning {
  font-size: smaller;
  margin-bottom: 15px;
}

a.footer {
  vertical-align: middle;
  display: table;
  padding-left: 20px;
  padding-right: 20px;
  color: #FFFFFF;
}

div.offer{
  padding-left: 20px;
  padding-right: 20px;
}

div.testArea {
  display: inline-block;
  width: 16em;
  height: 12.5em;
  position: relative;
  box-sizing: border-box;
  margin: 1em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(5px);
  transition: transform 0.3s ease;
}

div.testArea2 {
  display: inline-block;
  width: 14em;
  height: 7em;
  position: relative;
  box-sizing: border-box;
  text-align: center;
  margin: 0.5em;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  backdrop-filter: blur(5px);
  padding: 1em;
  transition: transform 0.3s ease;
}

div.testArea div.testName {
  position: absolute;
  top: 0.1em;
  left: 0;
  width: 100%;
  font-size: 1.4em;
  z-index: 9;
}

div.testArea2 div.testName {
  display: block;
  text-align: center;
  font-size: 1.4em;
}

div.testArea div.meterText {
  position: absolute;
  bottom: 1.55em;
  left: 0;
  width: 100%;
  font-size: 2.5em;
  z-index: 9;
}

div.testArea2 div.meterText {
  display: inline-block;
  font-size: 2.5em;
}

div.meterText:empty:before {
  content: "0.00";
}

div.testArea div.unit {
  position: absolute;
  bottom: 2em;
  left: 0;
  width: 100%;
  z-index: 9;
}

div.testArea2 div.unit {
  display: inline-block;
}

div.testArea canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

div.testGroup {
  display: block;
  margin: 0 auto;
}

#footer {
  position: fixed;
  bottom: 0;
  width: 100%;
}

#shareArea {
  width: 95%;
  max-width: 40em;
  margin: 0 auto;
  margin-top: 2em;
}

#shareArea>* {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.25em 0;
}

#privacyPolicy {
  position: fixed;
  top: 2em;
  bottom: 2em;
  left: 2em;
  right: 2em;
  overflow-y: auto;
  width: auto;
  height: auto;
  box-shadow: 0 0 3em 1em #000000;
  z-index: 999999;
  text-align: left;
  background-color: #FFFFFF;
  padding: 1em;
}

a.privacy {
  text-align: center;
  font-size: 0.8em;
  color: #355B6A;
  display: block;
}

#pingANDjitter {
  position: fixed;
  top: 2em;
  bottom: 2em;
  left: 2em;
  right: 2em;
  overflow-y: auto;
  width: auto;
  height: auto;
  box-shadow: 0 0 3em 1em #000000;
  z-index: 999999;
  text-align: left;
  background-color: #FFFFFF;
  padding: 1em;
}

a.pingJitter {
  text-align: center;
  font-size: 0.8em;
  color: #355B6A;
  display: block;
}

h2.pingJitter {
  color: #355B6A;
}

@media all and (max-width:40em) {
  body {
    /* font-size: 0.8em; */
  }
}
@media (max-width: 480px) {
  .btnLang {margin-top:-7px;}
  }

.collapsible {
	background-color: #606060;
	color: white;
	cursor: pointer;
	padding: 18px;
	width: 100%;
	border: none;
	text-align: center;
	outline: none;
	font-size: 15px;
}

.active, .collapsible:hover {
	background-color: #555;
}

.collapsible:after {
	content: '\002B';
	color: white;
	font-weight: bold;
	float: center;
	margin-left: 5px;
}

.active:after {
	content: "\2212";
}

.content {
	padding: 0 18px;
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.2s ease-out;
	background-color: #f1f1f1;
}
.hidden-xs img {
	padding-right: 170px;
}

/* Modern animations and effects removed */

/* Improved responsive design */
@media (max-width: 768px) {
  body {
    font-size: 14px;
  }
  
  #test {
    margin: 1em;
    padding: 1em;
    border-radius: 15px;
  }
  
  .testArea, .testArea2 {
    width: 90%;
    margin: 0.5em auto;
    display: block;
  }
  
  .topnav {
    padding-left: 15px;
    padding-right: 15px;
  }
  
  #startStopBtn {
    width: 80%;
    max-width: 300px;
  }
}

@media (max-width: 480px) {
  .testArea, .testArea2 {
    width: 95%;
    height: auto;
    min-height: 8em;
  }
  
  div.warning {
    width: 95%;
    padding: 15px;
  }
  
  .topnav {
    height: 60px;
    padding-top: 10px;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  #test {
    background: rgba(30, 30, 30, 0.95);
    color: #e0e0e0;
  }
  
  .topnav {
    background: rgba(30, 30, 30, 0.95);
  }
  
  footer {
    background: rgba(30, 30, 30, 0.95);
    color: #ccc;
  }
}
