/* 基本样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f7f9fc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.content {
  flex: 1;
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* 页脚样式 */
.footer {
  background-color: #f1f2f6;
  padding: 20px 0;
  border-top: 1px solid #e1e4e8;
  margin-top: 40px;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer p {
  margin: 10px 0;
  color: #576574;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #2e86de;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    margin-top: 10px;
    justify-content: center;
  }
}

/* 导航栏样式 - 添加到已有的CSS文件中 */
.navigator {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  height: 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo a {
  font-size: 24px;
  font-weight: bold;
  color: #2e86de;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-logo a:hover {
  color: #54a0ff;
}

.nav-links {
  display: flex;
  gap: 30px;
}

.nav-links a {
  color: #576574;
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
  position: relative;
}

.nav-links a:hover {
  color: #2e86de;
}

.nav-links a.active {
  color: #2e86de;
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: #2e86de;
  border-radius: 2px;
}

.nav-auth .btn-login {
  background-color: #2e86de;
  color: white;
  border: none;
  border-radius: 5px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.nav-auth .btn-login:hover {
  background-color: #54a0ff;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 15px 20px;
    gap: 15px;
  }

  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-auth {
    margin-top: 10px;
  }
}

/* Labs 页面样式 - 添加到已有的CSS文件中 */
.labs-page {
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.labs-header {
  text-align: center;
  margin-bottom: 30px;
}

.labs-header h1 {
  font-size: 36px;
  color: #2e86de;
  margin-bottom: 10px;
}

.tagline {
  font-size: 18px;
  color: #576574;
  opacity: 0.8;
}

.search-filter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 20px;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
  max-width: 600px;
  margin: 0 auto;
  margin-bottom: 40px;
}

.search-box input {
  width: 100%;
  padding: 12px 20px;
  border-radius: 30px;
  border: none;
  background: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  font-size: 16px;
  color: #576574;
}

.search-box input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(46, 134, 222, 0.2);
}

.filter-group {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  background: white;
  border: none;
  border-radius: 20px;
  color: #576574;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.filter-btn.active {
  background: #2e86de;
  color: white;
}

.subject-filter .filter-btn[data-subject="math"].active {
  background: #2e86de;
}

.subject-filter .filter-btn[data-subject="physics"].active {
  background: #8c7ae6;
}

.grade-filter .filter-btn.active {
  background: #ff9f43;
}

.labs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.no-results {
  text-align: center;
  padding: 50px 0;
  color: #a4b0be;
  font-size: 18px;
}

/* Lab 卡片样式 */
.lab-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
}

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

.lab-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.lab-content {
  padding: 20px;
}

.lab-title {
  font-size: 18px;
  color: #2e86de;
  margin-bottom: 10px;
}

.lab-desc {
  font-size: 14px;
  color: #576574;
  margin-bottom: 15px;
  height: 60px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.lab-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.lab-tag {
  background: rgba(46, 134, 222, 0.1);
  color: #2e86de;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.lab-tag.physics {
  background: rgba(140, 122, 230, 0.1);
  color: #8c7ae6;
}

.lab-tag.grade {
  background: rgba(255, 159, 67, 0.1);
  color: #ff9f43;
}

.lab-difficulty {
  display: flex;
  gap: 3px;
}

.difficulty-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dfe6e9;
}

.difficulty-dot.active {
  background: #ff9f43;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .search-filter {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    justify-content: center;
  }

  .labs-header h1 {
    font-size: 28px;
  }

  .tagline {
    font-size: 16px;
  }
}

/* 下拉菜单样式 */
.dropdown-menu {
  position: relative;
  display: inline-block;
}

.dropdown-arrow {
  display: inline-block;
  font-size: 12px;
  margin-left: 3px;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-radius: 5px;
  z-index: 1000;
  padding: 5px 0;
  margin-top: 5px;
}

.dropdown-content.show {
  display: block;
}

.dropdown-content a {
  color: #576574;
  padding: 10px 15px;
  display: block;
  text-decoration: none;
  border-radius: 0;
}

.dropdown-content a:hover {
  background-color: #f7f9fc;
}

.dropdown-content a.active {
  color: #2e86de;
  background-color: rgba(46, 134, 222, 0.05);
}

.dropdown-content a.active::after {
  display: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .dropdown-content {
    position: static;
    box-shadow: none;
    border: 1px solid #e1e4e8;
    margin-top: 5px;
    margin-bottom: 5px;
    width: 100%;
  }
}