/* Reset and base styles */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #333;
  font-family: "Roboto", sans-serif;
  color: white;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Centered container */
.container {
  position: relative; /* For absolute positioning of test counter */
  width: 90%;
  max-width: 500px;
  background: #444;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  margin: 20px;
}

/* Main title */
.container > h1 {
  text-align: center;
  margin-bottom: 50px;
}

/* Section styling */
.section {
  margin-bottom: 50px;
}

.section h2 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 1.5em;
  border-bottom: 1px solid #00ffaa;
  padding-bottom: 5px;
}

.no-border {
  border-bottom: 0px solid !important;
}

.spacer td {
  padding-top: 20px !important;
  border-bottom: 1px solid #00ffaa !important;
}

/* Top section styles */
.top-section {
  margin-bottom: 20px;
}

.speed {
  margin-bottom: 15px;
}

.label {
  margin-bottom: 5px;
  font-size: 1.2em;
}

/* Progress bar styling */
progress {
  width: 100%;
  height: 20px;
  -webkit-appearance: none;
  appearance: none;
  border: none;
  border-radius: 8px;
  background-color: #555;
  overflow: hidden;
}

/* Smooth transition for WebKit browsers */
progress::-webkit-progress-value {
  background-color: #00ffaa;
  border-radius: 8px;
  transition: width 0.3s ease-in-out;
}

/* Smooth transition for Mozilla browsers */
progress::-moz-progress-bar {
  background-color: #00ffaa;
  border-radius: 8px;
  transition: width 0.3s ease-in-out;
}

/* Bottom section styles */
.bottom-section {
  display: flex;
  justify-content: space-around;
  margin-bottom: 20px;
}

.status {
  font-size: 1.2em;
}

/* Controls styling */
.controls {
  display: flex;
  align-items: center;
  margin-top: 10px;
  padding-bottom: 20px;
}

.serverContainer, .startContainer, .ipContainer {
  flex: 1;
}

.serverContainer {
  text-align: left;
}

.startContainer {
  display: flex;          /* umjesto samo text-align */
  align-items: center;    /* centriraj vertikalno */
  justify-content: right;/* centriraj horizontalno */
  gap: 10px;              /* razmak između gumba */
}

.startContainer button {
  display: inline-block;  /* gumb je inline-block da se smjesti jedan do drugog */
}


.ipContainer {
  text-align: right;
  font-size: 1em;
  /* Hidden by default but occupies layout space */
  visibility: hidden;
}

/* Styling for the server select dropdown */
#server {
  background-color: #444;
  border: 1px solid #00ffaa;
  border-radius: 4px;
  color: white;
  padding: 5px;
  font-size: 1.2em;
  outline: none;
}

/* Styling for the start/stop button */
#startStopBtn {
  padding: 10px 20px;
  font-size: 1.2em;
  background: #00ffaa;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

#startStopBtn.running {
  background: #FF3030;
  color: #fff;
}

#ShareTestID {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

#ShareTimestamp {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

#testCounter {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

#shareTestID {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

#IPaddress {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

#Timestamp {
  position: absolute;
  bottom: 10px;
  left: 10px;
  font-size: 0.9em;
  color: #00ffaa;
}

a.ipinfo-link {
  color: inherit;
  text-decoration: none;
}


.share-container {
      position: relative; /* For absolute positioning of test counter */
      width: 90%;
      max-width: 500px;
      background: #444;
      padding: 20px;
      border-radius: 8px;
      box-shadow: 0 0 10px rgba(0,0,0,0.5);
      margin: 20px;
    }
    .share-container table {
      width: 100%;
      border-collapse: collapse;
      margin-top: 20px;
	  font-size: 1.2em;
    }
    .share-container th, .share-container td {
      padding: 10px;
      text-align: left;
      /* border-bottom: 1px solid #ddd; */
    }
	.share-container td {
      padding: 10px;
      text-align: right;
	  min-width: 150px;
      /* border-bottom: 1px solid #ddd; */
    }
    .share-container h1 {
      margin-bottom: 30px;
      text-align: center;
      color: #00ffaa;
    }
    .action-btn {
      display: block;
      width: 100%;
      max-width: 300px;
      margin: 30px auto 10px;
      padding: 10px;
      font-size: 1.2em;
      background: #00ffaa;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      color: #333;
    }
    .action-btn:hover {
      background: #00cc99;
	  
    }
	
/* Stil za oba gumba (share i repeat) */
#shareBtn,
#repeatBtn {
  display: block;
  width: 100%;
  max-width: 300px;
  margin: 30px auto 30px;
  padding: 10px 20px;
  font-size: 1.2em;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  color: #333;
}

/* Specifični stil za "Podijeli" gumb */
#shareBtn {
  background: #03dffc;
}

#shareBtn:hover {
  background: #02b8e0; /* darker blue on hover */
}

#shareBtn:active {
  background: #019cc7; /* even darker blue when active */
}

/* Specifični stil za "Ponovi test" gumb */
#repeatBtn {
  background: #00ffaa;
}

#repeatBtn:hover {
  background: #00cc99;
}

#repeatBtn:active {
  background: #00cc99;
}
