/* Reset and basic styles */
html, body, header, main, footer, div, span, p, a, img, form, input, button, select {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  color: inherit;
  vertical-align: baseline;
}

body {
  line-height: 1.6;
  font-family: 'Open Sans', sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

* {
  box-sizing: border-box;
  background-repeat: no-repeat;
}

a {
  text-decoration: none;
  color: #011e41;
}

li {
  list-style: none;
}

i, em {
  font-style: normal;
}

/*分页*/
.pager {text-align: center; margin: 20px 0;}
.pager ul {display: flex; flex-wrap: wrap; justify-content: center}
.pager ul li {display: inline-block;}
.pager ul li a {padding: 5px 15px; border: #dddddd solid 1px; margin-left: -1px; display: inline-block;}
.pager ul li a:hover {border-color: #70c4f3; background-color: #70c4f3; color: #333}
.pager ul .active a {border: #3ea8e2 solid 1px; display: inline-block; background-color: #3ea8e2; color: #fff;}
.pager ul a:not([href]):not([class]):hover {border: #dddddd solid 1px; background-color: #fff}
.pager ul .active a:hover {color: #fff; border: #3ea8e2 solid 1px !important; background-color: #3ea8e2 !important}

/* Wrapper */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media all and (min-width: 768px) {
  .container {
    padding: 0 2rem;
  }
}

/* Header */
header {
  background-color: #011e41;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.header-logo {
  font-size: 2rem;
  font-weight: bold;
  color: #fff;
  text-align: center;
  margin: 0;
}

.search-form {
  display: flex;
  width: 65%;
  max-width: 100%;
  background-color: #fff;
  border-radius: 25px;
  overflow: hidden;
}

.search-form input[type="text"] {
  flex: 2;
  border: none;
  padding: 0.5rem 1rem;
  min-width: 50px;
}

.search-form button {
  background-color: #ff6b6b;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.search-form button:hover {
  background-color: #ff4c4c;
}

.search-form button .icon-sousuo {
  color: #fff;
  font-size: 25px;
  font-weight: 700;
}

/* Footer */
footer {
  background-color: #011e41;
  color: #fff;
  padding: 1rem 0;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Main Content */
.content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

/* Page Description */
.page-description {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-description h2 {
  font-size: 24px;
  margin-bottom: 10px;
  color: #011e41;
}

.page-description p {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

/* Word and Pronunciation */
.word-pronunciation {
  display: flex;
  flex-wrap: wrap; /* 允许内容换行 */
  align-items: center;
  gap: 20px;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.word-pronunciation .word-title {
  font-size: 32px;
  margin: 0;
  font-family: 'Merriweather', serif;
  color: #011e41;
  white-space: nowrap; /* 默认不换行 */
  overflow: hidden; /* 超出部分隐藏 */
  text-overflow: ellipsis; /* 超出部分显示省略号 */
  max-width: 100%; /* 限制最大宽度 */
}

.pronunciation {
  display: flex;
  gap: 20px;
  font-size: 18px;
  flex-wrap: wrap; /* 允许内容换行 */
}

.pronunciation span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap; /* 默认不换行 */
}

/* Flag and Sound Icons */
.flag-icon, .sound-icon {
  width: 20px;
  height: 20px;
}

.flag-icon svg, .sound-icon svg {
  width: 100%;
  height: 100%;
}

/* Section Titles */
.section-title {
  font-size: 18px;
  margin-bottom: 10px;
  font-family: 'Merriweather', serif;
  color: #011e41;
  padding: 10px;
  border-radius: 5px;
  font-weight: bold;
}

/* Rows */
.row {
  display: flex;
  gap: 20px;
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.row > div {
  flex: 1;
}

.row p, .row ul {
  font-size: 16px;
  color: #555;
  margin-top: 10px;
}

.row ul {
  list-style-type: disc;
  padding-left: 20px;
}

/* Etymology */
.etymology {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.etymology p {
  font-size: 16px;
  color: #555;
  margin-top: 10px;
}

/* Examples */
.examples {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.examples ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

.examples li {
  font-size: 16px;
  color: #555;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
}

.examples li:last-child {
  border-bottom: none;
}

/* Vocabulary Lists Prompt */
.vocabulary-lists-prompt {
  text-align: center;
  margin: 2rem 0 1rem 0;
}

.vocabulary-lists-prompt .section-title {
  font-size: 24px;
  font-family: 'Merriweather', serif;
  color: #011e41;
  margin-bottom: 10px;
  position: relative;
  display: inline-block;
}

.vocabulary-lists-prompt .section-title::after {
  content: '';
  display: block;
  width: 50px;
  height: 2px;
  background-color: #011e41;
  margin: 10px auto 0;
}

/* Content Grid */
.content-grid ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  padding: 2rem 0;
  list-style: none;
  margin: 0;
}

.content-grid li {
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
  height: 70px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.content-grid li a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  text-align: center;
  color: #011e41;
  font-size: 1.25rem;
  text-decoration: none;
  word-break: break-word; /* 确保长单词可以换行 */
  white-space: normal; /* 允许文本换行 */
  padding: 0.5rem; /* 增加内边距，避免文字贴边 */
}

@media all and (min-width: 768px) {
  .content-grid li {
    height: 120px;
  }
}

.content-grid li:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
  .row {
    flex-direction: column;
  }

  .content-grid li:nth-child(n+7) {
    display: none;
  }

  .content-grid li a {
    font-size: 1rem; /* 在移动端减小字体大小 */
  }

  /* Word and Pronunciation 在移动端的调整 */
  .word-pronunciation .word-title {
    white-space: normal; /* 允许换行 */
    text-overflow: clip; /* 去掉省略号 */
    word-break: break-word; /* 确保长单词可以换行 */
  }

  .pronunciation {
    flex-direction: column; /* 一行一个 */
    gap: 10px;
  }
}

/* 介绍部分 */
.intro-section {
  text-align: center;
  padding: 4rem 0;
  background-color: #011e41;
  color: #fff;
}

.intro-section h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.intro-section p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
}

/* 特色功能 */
.featured-features {
  padding: 4rem 0;
  background-color: #fff;
}

.featured-features h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #011e41;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.feature-card i {
  font-size: 3rem;
  color: #011e41;
  margin-bottom: 1rem;
}

.feature-card .feature-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #011e41;
  font-weight: bold;
}

.feature-card p {
  font-size: 1rem;
  color: #555;
}

/* 学习技巧 */
.learning-tips {
  padding: 4rem 0;
  background-color: #fff;
}

.learning-tips h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #011e41;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.tip-card {
  text-align: center;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-card i {
  font-size: 3rem;
  color: #011e41;
  margin-bottom: 1rem;
}

.tip-card .tip-title {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #011e41;
  font-weight: bold;
}

.tip-card p {
  font-size: 1rem;
  color: #555;
}