/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body and container */
body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #233258;
  color: #222;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  min-height: 100vh;
  position: relative;
}


/* Add a wrapper to stack main content vertically */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 100vh;
}

/* Vertically center links-container to the button group */
.links-container {
  max-width: 260px;
  margin-left: 100px;
  background: #ffffff;
  color: #2a3a5e;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2em;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: fit-content;
  align-self: center;
  position: static;
  left: auto;
  top: auto;
  transform: none;
}

.links-container ul {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
}

.links-container li {
  margin-bottom: 0.5em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.links-container a {
  color: #2a3a5e;
  text-decoration: none;
  font-size: 1.05rem;
  font-family: 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s;
  padding: 0.2em 0;
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Make sure .main-content-wrapper is positioned relative for absolute positioning to work */
.main-content-wrapper {
  position: relative;
}

/* Centered main container */
.container {
  max-width: 500px;
  margin: 10vh auto 0 auto;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  padding: 2em;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Heading */
h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1em;
  color: #2a3a5e;
}

/* Button group */
.mt-1 {
  margin-top: 1em;
}

.btn {
  display: inline-block;
  font: inherit;
  padding: 0.75em 1.5em;
  margin: 0 0.5em;
  border: none;
  border-radius: 6px;
  background: #2a3a5e;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 2px 8px rgba(42,58,94,0.08);
}
.btn:hover,
.btn:focus {
  background: #1d2840;
  transform: translateY(-2px);
}

/* Utility classes */
.mb-1 {
  margin-bottom: 1em;
}

/* --- Server Status Containers --- */

.server-status-container-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 50px auto 0 auto;
}

.server-status-container {
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    background-color: white;
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.server-url {
    font-weight: bold;
    color: #555;
}
.status-message {
    font-weight: bold;
    margin-top: 5px;
}
.online {
    color: green;
}
.offline {
    color: red;
}

/* Responsive: stack containers vertically on small screens */
@media (max-width: 900px) {
  body {
    flex-direction: column;
    align-items: center;
  }
  .main-content-wrapper {
    min-height: unset;
    justify-content: flex-start;
  }
  .links-container {
    margin: 2em auto 0 auto;
    width: 90%;
    max-width: 400px;
    align-self: stretch;
  }
}

/* Grouping selectors for shared styles */
.container, .server-status-container-group {
  max-width: 100%;
}

/* Responsive styles */
@media (max-width: 700px) {
  .links-container {
    padding: 1em;
  }
  .container, .server-status-container-group {
    margin-left: 0;
    margin-right: 0;
    width: 95vw;
    max-width: 100%;
  }
}