@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap");

html {
  background: #000;
}

body {
  font-family: "Montserrat", sans-serif;
  margin: 0;
  padding: 25px;
  background: linear-gradient(135deg, #ffcc80 0%, #ff8a65 40%, #fb3f06 100%);
  color: #3e2723;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

body > * {
  max-width: 1360px;
  width: 100%;
  z-index: 10;
}

img {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  object-fit: cover;
}

h1 {
  text-align: center;
  color: #fff;
  font-weight: 700;
  margin-bottom: 30px;
  font-size: 4vw;
  white-space: nowrap;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 25px;
  padding: 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  align-items: center;
  color: #fff;
}

.controls label {
  font-weight: 600;
  color: #fff;
}

select {
  padding: 10px 15px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background-color: white;
  font-size: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  min-width: 150px;
}

select:focus {
  border-color: #ff9800;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.3);
}

.alphabet-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  flex-basis: 100%;
}

.alphabet-button {
  background: rgba(255, 255, 255, 0.4);
  color: #3e2723;
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: background-color 0.2s, transform 0.1s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.alphabet-button:hover:not(.active) {
  background-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
}

.alphabet-button.active {
  background-color: #ff9800;
  color: white;
  font-weight: 600;
  box-shadow: 0 0 10px #ff9800;
  border-color: #e68900;
}

.dictionary-container {
  overflow-x: hidden;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 5px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

th,
td {
  padding: 6px 9px;
  text-align: left;
  border: none;
}

thead th {
  background-color: rgba(62, 39, 35, 0.8);
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
  cursor: pointer;
}

tbody tr {
  background-color: rgba(255, 255, 255, 0.6);
  transition: background-color 0.3s, box-shadow 0.3s;
  border-radius: 8px;
}

tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.4);
}

tbody tr:hover {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: inset 4px 0 0 0 red;
}

@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .dictionary-container {
    overflow: auto;
  }

  .alphabet-filter {
    justify-content: space-around;
    gap: 5px;
  }

  th,
  td {
    padding: 5px;
  }
}
