/* Reset some browser defaults for consistency */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(135deg, #f7f7fa 0%, #e3e9f7 100%);
  color: #222;
  font-family: 'Segoe UI', Arial, sans-serif;
  min-height: 100vh;
  line-height: 1.6;
}

header {
  background: linear-gradient(90deg, #4a67a1 70%, #6d89cf 100%);
  color: #fff;
  padding: 2.5rem 1rem 2rem 1rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(74,103,161,0.17);
  border-bottom-left-radius: 32px;
  border-bottom-right-radius: 32px;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 8px rgba(74,103,161,0.16);
}

header p {
  font-size: 1.15rem;
  margin-top: 0.6rem;
  opacity: 0.85;
}

main {
  max-width: 700px;
  margin: 2.5rem auto 2.5rem auto;
  background: #fff;
  border-radius: 18px;
  padding: 2.25rem;
  box-shadow: 0 4px 32px rgba(74,103,161,0.10);
  border: 1px solid #e3e9f7;
}

h2 {
  color: #4a67a1;
  font-size: 1.55rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.search-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
}

.search-bar input {
  width: 70%;
  padding: 0.85rem 1.2rem;
  border: 1.5px solid #c8d6ef;
  border-radius: 8px;
  font-size: 1.08rem;
  transition: border-color 0.2s;
  background: #f7f7fa;
}

.search-bar input:focus {
  outline: none;
  border-color: #4a67a1;
  background: #eef2fa;
}

.search-bar button {
  padding: 0.85rem 1.5rem;
  background: linear-gradient(90deg, #4a67a1 80%, #6d89cf 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1.08rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(74,103,161,0.12);
  transition: background 0.18s, transform 0.15s;
}

.search-bar button:hover {
  background: linear-gradient(90deg, #375387 80%, #6d89cf 100%);
  transform: translateY(-2px) scale(1.03);
}

.dictionary-entry {
  margin-bottom: 2rem;
  padding: 1.5rem 1.2rem;
  border-radius: 10px;
  background: #f7f7fa;
  box-shadow: 0 2px 12px rgba(74,103,161,0.03);
  border-bottom: 2.5px solid #e3e9f7;
  transition: box-shadow 0.18s;
}

.dictionary-entry:hover {
  box-shadow: 0 6px 24px rgba(74,103,161,0.13);
  background: #eef2fa;
}

.dictionary-entry h2 {
  margin-bottom: 0.4rem;
  color: #33518c;
}

.dictionary-entry .word-type {
  font-style: italic;
  color: #6d89cf;
  font-size: 1.03rem;
  margin-bottom: 0.5rem;
  display: block;
}

.dictionary-entry .definition {
  margin-bottom: 0.6rem;
}

.dictionary-entry .example {
  color: #444;
  font-size: 1rem;
  margin-top: 0.5rem;
  background: #e3e9f7;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-style: italic;
  opacity: 0.86;
}

@media (max-width: 800px) {
  main {
    padding: 1.2rem;
    border-radius: 12px;
  }
  .search-bar input {
    width: 100%;
    min-width: 180px;
  }
  .dictionary-entry {
    padding: 1rem 0.5rem;
  }
}

@media (max-width: 530px) {
  header {
    padding: 1.5rem 0.5rem 1.2rem 0.5rem;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
  }
  main {
    padding: 0.5rem;
    border-radius: 8px;
  }
  .search-bar {
    flex-direction: column;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }
  .search-bar input, .search-bar button {
    width: 100%;
    font-size: 1rem;
  }
}
