:root {
  /* Colors */
  --primary-color: #f0a020;
  --primary-dark: #1a1a1a;
  --secondary-dark: #2a2a2a;
  --text-color: #ffffff;
  --text-secondary: #aaaaaa;
  --text-muted: #cccccc;
  --error-color: #ff5555;

  /* Shadows */
  --text-shadow: 1px 1px 3px rgba(27, 21, 16, 0.8);
  --box-shadow: 0 4px 8px rgba(27, 21, 16, 0.5);
  --box-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.5);

  /* Transparency */
  --overlay-light: rgba(27, 21, 16, 0.5);
  --overlay-dark: rgba(42, 42, 42, 0.75);

  /* Sizes */
  --border-radius: 10px;
  --border-radius-small: 8px;
  --border-width: 2px;
  --card-width: 350px;
  --card-height: 400px;

  /* Images */
  --bg-image: url('night.jpg');
  --bg-main: url('bg.jpg');
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  margin: 0;
  padding: 20px;
  min-height: 100%;
  flex-direction: column;
  color: var(--text-color);
  position: relative;
  background-color: var(--primary-dark);
  background-image: var(--bg-main);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-light);
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at center,
      transparent 0%,
      rgba(0, 0, 0, 0.7) 90%);
  z-index: -1;
  pointer-events: none;
}

header {
  margin-bottom: 40px;
}

header h1 {
  font-size: 2.5rem;
  margin: 30px 0;
  color: var(--primary-color);
  text-shadow: var(--text-shadow);
}

header .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto 80px auto;
  text-align: center;
}

.servers-grid {
  /* keep your existing props (gap, etc.) */
  display: grid;
  grid-auto-flow: row;
  gap: 20px;

  /* fixed track size = card width; auto-fit packs as many as fit in a row */
  grid-template-columns: repeat(auto-fit, minmax(var(--card-width), var(--card-width)));

  /* center the grid tracks when there's leftover space (2 cols, 1 col, etc.) */
  justify-content: center;
}

.server-card {
  position: relative;
  height: var(--card-height);
  width: var(--card-width);
  max-width: min(90vw, var(--card-width));
  border-radius: var(--border-radius);
  overflow: hidden;
  color: var(--text-color);
  padding: 20px;
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column;
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-image: var(--bg-image, url('night.jpg'));
  filter: brightness(0.6) grayscale(0.4) blur(2px);
  z-index: 0;
  transition: filter 0.3s;
}

.server-card:hover::before {
  filter: brightness(0.8) grayscale(0) blur(0px);
}

.server-card>* {
  position: relative;
  z-index: 1;
}

.server-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.server-address {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--overlay-dark);
  border-radius: var(--border-radius-small);
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
  border: 1px solid var(--primary-color);
  box-shadow: var(--box-shadow-hover);
}

.server-card:hover .server-address {
  opacity: 1;
}

.server-details {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: var(--overlay-dark);
  border-radius: var(--border-radius-small);
  padding: 15px;
  opacity: 1;
  transition: opacity 0.3s ease;
  pointer-events: none;
  border: 1px solid var(--primary-color);
  box-shadow: var(--box-shadow-hover);
}

.server-card:hover .server-details {
  opacity: 0;
}

.detail-row {
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.detail-row:last-child {
  margin-bottom: 0;
}

.detail-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.detail-value {
  color: var(--text-color);
  font-size: 0.9rem;
  text-align: right;
}

.server-name {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
  text-shadow: var(--text-shadow);
}

.server-description {
  color: var(--text-muted);
  margin-bottom: 15px;
  min-height: 40px;
  text-shadow: var(--text-shadow);
}

.server-map {
  font-size: 1.1rem;
  text-shadow: var(--text-shadow);
  text-transform: capitalize;
}

.server-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  text-shadow: var(--text-shadow);
}

.players-count {
  font-size: 1.2rem;
  text-shadow: var(--text-shadow);
}

.queue-count {
  font-size: 1.2rem;
  color: var(--error-color);
  text-shadow: var(--text-shadow);
}

.time-text {
  font-size: 1.2rem;
  margin-bottom: 15px;
  text-shadow: var(--text-shadow);
}

.action-button-container {
  text-align: center;
  margin: 80px 0 80px 0;
}

.action-button {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--primary-color);
  color: var(--primary-dark);
  text-decoration: none;
  font-weight: bold;
  border-radius: var(--border-radius-small);
  transition: all 0.3s ease;
  font-size: 1.1rem;
  border: var(--border-width) solid transparent;
}

.action-button:hover {
  background-color: var(--primary-dark);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.site-footer {
  background-color: var(--secondary-dark);
  color: var(--text-secondary);
  padding: 15px 0;
  text-align: center;
  width: 100%;
  border-top: 1px solid var(--primary-color);
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 100;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.footer-content p {
  margin: 5px 0;
}

.footer-content a {
  margin: 5px 0;
  color: var(--text-secondary);
}

.credits {
  font-size: 0.8em;
  color: #666;
  margin-top: 1em;
}

.credits a {
  color: #777;
  text-decoration: none;
}

.credits a:hover {
  text-decoration: underline;
  color: #555;
}

@media (max-width: 768px) {
  .servers-grid {
    grid-template-columns: 1fr;
  }

  .action-button {
    padding: 10px 20px;
    font-size: 1rem;
  }

  .footer-content p {
    font-size: 0.8rem;
  }
}

/* --- Sections: About / Roadmap cards --- */
.section,
.about,
.roadmap {
  /* glassy card look */
  background: var(--overlay-dark);
  border: 1px solid rgba(240, 160, 32, 0.35); /* subtle primary border */
  border-radius: var(--border-radius);
  padding: 28px;
  margin: 30px auto;
  margin-bottom: 80px;
  max-width: 1000px;
  text-align: left; /* content reads better left-aligned */
  box-shadow: var(--box-shadow);
  backdrop-filter: blur(6px); /* visual polish */
}

.section h2,
.about h2,
.roadmap h2,
.about h3 {
  color: var(--primary-color);
  margin-bottom: 14px;
  text-shadow: var(--text-shadow);
}

.about p,
.section p {
  /* readable body text */
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
  max-width: 80ch;
}

/* --- Feature lists (About) --- */
/* works for either plain .about ul or .feature-list if you add the class */
.about ul,
.feature-list {
  list-style: none;          /* custom bullets */
  margin: 12px 0 6px 0;
  padding-left: 0;
}

.about li,
.feature-list li {
  position: relative;
  margin: 8px 0;
  padding-left: 28px;        /* room for custom bullet */
  color: var(--text-color);
}

/* custom bullet */
.about li::before,
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 10px;
  height: 10px;
  border-radius: 2px;        /* diamond-ish */
  transform: rotate(45deg);
  background: linear-gradient(135deg, var(--primary-color), #ffcf6b);
  box-shadow: 0 0 8px rgba(240, 160, 32, 0.5);
}

/* nested list support */
.about li ul,
.feature-list li ul {
  margin-top: 6px;
  padding-left: 0;
}
.about li ul li,
.feature-list li ul li {
  padding-left: 22px;
}
.about li ul li::before,
.feature-list li ul li::before {
  width: 6px;
  height: 6px;
  top: 0.65em;
  background: var(--primary-color);
  box-shadow: none;
}

/* subtle divider between logical groups (optional) */
.about ul + h3 {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(240,160,32,0.25);
}

/* --- Roadmap timeline --- */
.roadmap .timeline {
  position: relative;
  list-style: none;
  margin: 16px 0 0 0;
  padding-left: 2px;         /* aligns with dots */
}

/* vertical line */
.roadmap .timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(240,160,32,0.3),
    rgba(240,160,32,0.6),
    rgba(240,160,32,0.3)
  );
}

.roadmap .timeline li {
  position: relative;
  margin: 14px 0 14px 24px;  /* space from the line */
  padding-left: 14px;        /* text offset */
  color: var(--text-color);
  line-height: 1.6;
}

/* nodes (dots) */
.roadmap .timeline li::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 6px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary-dark);
  background: var(--primary-color);
  box-shadow: 0 0 10px rgba(240,160,32,0.6);
}

/* label emphasis */
.roadmap .timeline li > strong {
  color: var(--primary-color);
}

/* --- Links inside sections --- */
.section a,
.about a,
.roadmap a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px dashed rgba(240,160,32,0.35);
}
.section a:hover,
.about a:hover,
.roadmap a:hover {
  border-bottom-color: var(--primary-color);
}

@media (max-width: 1130px) {
  .servers-grid {
    justify-content: center;   /* center the grid tracks */
    grid-template-columns: repeat(2, var(--card-width));
  }
}

/* --- Mobile tweaks --- */
@media (max-width: 768px) {
  .section,
  .about,
  .roadmap {
    padding: 20px;
    margin: 20px auto;
  }

  .roadmap .timeline::before {
    left: 8px;
  }
  .roadmap .timeline li {
    margin-left: 22px;
    padding-left: 12px;
  }
  .roadmap .timeline li::before {
    left: -18px;
  }

  .servers-grid {
    display: flex;               /* switch to flex */
    flex-direction: column;      /* stack cards */
    align-items: center;         /* center horizontally */
    gap: 20px;                   /* keep spacing */
  }

  .server-card {
    width: var(--card-width);    /* keep fixed width */
    max-width: 90%;              /* shrink gracefully on very small screens */
  }
}
