/* ==========================
   Global Styles (Join Page)
========================== */
body.join-page {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #000;
  color: #fff;
}

/* Header (matches Profile page) */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #111;
  flex-wrap: wrap;
  border-bottom: none !important;
}

.site-header .logo a {
  color: #8FD400;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.3rem;
}

.site-header nav a,
.site-header nav button {
  color: #fff;
  background: transparent;
  border: none;
  margin-left: 15px;
  text-decoration: none;
  position: relative;
  font-weight: 500;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
}

/* Hover underline glow like Profile */
.site-header nav a::after,
.site-header nav button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: #8FD400;
  box-shadow: 0 0 6px #8FD400;
  transition: width 0.3s ease-in-out, left 0.3s ease-in-out;
}
.site-header nav a:hover::after,
.site-header nav a.active::after,
.site-header nav button:hover::after {
  width: 70%;
  left: 15%;
}

/* Sign Out identical to nav buttons */
#signout-btn {
  background: transparent !important;
  border: none !important;
  color: #fff !important;
  font: inherit !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  cursor: pointer;
  position: relative;
  padding: 0 !important;
  margin-left: 15px !important;
  text-decoration: none;
}

/* Main content */
.content {
  padding: 20px;
  max-width: 1000px;
  margin: auto;
}

h2 {
  color: #8FD400;
  text-align: center;
}

/* Game cards */
.games-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.game-card {
  border: 1px solid #8FD400;
  border-radius: 8px;
  padding: 15px;
  background: #111;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.game-card h3 {
  margin: 0 0 8px;
  color: #8FD400;
}

/* Card info + actions */
.card-info {
  flex: 1 1 55%;
}

.card-actions {
  margin-top: 10px;
}

.card-actions a {
  margin-right: 10px;
  color: #fff;
  text-decoration: none;
}

.card-actions a.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.card-actions .btn {
  background: #8FD400;
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-top: 6px;
}

.card-actions .btn:hover {
  background: #a6ff00;
}

/* Mini map */
.mini-map {
  flex: 1 1 40%;
  margin-top: 10px;
  border-radius: 6px;
  border: none;
  min-height: 180px;
}

/* Pagination */
.pagination {
  text-align: center;
  margin-top: 20px;
}

.pagination button {
  background: #8FD400;
  border: none;
  padding: 6px 14px;
  margin: 0 5px;
  border-radius: 6px;
  cursor: pointer;
}

.pagination button:disabled {
  background: #333;
  color: #777;
  cursor: not-allowed;
}

/* Mobile fix: white pagination text */
@media (max-width: 600px) {
  .pagination button {
    color: #fff !important;
  }
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.8);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-overlay.show {
  display: flex;
}

.modal {
  background: #111;
  border: 1px solid #8FD400;
  border-radius: 8px;
  padding: 20px;
  width: 90%;
  max-width: 600px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-header h3 {
  margin: 0;
  color: #8FD400;
}

.close-btn {
  background: #8FD400;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
}

/* Players Grid */
.players-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.players-grid .hdr {
  font-weight: bold;
  margin-bottom: 5px;
}

.players-grid .row {
  padding: 4px 0;
  border-bottom: 1px solid #333;
}

/* ⭐ Star color set to gold */
.players-grid .row.rating {
  color: #FFD700 !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .logo { margin-bottom: 8px; }
  nav {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .game-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .mini-map {
    width: 100%;
    margin-top: 15px;
    min-height: 200px;
  }
  .card-actions .btn {
    width: auto;
    font-size: 13px;
    display: block;
  }
}



/* --- Join indicator stack --- */
body.join-page #page-indicator{
  display:flex; flex-direction:column; align-items:center; line-height:1.2;
  margin:.4rem 0 .6rem;
}
body.join-page #join-count-badge{ color:#fff; font-weight:800; font-size:.9rem; margin-bottom:2px; }
body.join-page #join-page-label{ color:#fff; font-weight:800; font-size:.95rem; letter-spacing:.2px; }

/* --- Join filters match Gambetas --- */
body.join-page .join-filters select,
body.join-page #gambetas-filters select{
  background:#0b0b0b; color:#fff; border:1px solid #8FD400; border-radius:8px;
  padding:10px 12px; font-size:.95rem; min-width:200px; line-height:1.2;
  box-shadow:0 0 0 1px rgba(143,212,0,.15), inset 0 0 12px rgba(143,212,0,.05);
}
body.join-page #gambetas-filters{ display:flex; flex-wrap:wrap; gap:10px 14px; justify-content:center; align-items:center; margin:6px auto 14px; }
body.join-page #clear-gambetas-filters{ background:#fff; color:#000; border:1px solid #8FD40033; border-radius:8px; padding:10px 14px; font-weight:700; }


/* === Join mobile-only size refine (match Gambetas) === */
@media (max-width: 768px){
  body.join-page #gambetas-filters select{
    height:48px;
    padding:10px 14px;
    font-size:1.00rem;
    border-radius:14px;
  }
  body.join-page #clear-gambetas-filters{
    width:60%;
    max-width:240px;
    height:48px;
    font-size:1.00rem;
    border-radius:14px;
  }
}


/* === Mobile center alignment (requested) === */
@media (max-width: 768px){
  body.join-page #gambetas-filters{
    display:flex;
    flex-direction:column;
    align-items:center;         /* center children */
    justify-content:center;
    gap:12px;
    width:100%;
    max-width:560px;
    margin:8px auto 16px;       /* center container */
    padding:0 12px;
  }
  body.join-page #gambetas-filters select{
    width:90%;
    height:48px;
    padding:10px 14px;
    font-size:1rem;
    border-radius:14px;
    margin:0 auto;              /* center each select */
  }
  body.join-page #clear-gambetas-filters{
    display:block;
    width:60%;
    max-width:240px;
    height:48px;
    margin:6px auto 0;          /* centered button */
    border-radius:14px;
    font-weight:800;
    font-size:1rem;
    text-align:center;
  }
}
