.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  height: 60px;
  background-color: #333;
  background-image: linear-gradient(135deg, #333 0%, #555 100%);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 1000;
  transition: all 0.3s ease;
}

/* 下拉菜单样式 */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  padding: 0 10px;
}

.dropdown-menu {
  display: none;
  position: relative;
  width: 100%;
  background-color: #333;
  padding: 10px 0;
}

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

@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  
  .topbar {
    position: relative;
    padding: 10px; 
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    height: auto;
  }
  
  .topbar-title {
    height: 60px;
    line-height: 60px;
  }

  .dropdown-menu {
    width: 100%;
    order: 3;
    margin-top: 10px;
  }
  
  .topbar-links {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }
  
  .topbar-link {
    margin: 0;
    padding: 5px 0;
  }
}

.topbar:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

.topbar-title {
  color: #fff;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin: 0;
  transition: transform 0.3s ease;
}

.topbar-title:hover {
  transform: scale(1.02);
}

@media (min-width: 769px) {
  .topbar-title {
    margin-left: 10px;
  }
  .dropdown-menu {
    display: flex;
    width: auto;
    background-color: transparent;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
  }
}

/* 添加导航链接样式 */
.topbar-links {
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.topbar-links li a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
}

.topbar-links li a:hover {
  color: #fff;
}

.topbar-links li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #fff;
  transition: width 0.3s ease;
}

.topbar-links li a:hover::after {
  width: 100%;
  font-size: 24px;
  font-weight: bold;
  color: #fff;
}

.topbar-links {
  font-size: 16px;
  color: #fff;
}

.topbar-link {
  margin-left: 5px;
  color: #fff;
  text-decoration: none;
}

/* Universal reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden;
}

.topbar-link {
  transition: color 0.5s ease;
}

.topbar-link:hover {
  color: #cccccc;
}

/* Hero Image Styles */
.hero {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  margin: 0 !important;
  padding: 0 !important;
}

.hero img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  z-index: -1;
  display: block;
  margin: 0 !important;
}

/* Mobile styles */
@media (max-width: 768px) {
  .hero {
    height: 100vh;
  }

  .hero img {
    width: auto;
    height: 100%;
    object-fit: cover;
    object-position: center;
    animation: slowPan 20s linear infinite;
    z-index: -1;
    display: block;
    margin: 0 !important;
  }

  .hero-intro {
    padding-left: 20px;
    padding-right: 20px;
  }
}


@keyframes slowPan {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(calc(-100% + 100vw));
  }
  100% {
    transform: translateX(0);
  }
}

/* Page Container Styles */
.page-container {
  max-width: 1200px;
  margin: 100px auto 50px;
  padding: 0 20px;
}

.page-title {
  color: #333;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2.5rem;
  color: #444;
  text-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.page-description {
  color: #666;
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

/* Gallery Page Styles */
.gallery-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 2.5rem;
}

.category-btn {
  background-color: #f5f5f5;
  border: none;
  border-radius: 20px;
  padding: 0.6rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #555;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.category-btn:hover, .category-btn.active {
  background-color: #555;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.gallery-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 1rem;
  font-size: 0.95rem;
  color: #444;
  text-align: center;
  background-color: white;
}

/* Photo Viewer Modal */
.photo-viewer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 20px;
}

.photo-large {
  max-width: 90%;
  max-height: 80vh;
  border: 5px solid white;
  border-radius: 5px;
}

.photo-caption {
  position: absolute;
  bottom: 30px;
  color: white;
  font-size: 1.2rem;
  text-align: center;
  max-width: 80%;
}

.photo-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: transform 0.2s ease;
}

.photo-close:hover {
  transform: scale(1.1);
}

/* Teachers Page Styles */
.teacher-featured {
  margin-bottom: 3rem;
}

.teacher-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
  transition: transform 0.3s ease;
}

.teacher-card:hover {
  transform: translateY(-3px);
}

.teacher-card.featured {
  display: flex;
  max-width: 900px;
  margin: 0 auto 3rem;
}

.teacher-photo-container-featured {
  width: 200px;
  flex-shrink: 0;
  height: 300px;
}

.teacher-photo-container {
  width: auto;
  flex-shrink: 0;
  height: 300px;
}

@media (max-width: 768px) {
  .teacher-photo-container-featured {
    width: 100%;
    height: 250px;
  }
  
  .teacher-card.featured {
    flex-direction: column;
    align-items: center;
  }

}

.teacher-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
}

.teacher-info {
  padding: 2rem;
}

.teacher-name {
  color: #333;
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.teacher-subject {
  color: #666;
  font-size: 1rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.teacher-quote {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #444;
  padding: 1rem;
  background-color: #f9f9f9;
  border-radius: 8px;
  position: relative;
}

.teacher-quote::before {
  content: '"';
  font-size: 3rem;
  color: #ddd;
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: Georgia, serif;
}

.teachers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* Classmates Page Styles */
.classmates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
}

.classmate-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

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

.classmate-avatar-container {
  width: 100px;
  height: 100px;
  margin: 40px auto 10px;
  position: relative;
  border-radius: 50%;
  border: 3px solid #fff;

}

.classmate-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid #fff;
  object-fit: cover;
  object-position: 50% top;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transform: scale(1.5);
}

.classmate-info {
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
}

.classmate-name {
  color: #333;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.classmate-message {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #555;
  padding: 0 10px 15px;
  border-bottom: 1px solid #eee;
  margin-bottom: 15px;
}

.classmate-signature {
  font-size: 0.85rem;
  color: #888;
  font-style: italic;
}

/* Story Page Styles */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 2rem auto;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: #eee;
  border-radius: 2px;
}

.timeline-year {
  font-size: 1.8rem;
  font-weight: bold;
  color: #333;
  margin: 2.5rem 0 1.5rem -30px;
  position: relative;
}

.timeline-year::before {
  content: '';
  position: absolute;
  left: -38px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: #555;
}

.timeline-event {
  position: relative;
  margin-bottom: 2.5rem;
}

.timeline-date {
  position: absolute;
  left: -30px;
  top: 0;
  transform: translateX(-100%);
  font-weight: bold;
  color: #666;
  text-align: right;
  min-width: 80px;
}

.timeline-content {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.07);
}

.timeline-title {
  margin-top: 0;
  color: #333;
  margin-bottom: 1rem;
}

.timeline-photos {
  margin-bottom: 1rem;
}

.timeline-img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.timeline-description {
  line-height: 1.7;
  color: #555;
}

/* About Page Styles */
.about-section {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.section-title {
  color: #333;
  margin-top: 0;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid #f5f5f5;
}

.info-card {
  background-color: #f9f9f9;
  padding: 1.5rem;
  border-radius: 8px;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.info-list li {
  padding: 0.8rem 0;
  border-bottom: 1px dashed #eee;
  color: #555;
}

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

.teachers-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.teachers-column {
  flex: 1;
  min-width: 250px;
}

.teachers-column p {
  padding: 0.6rem 0;
  margin: 0;
  color: #555;
  border-bottom: 1px dashed #eee;
}

.students-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.students-column {
  flex: 1;
  min-width: 150px;
}

.students-column p {
  padding: 0.4rem 0;
  margin: 0;
  color: #555;
}

.website-info p {
  margin: 0 0 1rem;
  color: #555;
}

.thanks-card {
  background-color: #f9f9f9;
  padding: 1.8rem;
  border-radius: 8px;
}

.thanks-list {
  padding-left: 20px;
  margin-bottom: 1.5rem;
}

.thanks-list li {
  padding: 0.5rem 0;
  color: #555;
}

.thanks-ending {
  font-style: italic;
  color: #666;
  text-align: center;
  margin-top: 1.5rem;
}

/* Hero Section Overlay Styles */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0,0,0,0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0;
}

.hero-title {
  color: white;
  font-size: 3rem;
  margin-bottom: 1.8rem;
  text-shadow: 0 3px 10px rgba(0,0,0,0.3);
}

.hero-subtitle {
  color: white;
  font-size: 1.5rem;
  margin-bottom: 2.2rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-intro {
  color: white;
  max-width: 700px;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2.8rem;
  text-shadow: 0 1px 5px rgba(0,0,0,0.2);
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.8rem;
}

.btn-primary, .btn-secondary {
  padding: 0.8rem 2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background-color: #555;
  color: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.btn-primary:hover {
  background-color: #333;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.25);
}

.btn-secondary {
  background-color: white;
  color: #555;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
  background-color: #f5f5f5;
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

/* Footer Styles */
.footer {
  width: 100%;
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
  line-height: 1.6;
}

/* Homepage footer (light gray) */
.homepage .footer {
  color: #aaa;
}

/* Other pages footer (dark gray) */
.standard-page .footer {
  color: #555;
}

.footer a {
  color: inherit;
  text-decoration: none;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
  .teacher-card.featured {
    flex-direction: column;
  }
  
  .teacher-photo-container {
    width: 100%;
    height: 250px;
  }
  
  .timeline {
    padding-left: 20px;
  }
  
  .timeline-year {
    margin-left: -20px;
  }
  
  .timeline-date {
    position: relative;
    transform: none;
    text-align: left;
    margin-bottom: 0.5rem;
    min-width: auto;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.2rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .topbar-title {
    font-size: 1.2rem;
  }
  
  .topbar-links {
    gap: 1rem;
  }
  
  .topbar-links li a {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .page-title {
    font-size: 1.8rem;
  }
  
  .gallery-grid, .teachers-grid, .classmates-grid {
    grid-template-columns: 1fr;
  }
  
  .about-section {
    padding: 1.5rem 1rem;
  }
  
  .hero-overlay {
    justify-content: flex-start;
    padding-top: 100px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }

  .hero img {
    animation: slowPan 40s linear infinite;
  }
  
  .timeline-content {
    padding: 1rem;
  }
  
  .topbar {
    padding: 0 1rem;
  }
  
  .topbar-title {
    font-size: 1rem;
  }
  
  .topbar-links {
    gap: 0.5rem;
  }
  
  .topbar-links li a {
    font-size: 0.8rem;
  }
}
