@import url("https://fonts.googleapis.com/css2?family=Orbitron:wght@900&family=Share+Tech+Mono&display=swap");

body {
  text-align: center;
  background-color: #0f0c29;
  color: #fff;
  margin: 0;
  padding: 20px;
}

.flag-header {
  font-family: "Orbitron", monospace;
  font-size: 58px;
  font-weight: 900;
  letter-spacing: 20px;
  text-transform: uppercase;
  color: transparent;
  display: inline-block;
  position: relative;
}

/* Wave animation */
@keyframes flagwave {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(var(--amp));
  }
}
.wave-char {
  display: inline-block;
  animation: flagwave 4s ease-in-out infinite;
  background: linear-gradient(90deg, #4285f4, #9c27b0);
  -webkit-background-clip: text;
  background-clip: text;
}

.flag-sub {
  font-family: "Share Tech Mono", monospace;
  font-size: 18px;
  letter-spacing: 4px;
  color: rgba(200, 240, 220, 1);
  margin-top: 1px;
  text-transform: uppercase;
}

/* Filter box */
.filters {
  display: flex;
  justify-content: center; /* horizontal aligment */
  align-items: center; /* vertical alignment */
  gap: 15px;
  margin-bottom: 20px;
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  position: relative;
}

.filter-label {
  position: absolute;
  top: 10px;
  left: 15px;
  font-size: 12px;
  color: rgba(255, 255, 255, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Flag Section */
#flags-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  /* max-width: 1200px; */
  max-width: 90%;
  margin: 0 auto;
}

.flag-card,
.letter-header {
  height: 120px;
  min-height: 0;
  background: rgba(20, 20, 40, 0.8);
  border-radius: 8px;
  padding: 10px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(100, 100, 200, 0.3);
}

.flag-card:hover {
  transform: translateY(-5px);
  background: rgba(40, 40, 80, 0.8);
}

.flag-card img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin-bottom: 8px;
}

.flag-card p {
  margin: 0;
  font-family: "Share Tech Mono", monospace;
  font-size: 12px;
  text-align: center;
}

.letter-header {
  background: rgba(40, 40, 60, 0.8);
  font-size: 40px;
  font-weight: bold;
  text-shadow: 0 0 5px rgba(100, 100, 255, 0.7);
}

/* Overview mode styles */
.overview-mode #flags-container {
  grid-template-columns: repeat(
    auto-fill,
    minmax(80px, 1fr)
  ); /* More columns */
  gap: 8px; /* Smaller gaps */
}

.overview-mode .flag-card {
  height: 80px; /* Smaller height */
  padding: 4px; /* Less padding */
}

.overview-mode .flag-card img {
  max-height: 60px; /* Smaller flags */
  margin-bottom: 0; /* Remove margin */
}

.overview-mode .letter-header {
  height: 80px; /* Match card height */
  font-size: 24px; /* Smaller font */
}

/* Style for the toggle button and search-bar */
#toggle-mode,
#toggle-names,
#search-bar {
  padding: 8px 16px;
  background: #4285f4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 10px;
  margin-top: 10px;
  align-items: center;
}

#toggle-mode:hover,
#toggle-names:hover {
  background: #3367d6;
}

::placeholder {
  color: white;
}
