/* ===== Global ===== */
html {
  scrollbar-gutter: stable;   /* Reserves space for scrollbar even when not visible */
}

:root {
  --bg-top: #1a1f27;
  --bg-bottom: #23303f;
}

body {
  color: #dbe7ef;
  font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  margin: 0;
  background: linear-gradient(
    180deg,
    var(--bg-top) 0%,
    var(--bg-bottom) 100%
    
  );
}

/* Default container (ALL pages) */
.container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 2;
}

body.index-page .container {
  margin-top: -250px;
}


.logo-image {
  height: 70px;      /* 👈 compact size */
  width: auto;
  display: block;    /* removes inline spacing */
}

.server-list-logo {
  height: 300px;      /* 👈 compact size */
  width: auto;
  display: block;    /* removes inline spacing */
}

/* ===== Top Navigation Bar ===== */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  left: 0;
  right: 0;

  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  border-bottom: 1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 12px 30px rgba(0, 0, 0, 0.35);
}

.nav-inner {
  padding: 0 16px; /* horizontal only */
  max-width: 1500px;
  height: 100%;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo-link {
  display: flex;
  align-items: center;
}

/* Right-side buttons */
.nav-actions {
  display: flex;
  gap: 12px;
}

/* Base nav button */
.nav-btn {
  padding: 8px 16px;
  border-radius: 14px; /* squircle */
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

/* Ghost / neutral */
.nav-btn.ghost {
  background: #0f1d2f;
  border-color: #1c3348;
  color: #cfe6f3;
}

.nav-btn.ghost:hover {
  border-color: #67c7ff;
}

/* Promoted (gold) */
.nav-btn.promoted {
  background: #0f1d2f;
  border-color: #1c3348;
  color: #cfe6f3;
}

.nav-btn.promoted:hover {
  border-color: #67c7ff;
}

/* Primary (login) */
.nav-btn.primary {
  background: #0f1d2f;
  border-color: #1c3348;
  color: #cfe6f3;
}

.nav-btn.primary:hover {
  border-color: #67c7ff;
}

#loginForm button,
#registerForm button {
  width: 100%;
  margin-top: 16px;
}

#authModal a {
  color: #67c7ff;
  font-weight: 700;
  text-decoration: none;
}

#authModal a:hover {
  text-decoration: underline;
}

#registerForm {
  text-align: left;
}

.checkbox-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;

  gap: 5px;
  width: 100%;
  margin: 6px 0 12px 0;

  font-size: 0.85rem;
  color: #adc2d6;

  white-space: nowrap;
}

input[type="checkbox"] {
  width: auto;
  margin: 0 8px 0 0;
}

.checkbox-row input {
  margin: 0 8px 0 0;
}

#registerSubmit:disabled {
  background: #0f4922;
  color: #04111a;
  cursor: not-allowed;
  filter: none;
}

#registerSubmit:not(:disabled) {
  background: #28a745;
  color: #04111a;
}

/* ===== Footer Overall ===== */
.site-footer {
  background: none; /* remove old background */
  margin-top: 80px;
  font-size: 0.9rem;
  color: #a0a0ad;
}

/* Inner wrapper */
.footer-inner {
  max-width: 2000px;
  margin: 0 auto;
}

/* Top section (logo) */
.footer-brand {
  background-color: #161e33;  /* lighter colour */
  padding: 20px 16px 0px;          /* smaller padding */
  display: flex;
  justify-content: center;
}

.footer-logo {
  height: 100px;                /* smaller logo */
  margin: 0;                   /* remove extra margin */
  opacity: 0.9;
}

/* Bottom section (links + meta) */
.footer-links,
.footer-meta {
  background-color: #161e33;   /* darker colour */
  padding: 12px 16px;          /* tighter padding */
  text-align: center;
}

/* Links styling */
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 50px;                  /* smaller gap */
  margin-bottom: 0px;
}

.footer-links a {
  color: #adc2d6;
  font-size: 1.1rem;          /* smaller text */
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #ffffff;
}

/* Meta text */
.footer-meta {
  font-size: 1rem;          /* smaller text */
  color: #5c6774;
}

.footer-meta p {
  margin: 2px 0;
}

.footer-note {
  opacity: 0.8;
  margin-top: 4px;
}

/* Headings */
h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 5px;
  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Terms page specific styles */
.terms-page .container {
  text-align: center;
  margin-top: 100px;
}

body.terms-page .terms-container h2 {
  background: none;                /* remove gradient */
  -webkit-text-fill-color: initial; /* reset */
  color: #b0dff8;                 /* your desired color */
}

body.terms-page .top-nav {
  position: fixed;
}

/* ===== Index Hero Section ===== */
.hero-layer {
  position: relative;
  z-index: 0;
}

/* Bigger hero */
.index-hero {
  position: relative;
  height: 520px; /* MUCH taller */
  margin-top: -74px;
  padding-top: 0px;

  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;

  /* Hero image */
  background:
    linear-gradient(
      to bottom,
      rgba(26, 31, 39, 0) 0%,
      rgba(26, 31, 39, 0.25) 40%,
      rgba(26, 31, 39, 0.65) 70%,
      rgba(26, 31, 39, 0.95) 100%
    ),
    url("https://hypixel.net/attachments/1711394216046-png.3302464/")
    center 60% / cover no-repeat;
}

/* Make content float over hero */
.container {
  position: relative;
  z-index: 2;
  margin-top: -250px; /* pulls content upward into hero */
}

/* ===== Terms Hero Section ===== */
.terms-hero {
  height: 400px;
  width: 100%;
  margin-top: 0px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      to bottom,
      rgba(26, 31, 39, 0) 50%,
      #1a1f27f2 100%
    ),
    url("https://hypixel.net/attachments/1711394139635-png.3302460/")
    center / cover no-repeat;
}

/* ===== Privacy Hero Section ===== */
.privacy-hero {
  height: 400px;
  width: 100%;
  margin-top: 0px;

  display: flex;
  align-items: center;
  justify-content: center;

  background:
    linear-gradient(
      to bottom,
      rgba(26, 31, 39, 0) 50%,
      #1a1f27f2 100%
    ),
    url("https://hypixel.net/attachments/1711394317729-png.3302470/")
    center / cover no-repeat;
}

/* Index title */
.index-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;

  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.9));
}

.index-hero h1 {
  transform: translateY(-50px);
}

/* Hero title */
.terms-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;

  background: linear-gradient(180deg, #b0dff8 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.9));
}

/* Privacy title */
.privacy-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  text-align: center;

  background: linear-gradient(180deg, #b0dff8 0%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.9));
}

h2 {
  margin-top: 48px;
  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

h3 {
  margin-top: 0px;
  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Inputs */
input,
textarea,
select {
  width: 100%;
  box-sizing: border-box;
  background: #0a1622;
  border: 1px solid #152635;
  color: #e6f0f6;
  padding: 10px 12px;
  border-radius: 6px;
  outline: none;
  margin-bottom: 12px;
  font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.95rem;
}

input::placeholder,
textarea::placeholder {
  color: #7f9aac;
}

input:focus,
textarea:focus {
  border-color: #67c7ff;
}

#search {
  width: 100%;
  max-width: 500px;   /* 👈 controls length */
  height: 10px;       /* 👈 controls height */
  font-size: 1rem;
  padding: 18px 5px;
  padding-left: 12px;
  margin-bottom: 30px;
  display: block;
  margin: 0 auto 125px auto;
}

.version-input-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  background: #0a1622;
  border: 1px solid #152635;
  border-radius: 6px;
  padding: 4px 8px;
  gap: 6px;
  max-height: 32px;
  margin-bottom: 12px;
}

.version-input-wrapper input {
  flex: 1;
  min-width: 60px;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  padding-left: 0;
  padding: 0;               /* remove top/bottom padding */
  height: 32px;             /* match wrapper height */
  line-height: 32px; 
  margin-left: 0;
  outline: none;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;

  height: 32px;          /* exactly match wrapper */
  line-height: 32px;     /* vertically center text */

  outline: none;
  box-sizing: border-box;
}

.version-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.version-tag {
  display: inline-flex;
  align-items: center;   /* vertical center inside tag */
  justify-content: center; 
  height: 24px;          /* smaller than wrapper */
  line-height: 24px;
  padding: 0 6px;        /* horizontal padding */
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  background: #4faee6;
  color: #fff;
  cursor: default;
  margin: 0;
}

.user-dropdown {
  position: absolute;
  background: #0a1622;
  border: 1px solid #152635;
  border-radius: 8px;
  padding: 8px 0;
  min-width: 150px;
  z-index: 1000;
}

.user-dropdown.hidden {
  display: none;
}

.user-dropdown .dropdown-item {
  padding: 8px 16px;
  cursor: pointer;
  color: #e6f0f6;
}

.user-dropdown .dropdown-item:hover {
  background: #16283d;
}

/* Promoted servers container */
.promoted-servers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* SAME as server-grid */
  gap: 26px;
  margin-bottom: 40px;
}

/* Ensure promoted cards have same look as normal servers */
.promoted-servers .server {
  flex-shrink: 0;
}

.promoted-text span {
  display: block; /* each line is separate */
  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 12px rgba(103, 199, 255, 0.15);
}

/* Glassmorphic promoted server button */
.promoted-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  
  width: 50px;
  height: 50px;
  border-radius: 14px; /* squircle shape */

  background: rgba(255, 255, 255, 0.1); /* semi-transparent */
  backdrop-filter: blur(8px);           /* blurry glass effect */
  -webkit-backdrop-filter: blur(8px);   /* Safari support */

  border: 1px solid rgba(255, 255, 255, 0.25); /* subtle border */
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); /* subtle shadow */
  transition: all 0.2s ease;
}

.promoted-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%) scale(1.1);
}

/* Buttons */
button {
  background: #28a745;
  border: none;
  color: #04111a;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  filter: brightness(1.05);
}

/* ===== Filter Buttons ===== */
.filters {
  display: flex;
  gap: 10px;
  margin: 16px 0 24px;
  flex-wrap: wrap;
}

.filter-btn {
  background: #0f1d2f;
  border: 1px solid #1c3348;
  color: #cfe6f3;
  padding: 8px 16px;
  border-radius: 14px; /* squircle */
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

/* Hover */
.filter-btn:hover {
  border-color: #67c7ff;
}

/* Active (gold like Hytale) */
.filter-btn.active {
  background: #28a745;
  color: #2a1a00;
  border-color: #6fe46b;
  box-shadow:
    0 0 0 1px rgba(255, 215, 120, 0.35),
    0 6px 18px rgba(0, 0, 0, 0.5);
}

/* ===== Server Grid ===== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

/* ===== Server Card ===== */
.server {
  height: 160px;
  min-height: 140px;
  padding-left: 16px;
  display: flex;
  cursor: pointer;
  justify-content: space-between;
  align-items: stretch;
  position: relative;

  background: #181c22; /* solid color using the last color of the gradient */
  border: 1px solid #121f2b;
  border-radius: 14px;

  /* Remove top/bottom padding, keep left padding for text */
  padding: 0 0 0 18px;

  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.02),
    0 18px 40px rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s;
}

.server,
.server * {
  min-width: 0;
}

/* Server info on left side */
.server-info {
  flex: 1;
  padding: 10px 12px 10px 0;
  margin-right: -80px; /* overlays text slightly onto image */
  z-index: 2;
}

.server-info p {
  margin: 5px 0;       /* 🔥 huge fix */
  line-height: 1.25;
}

/* Server image on right side, full height */
.server-image {
  flex: 0 0 40%;        /* ← image takes ~40% of card */
  min-width: 320px;
  height: 100%;
  border-radius: 0 14px 14px 0;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.server-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.server-header {
  display: flex;
  align-items: center; /* vertically center logo with text */
  gap: 16px;           /* space between logo and text */
  margin-bottom: 20px; /* optional spacing below header */
}

.server-logo {
  width: 80px;   /* adjust as needed */
  height: 80px;  /* keep square */
  object-fit: cover;
  border-radius: 10px; /* optional rounded corners */
  flex-shrink: 0;      /* prevent shrinking */
}

.server:hover {
  transform: translateY(-5px);
  border-color: #67c7ff;
  box-shadow:
    0 0 0 1px rgba(103, 199, 255, 0.25),
    0 25px 60px rgba(0, 0, 0, 0.9);
}

.server:hover {
  transform: translateY(-5px);
  border-color: #67c7ff;
  box-shadow:
    0 0 0 1px rgba(103, 199, 255, 0.25),
    0 25px 60px rgba(0, 0, 0, 0.9);
}

/* ===== Server Page Layout ===== */
.server-page {
  padding-top: 0px; /* space below navbar */
}

body.server-page .container {
  margin-top: 40px;
}

body.server-page .index-hero {
  display: none;
}

.server-page-card {
  max-width: 720px;
  margin: 40px auto;
  padding: 24px;

  background: #181c22;
  border: 1px solid #1c3348;
  border-radius: 18px;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.04),
    0 30px 80px rgba(0,0,0,0.85);
}

.server-ip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.server-info-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0;
}

.server-ip-text {
  background: #0a1622;
  border: 1px solid #152635;
  padding: 6px 10px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.95rem;
  flex: 1;
}

.server-info-text {
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  flex: 1;
}

.server-action-btn {
  background: #0a1622;
  border: 1px solid #1c3348;
  color: #cfe6f3;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.server-action-btn:hover {
  border-color: #67c7ff;
}

.server-action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.server-info-text a {
  color: #67c7ff;
  font-weight: 700;
  text-decoration: none;
}

.server-info-text a:hover {
  text-decoration: underline;
}

.vote-btn {
  width: 100%;
  margin-top: 20px;
  background: #28a745;
  color: #052a00;
  border: none;
}

.tag-box.unknown {
  background: #0a1622;
  border: 1px solid #1c3348;
  color: #fff;
}

.server-tags {
  margin-top: 12px;
}

.description-section {
  line-height: 1.5;
}

#server-description {
  margin-top: 12px;
  line-height: 1.5;
  opacity: 0.9;
  white-space: pre-wrap;
}

.server-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 20px;
}

.meta-item {
  background: #0a1622;
  border: 1px solid #152635;
  border-radius: 10px;
  padding: 10px 12px;
}

.meta-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #7f9aac;
  margin-bottom: 4px;
}

.meta-item span:last-child {
  font-weight: 700;
  color: #e6f0f6;
}

.server-links {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.server-link-btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: 10px;
  background: #0f1d2f;
  border: 1px solid #1c3348;
  color: #cfe6f3;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.server-link-btn:hover {
  border-color: #67c7ff;
}

.right-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#motd-box {
  background: #0f1a2a;
  border-left: 4px solid #4faee6;
}

#server-motd {
  white-space: pre-line;
  color: #dbe7ef;
}

.server-faq {
  margin-top: 20px;
}

.faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* thin line like left card */
  margin-bottom: 8px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Remove bottom border from the last item to avoid double line at end */
.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  padding: 12px 16px;
  font-weight: 700;
  color: #e6f0f6;
  position: relative;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 16px;
  font-weight: bold;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
  content: '-';
}

.faq-answer {
  max-height: 0;
  padding: 0 16px;
  background: #181c22;
  color: #dbe7ef;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
  padding: 12px 16px;
  max-height: 500px; /* large enough for text */
}

.server-faq a:hover {
  text-decoration: underline;
}

.server-faq a:visited {
  color: #4faee6;            /* stop purple visited color */
}

.hidden {
  display: none;
}

.checkbox-row a {
  color: #67c7ff;
  font-weight: 700;
  text-decoration: none;
}

.checkbox-row a:hover {
  text-decoration: underline;
}

/* Card title (server name) */
.server h3 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 1000;

  /* Light blue → white gradient */
  background: linear-gradient(180deg, #ffffff 0%, #b0dff8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;

  /* Subtle glow like hytale.com */
  text-shadow: 0 0 12px rgba(103, 199, 255, 0.15);

  /* Overlay on image */
  position: relative;  
  z-index: 3;           /* make sure it’s above the image */
  white-space: nowrap;  
  overflow: hidden;     /* clip anything that goes past container */
  text-overflow: ellipsis; /* show "..." for long names */
}

/* Gradient overlay on right side only */
.server-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgb(24, 28, 34) 0%,
    rgba(24, 28, 34, 0.85) 15%,
    rgba(24, 28, 34, 0.3) 35%,
    transparent 70%
  );
}

/* ===== Server page image ===== */
.server-detail-image {
  width: 100%;
  max-width: 450px;        /* ← or 360px, 500px — whatever feels right */
  max-height: 450px;           /* keep aspect ratio you like */
  margin: 24px auto 0;     /* centers it horizontally */
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.35);
  align-self: center;
  display: block;          /* remove inline spacing */
  zoom: 1;                 /* remove zoom */
}

.tag-box {
  display: inline-block;
  background-color: #4faee6;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  margin-right: 6px;
  margin-top: 4px;
  margin-bottom: 4px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

#versionTagCounter {
  margin-top: 4px;
  font-size: 0.85rem;
  color: #7f9aac;
  margin-left: 2px;
  flex: 0 0 auto;
}

#tag-counter {
  font-size: 0.85rem;
  color: #7f9aac;
  margin-left: 2px;
  flex: 0 0 auto;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

#modal-tags {
  flex: 1 0 150px; /* grow, don't shrink below usable size */
  min-height: 36px;
  height: auto;
  align-self: flex-start; /* 🔑 stops vertical shifting */
  resize: none;
  padding-right: 48px;
}

.tag-input-wrapper {
  position: inherit;
  align-items: center;
  justify-content: space-between;
  background: #0a1622;
  border: 1px solid #152635;
  border-radius: 6px;
  padding: 4px 8px;
  gap: 3px;
  min-height: 36px;
  position: relative;
  margin-bottom: 12px;
  padding-left: 12px;
}

.tag-input-wrapper #tag-counter {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none; /* optional */
}

.tag-input-wrapper input {
  flex: 1;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.95rem;
  outline: none;
  padding: 0;
  margin: 0;
  line-height: 32px;
}

.tag-input-wrapper #tag-counter {
  color: #7f9aac;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.server-info p {
  display: -webkit-box;         /* for line clamping */
  display: box;
  -webkit-line-clamp: 2;        /* limit to 2 lines */
  -webkit-box-orient: vertical; /* required for line clamp */
  line-clamp: 2;
  overflow: hidden;             /* hide anything past 2 lines */
  gap: 6px;
  line-height: 1.25;
  margin: 5px 0;
}

/* Tag colors */
.tag-box.survival {
  background-color: #28a745; /* green */
  border-color: #1f7a35;
}

.tag-box.pve {
  background-color: #e0af0d; /* teal */
  border-color: #bd8113;
}

.tag-box.pvp {
  background-color: #dc3545; /* red */
  border-color: #a72b35;
}

.tag-box.skyblock {
  background-color: #208be4; /* yellow */
  border-color: #193779;
}

.tag-box.mmo {
  background-color: #6f42c1; /* purple */
  border-color: #4e2e8c;
}

/* Status text at bottom right */
.status {
  position: absolute;
  bottom: 6px;
  right: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0,0,0,0.5);
  z-index: 2; /* make sure it’s on top of the card and image */
}

.status {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
}

.status-select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  background: #0a1622;
  color: white;
  border: 1px solid #152635;
  font-size: 14px;
}

.status-select option {
  background: #0a1622;
  color: white;
}

/* Server status badge – compact like tags */
#server-status.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: fit-content;
  flex: 0 0 auto;     /* 🔥 stops stretching */
  padding: 4px 10px;

  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Nunito Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  text-transform: uppercase;
  line-height: 1;
}

.status.online {
  background: #1f8f4c;
  color: #b8ffd9;
}

.status-badge.online {
  background: #1f8f4c; /* red */
  color: #ffffff;       /* light red text */
}

.status.offline {
  background: #db3030;
  color: #ffd1d1;
}

.status-badge.offline {
  background: #db3030; /* red */
  color: #ffd1d1;       /* light red text */
}

.status.soon {
  background: #8f6a1f;
  color: #ffe6b8;
}

/* Online / offline colors */
.status.online { background-color: #28a745; }  /* green */
.status.soon { background-color: #cf750d; }  /* green */
.status.offline { background-color: #dc3545; } /* red */

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateZ(10px); }
  to { opacity: 1; transform: translateZ(0); }
}

/* Tags (very subtle like hytale.com) */
.tag {
  display: inline-block;
  background: rgba(103, 199, 255, 0.08);
  color: #9ddcff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-right: 6px;
  margin-top: 6px;
  border: 1px solid rgba(103, 199, 255, 0.18);
}

body.modal-open .container,
body.modal-open .top-nav {
  filter: blur(8px);
  pointer-events: none;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 20, 40, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: #0f1d2f;
  border: 1px solid #1c3348;
  border-radius: 16px;
  padding: 24px;
  width: 100%;
  max-width: 420px;

  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 30px 80px rgba(0,0,0,0.9);

  position: relative;
}

.modal h2 {
  margin-top: 0;
  margin-bottom: 16px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: #cfe6f3;
  font-size: 1.5rem;
  cursor: pointer;
}

#modal-country {
  color: #7f9aac;
  background-color: #0a1622;
}

#modal-country option {
  color: #ffffff;
  background-color: #0a1622;
}

#modal-country:has(option:checked:not([value=""])) {
  color: #ffffff;
}

#modal-description {
  width: 100%;
  min-height: 100px;     /* taller */
  resize: vertical;     /* user can drag it bigger */
  font-family: inherit;
  line-height: 1.4;
}

#modal-submit {
  width: 100%;
  margin-top: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
  .server-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .server-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .server-grid {
    grid-template-columns: 1fr;
  }
}
