/* /css/rank.css */
/* ---------------------------------------------------
   Responsive Grid + Header Search Enhancements
   for Albatross Index
   --------------------------------------------------- */

/* === Header Search Bar (wider, centered) === */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 2rem;
  border-bottom: 1px solid #e0e0e0;
}

.site-brand {
  flex: 1;
  min-width: 180px;
}

.nav {
  flex: 1;
  text-align: center;
}

.nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 1.25rem;
}

.nav a {
  text-decoration: none;
  color: inherit;
  font-weight: 500;
}

.nav a:hover {
  text-decoration: underline;
}

/* Search bar inside header */
.search-bar {
  flex: 1;
  max-width: 480px;
  display: flex;
  justify-content: flex-end;
}

.search-bar input[type="search"] {
  width: 100%;
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s ease;
}

.search-bar input[type="search"]:focus {
  border-color: #0070f3;
}

/* Theme toggle button (🌓) */
.theme-toggle {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  margin-left: 0.75rem;
}

/* === Leaderboards Grid === */
.leaderboards.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.75rem;
  justify-items: stretch;
  padding: 2rem;
}

.board {
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 1.5rem;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.board:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.board-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

.board-list {
  text-align: left;
}

/* === Headlines within boards === */
.headline {
  display: block;
  margin-bottom: 0.5rem;
  text-decoration: none;
  color: #000;
}

.headline:hover {
  text-decoration: underline;
}

.meta {
  color: #555;
  font-size: 0.9rem;
}

.chip {
  display: inline-block;
  background: #f5f5f5;
  border-radius: 5px;
  padding: 0.1rem 0.4rem;
  font-size: 0.8rem;
  color: #333;
  margin-left: 0.4rem;
}

/* === Responsive Grid Breakpoints === */

/* Large desktop (3×2) */
@media (min-width: 900px) {
  .leaderboards.grid-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

/* Medium desktop/tablet (2×3) */
@media (min-width: 600px) and (max-width: 899px) {
  .leaderboards.grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .search-bar {
    max-width: 420px;
  }
}

/* Mobile (1×6) */
@media (max-width: 599px) {
  .leaderboards.grid-container {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.25rem;
  }

  .site-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .search-bar {
    width: 100%;
    max-width: 90%;
    justify-content: center;
  }
}
