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

body {
  background-color: #0f1117;
  color: #f0f0f0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;

  display: flex;
  justify-content: center;
  align-items: flex-start;   /* ⬅️ KEY CHANGE */

  min-height: 100vh;
  padding-top: 60px;         /* ⬅️ pushes content down slightly */
  padding-left: 20px;
  padding-right: 20px;#servers-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 320px));
  gap: 20px;
  justify-content: center;
}

  overflow-x: hidden;
}
.header {
  text-align: center;
  margin-bottom: 40px; /* ⬅️ creates gap to cards */
}
.container {
  width: 100%;
  max-width: none;      /* ⬅️ REMOVE LIMIT */
  padding: 20px 40px;   /* ⬅️ side spacing like reference */
}

h1 {
  font-family: 'Quicksand', sans-serif;
  text-shadow: 1px 1px 1px rgb(24, 245, 79);
  font-size: 2.2rem;
  color: #5cd376;
  text-align: center;
  margin-bottom: 30px;
}

#servers-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

/* CARD */
.server {
  background: #1c1f26;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #2a2d35;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
  max-width: 320px;
  width: 100%;
  position: relative; /* ⬅️ THIS FIXES EVERYTHING */
}

.server:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

/* TITLE */
.server h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-bar {
  margin-top: 15px;
  padding: 10px 14px;
  width: 100%;
  max-width: 400px;

  background: #1c1f26;
  border: 1px solid #2a2d35;
  border-radius: 8px;

  color: #fff;
  font-size: 0.9rem;

  outline: none;
}

.search-bar::placeholder {
  color: #888;
}

.search-bar:focus {
  border-color: #5cd376;
}
.server p {
  font-size: 0.9rem;
  margin: 4px 0;
}

/* TOP IMAGE */
.server-icon {
  width: 100%;
  height: 130px;
  object-fit: cover;
}
.server.copied {
  border: 1px solid #5cd376;
}
/* CONTENT AREA */
.server-content {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-badge,
.server-btn {
  font-size: 0.7rem;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 600;
}
/* IP TEXT */
.server-ip {
  font-size: 0.8rem;
  color: #9aa0a6;
}
.online {
  background: #5cd376;
  color: rgb(255, 255, 255);
  font-size: small;
}
.server-btn:focus,
.server-btn:active {
  outline: none;
  box-shadow: none;
}
.server-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.server-header h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}
/* BUTTON */
.server-btn {
  background: #5cd376;
  color: #000;
  border: none;              /* remove default border */
  outline: none;             /* remove focus outline */
  box-shadow: none;          /* remove any shadow */
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: auto;
  cursor: pointer;
  pointer-events: none;
  appearance: none;          /* remove OS styling */
  -webkit-appearance: none;  /* Safari/Chrome */
  -moz-appearance: none;     /* Firefox */
}
.server-btn:hover {
  background: #4cb864;
}
/* TAGS */
.server-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.server-tag {
  background: #0f1117;
  border: 1px solid #2a2d35;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.7rem;
}
.offline {
  background: #e53935;
  color: white;
}

.outdated {
  background-color: #ffcb6b;
  color: #000;
}

.loading,
.error {
  color: #ff5370;
  font-style: italic;
  text-align: center;
  margin-top: 20px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* COPY EFFECT */
.server.copied {
  box-shadow: 0 0 25px rgba(92, 211, 118, 0.8);
}
/* FOOTER */
.server-footer {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}


/* Flexbox adjustments for responsive grid */
@media (min-width: 768px) {
  #servers-container {
    justify-content: space-evenly; /* Evenly space the cards in a row */
  }
}

@media (max-width: 767px) {
  #servers-container {
    flex-direction: column;
    gap: 10px;
  }

  .server {
    width: 100%;
  }
}
.refresh-time {
  font-size: 1rem;
  color: #b0b0b0;
  text-align: center; /* Center the text */
  margin-top: -20px;
}
