:root {
  --bg-color: #ffffff;
  --primary-text-color: #111111;
  --secondary-text-color: #666666;
  --border-color: #e5e5e5;
  --accent-color: #007bff;
  --input-bg-color: #f9f9f9;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-color);
  color: var(--primary-text-color);
}

.top-bar {
  display: flex;
  justify-content: center; /* Center search bar */
  align-items: center;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: var(--bg-color);
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo {
  font-size: 1.5rem;
  font-weight: 600;
  position: absolute; /* Position logo independently */
  left: 2rem;
}

.search-wrapper {
  position: relative;
  width: 320px;
}
.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary-text-color);
  width: 18px;
  height: 18px;
}

#search-input {
  padding: 0.65rem 1rem 0.65rem 2.5rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  width: 100%;
  box-sizing: border-box;
}

.select-wrapper {
  position: relative;
}

#block-select {
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  cursor: pointer;
  background-color: var(--input-bg-color);
  font-family: inherit; /* Use sans-serif font */
}

.select-wrapper::after {
  content: "▾";
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--secondary-text-color);
}

#content-container {
  padding: 0 2rem;
  min-height: calc(100vh - 165px);
}

.content-controls {
  display: flex;
  justify-content: center; /* Center the items */
  align-items: center;
  margin: 2rem 0;
  gap: 1.5rem; /* Add space between items */
}

.copy-instruction {
  color: var(--secondary-text-color);
  font-size: 1rem;
  margin: 0;
}

#symbol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
  gap: 1rem;
  min-height: 300px;
}

.symbol-item {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  aspect-ratio: 1 / 1;
  font-size: 2.25rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  user-select: none;
}
.symbol-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}
.symbol-item.non-printable {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-text-color);
  line-height: 1.2;
  padding: 4px;
  text-align: center;
}

#pagination-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-bottom: 2rem;
}
.page-link {
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  color: var(--primary-text-color);
  transition: background-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.page-link:hover {
  background-color: #f0f0f0;
}
.page-link.active {
  background-color: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  font-weight: 600;
}
.page-link.ellipsis {
  border: none;
  background: none;
  cursor: default;
}
.page-link.disabled {
  color: #cccccc;
  cursor: not-allowed;
  background-color: #f9f9f9;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #28a745;
  color: white;
  padding: 1rem 2rem;
  border-radius: 8px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s, visibility 0.5s;
}
.toast.show {
  opacity: 1;
  visibility: visible;
}

footer {
  text-align: center;
  padding: 1rem 2rem;
  border-top: 1px solid var(--border-color);
}
.disclaimer-section {
  max-width: 800px;
  margin: 0.5rem auto 0;
  text-align: left;
  font-size: 0.75rem;
  color: var(--secondary-text-color);
  line-height: 1.4;
}
.disclaimer-section h3 {
  margin-bottom: 0.25rem;
}
.disclaimer-section p {
  margin: 0 0 0.25rem;
}
