/* Base reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Page shell */
body {
  font-family: system-ui, sans-serif;
  max-width: 650px;
  margin: auto;
  padding: 2rem;
}

h1 {
  margin-bottom: 1rem;
}

#stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #666;
}

#db-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.2rem;
}

.db-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

.db-status-dot-up {
  background: #0a8f3c;
}

.db-status-dot-down {
  background: #c62828;
}

.db-status-text {
  font-size: 0.85rem;
  line-height: 1;
  color: #444;
  text-transform: lowercase;
}

.top-home-link {
  display: inline-block;
  color: #111;
  text-decoration: underline;
}

.top-home-links {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.6rem;
}

.search-controls {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.6rem 0 1rem;
}

input {
  padding: 0.5rem;
  width: 70%;
}

button {
  padding: 0.5rem;
  margin-left: 0.3rem;
}

.search-controls button {
  margin-left: 0;
}

/* Search results list */
ul {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}

li {
  padding: 0.75rem;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
}

/* Preview modal */
#lyrics-preview-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
}

#lyrics-preview-modal > div {
  background: white;
  max-width: 600px;
  margin: 5% auto;
  padding: 1rem;
}

/* Preview text area */
pre {
  max-height: 300px;
  overflow: auto;
}

/* Modal hidden state controlled by JS via hidden attribute */
#lyrics-preview-modal[hidden] {
  display: none;
}

@media (max-width: 700px) {
  .search-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-controls input {
    width: 100%;
  }

  pre {
    max-height: 55vh;
  }
}
