@import url('https://fonts.googleapis.com/css2?family=Brygada+1918:ital,wght@0,400..700;1,400..700&display=swap');

@font-face {
  font-family: 'CMU Sans Serif';
  src: url('CMU Sans Serif.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

html {
  overflow-y: scroll;
}

body {
  font-family: "Brygada 1918", serif;
  background: #fff;
  padding: 30px;
  color: #333;
  font-size: 17px;
}

.container {
  max-width: 850px;
  margin: auto;
  padding: 50px;
}

.hidden {
  display: none !important;
}

h1 {
  font-size: 32px;
  margin-bottom: 50px;
  text-align: center;
}

h1 a {
  text-decoration: none;
  color: inherit;
}

.part-of-speech {
  font-style: italic;
  font-weight: normal;
  text-transform: lowercase;
  color: #28a745;
}

.pronunciation {
  font-family: "CMU Sans Serif", sans-serif;
  color: #666;
}

.etymology-text,
.entry-examples,
.entry-sources {
  color: #666;
}

form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 20px;
}

form button {
  align-self: flex-start;
  width: auto;
}

input,
select,
textarea {
  width: 100%;
  padding: 10px 15px;
  font-family: inherit;
  font-size: inherit;
  border: 1px solid #333;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

textarea {
  resize: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 6px rgba(0, 123, 255, 0.2);
}

.definition,
.examples,
#source {
  min-height: 100px;
}

#source {
  margin-bottom: 5px;
}

#searchInput {
  margin-bottom: 15px;
}

#addMeaningBtn {
  margin-top: -20px;
}

button {
  font-family: inherit;
  font-size: inherit;
  padding: 10px 15px;
  background: none;
  color: inherit;
  border: 1px solid #333;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button a {
  text-decoration: none;
  color: inherit;
}

.button-group {
  display: flex;
  gap: 20px;
  margin: 50px 0 30px;
}

.entry-margin-top {
  margin-top: 20px;
}

.entry-margin-top button:not(:last-child) {
  margin-right: 10px;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  border: 1px solid #333;
  padding: 24px;
  border-radius: 6px;
  margin-bottom: 20px;
  background: #fff;
}

.entry-header {
  cursor: pointer;
  font-weight: 700;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.entry-article {
  margin-top: 10px;
}

.entry-definition,
.entry-etymology {
  margin: 20px 0;
  line-height: 1.6;
}

.entry-examples {
  margin: 10px 10px 10px 20px;
}

.entry-sources {
  margin-top: 10px;
}

.entry-sources li,
.entry-translations li {
  border: none;
  padding: 4px 0;
}

.entry-translations {
  margin-top: 10px;
}

.entry-translations li {
  margin-top: 20px;
  margin-left: 20px;
}

.meaning-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid #333;
  border-radius: 6px;
  margin-bottom: 20px;
  background: #fff;
}

#pageInput {
  width: 60px;
  padding: 8px 10px;
  margin: 0 10px;
  border: 1px solid #333;
  border-radius: 6px;
  text-align: center;
  font-family: inherit;
  font-size: inherit;
  background: #fff;
  -moz-appearance: textfield;
  -webkit-appearance: none;
  appearance: none;
}

#pageInput::-webkit-inner-spin-button,
#pageInput::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

#paginationControls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 30px 0;
}

#paginationControls button {
  padding: 8px 14px;
}

#pageInfo {
  margin: 0 10px 0 0;
}

footer {
  text-align: center;
  padding: 10px 0;
  margin-top: 50px;
}

footer a {
  color: inherit;
  text-decoration: none;
}

.loading-message {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  font-style: italic;
  font-size: 18px;
  text-align: center;
  margin-top: 50px;
}

@media (max-width: 768px) {
  .container {
    padding: 0;
  }

  h1 {
    font-size: 28px;
  }

  #paginationControls button::after {
    content: attr(data-short);
    display: block;
  }

  #paginationControls button span {
    display: none;
  }
}