* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

:root {
  --primary-color: #ffffff;
  --secondary-color: #b0b0b0;
  --success-color: #cccccc;
  --light-color: #222222;
  --dark-color: #000000;
  --border-color: #333333;
  --card-bg: #1a1a1a;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  --transition: all 0.3s ease;
  --glass-bg: rgba(20, 20, 20, 0.9);
  --glass-border: rgba(255, 255, 255, 0.1);
  --focus-ring: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

body {
  background-color: var(--dark-color);
  color: var(--text-primary);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.02) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.01) 0%, transparent 50%);
  z-index: -1;
  pointer-events: none;
}

/* 可访问性改进：焦点样式 */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

.navbar {
  background-color: var(--glass-bg);
  color: white;
  padding: 0.75rem 0;
  position: sticky;
  top: 20px;
  z-index: 1000;
  backdrop-filter: blur(15px) saturate(180%);
  -webkit-backdrop-filter: blur(15px) saturate(180%);
  /* 后备方案 */
  background-color: rgba(20, 20, 20, 0.98);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  margin: 20px auto 0;
  width: calc(100% - 40px);
  max-width: 1180px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

/* 检查浏览器是否支持 backdrop-filter */
@supports (backdrop-filter: blur(15px)) or (-webkit-backdrop-filter: blur(15px)) {
  .navbar {
    background-color: var(--glass-bg);
  }
}

.navbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 20%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.2) 80%, 
    transparent 100%);
  border-radius: 16px 16px 0 0;
}

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

.navbar-brand {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 8px 0;
  position: relative;
  transition: var(--transition);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navbar-brand:hover::after,
.navbar-brand:focus::after {
  width: 100%;
}

.navbar-brand i {
  margin-right: 10px;
  font-size: 1.4rem;
  color: var(--primary-color);
  transition: var(--transition);
  flex-shrink: 0;
}

.navbar-brand:hover i,
.navbar-brand:focus i {
  transform: rotate(15deg);
}

.navbar-nav {
  display: flex;
  list-style: none;
  gap: 8px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nav-item {
  position: relative;
  flex-shrink: 0;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  padding: 10px 20px;
  border-radius: 12px;
  display: block;
  font-size: 0.95rem;
  background: transparent;
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.05), 
    transparent);
  transition: left 0.6s ease;
}

.nav-link:hover::before,
.nav-link:focus::before {
  left: 100%;
}

.nav-link:hover,
.nav-link:focus {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-link.active {
  color: white;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px 3px 0 0;
}

/* 合并相似样式 */
.back-button,
.nav-link.back-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}

.back-button {
  margin-bottom: 1.5rem;
  padding: 12px 24px;
}

.back-button::before,
.nav-link.back-nav::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent);
  transition: left 0.6s ease;
}

.back-button:hover::before,
.back-button:focus::before,
.nav-link.back-nav:hover::before,
.nav-link.back-nav:focus::before {
  left: 100%;
}

.back-button:hover,
.back-button:focus,
.nav-link.back-nav:hover,
.nav-link.back-nav:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  color: white;
}

.back-button i,
.nav-link.back-nav i {
  margin-right: 8px;
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.back-button:hover i,
.back-button:focus i,
.nav-link.back-nav:hover i,
.nav-link.back-nav:focus i {
  transform: translateX(-3px);
}

/* 移除重复的 .nav-link.back-nav.active::before 样式 */
.nav-link.back-nav.active::before {
  display: none;
}

.nav-link.back-nav.active {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
}

.main-content {
  flex: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 20px;
  width: 100%;
}

.page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--primary-color);
  border-radius: 2px;
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.page-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 400;
  word-break: break-word;
  overflow-wrap: break-word;
}

.images-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  margin-bottom: 3rem;
}

.image-block {
  width: 100%;
  background-color: var(--glass-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--glass-border);
  transition: var(--transition);
  position: relative;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  /* 后备方案 */
  background-color: rgba(20, 20, 20, 0.95);
}

@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
  .image-block {
    background-color: var(--glass-bg);
  }
}

.image-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 20%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.2) 80%, 
    transparent 100%);
}

.image-block:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.2);
}

.image-info {
  padding: 1.5rem;
  position: relative;
  z-index: 1;
}

.image-description {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: var(--transition);
  word-break: break-word;
  overflow-wrap: break-word;
}

.image-block:hover .image-description {
  color: white;
}

.image-date {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  transition: var(--transition);
  word-break: break-word;
}

.image-date i {
  margin-right: 6px;
  color: var(--primary-color);
  font-size: 0.85rem;
}

.image-block:hover .image-date {
  color: rgba(255, 255, 255, 0.8);
}

/* 图片自适应显示修复 */
.image-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
  background-color: var(--light-color);
  padding: 0;
  overflow: hidden;
}

.image-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
}

.image-wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 5px;
  transition: transform 0.5s ease;
  margin: 0 auto;
  /* 图片加载失败时的备用样式 */
  font-size: 14px;
  color: var(--text-secondary);
  background-color: var(--card-bg);
  padding: 20px;
}

/* 移除 !important 避免特异性问题 */
.image-wrapper img[style*="width"] {
  max-width: 100%;
  height: auto;
}

.image-block:hover .image-wrapper img {
  transform: scale(1.03);
}

.video-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
  background-color: var(--light-color);
  border-radius: 0 0 16px 16px;
}

.video-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.1) 50%, 
    transparent 100%);
}

.video-wrapper video {
  width: 100%;
  height: auto;
  display: block;
}

.footer {
  background-color: var(--glass-bg);
  color: white;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  /* 后备方案 */
  background-color: rgba(20, 20, 20, 0.98);
  position: relative;
  overflow: hidden;
}

@supports (backdrop-filter: blur(15px)) or (-webkit-backdrop-filter: blur(15px)) {
  .footer {
    background-color: var(--glass-bg);
  }
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255, 255, 255, 0.2) 20%, 
    rgba(255, 255, 255, 0.3) 50%, 
    rgba(255, 255, 255, 0.2) 80%, 
    transparent 100%);
}

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

.footer-column {
  flex: 1;
  min-width: 250px;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--transition);
}

.footer-column:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.footer-title {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: white;
  position: relative;
  padding-bottom: 0.75rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 3px;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
  position: relative;
  padding-left: 0;
  transition: var(--transition);
}

.footer-links li:hover {
  padding-left: 8px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  padding: 4px 0;
  border-radius: 6px;
  position: relative;
  word-break: break-word;
  overflow-wrap: break-word;
}

.footer-links li:hover a {
  color: white;
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 12px;
}

.footer-links a::before {
  content: '→';
  position: absolute;
  left: -15px;
  opacity: 0;
  transition: var(--transition);
  color: var(--primary-color);
}

.footer-links li:hover a::before {
  opacity: 1;
  left: -10px;
}

.copyright {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  width: 100%;
  word-break: break-word;
}

/* 打印样式 */
@media print {
  .navbar,
  .footer,
  .back-button {
    display: none;
  }
  
  body {
    background-color: white;
    color: black;
  }
  
  .image-block {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #ddd;
  }
  
  .page-title,
  .image-description {
    color: black;
  }
}

/* Firefox 滚动条样式 */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--dark-color);
}

/* Webkit 滚动条样式 */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--dark-color);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.9);
}

/* 响应式设计优化 */
@media (max-width: 1024px) {
  .image-block {
    max-width: 800px;
    margin: 0 auto;
  }
  
  .navbar-nav {
    gap: 6px;
  }
  
  .nav-link {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    top: 10px;
    margin: 10px auto 0;
    width: calc(100% - 20px);
    padding: 0.5rem 0;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  .navbar-container {
    padding: 0 16px;
  }
  
  .navbar-brand {
    font-size: 1.4rem;
    max-width: 150px;
  }
  
  .navbar-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  
  .nav-link {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  .page-title {
    font-size: 1.8rem;
  }
  
  .back-button {
    padding: 10px 18px;
    font-size: 0.9rem;
  }
  
  .footer-column {
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .navbar {
    border-radius: 10px;
  }
  
  .navbar-container {
    padding: 0 12px;
  }
  
  .navbar-brand {
    font-size: 1.2rem;
    max-width: 120px;
  }
  
  .navbar-brand i {
    font-size: 1.2rem;
    margin-right: 6px;
  }
  
  .navbar-nav {
    gap: 4px;
  }
  
  .nav-link {
    padding: 6px 8px;
    font-size: 0.85rem;
  }
  
  .page-title {
    font-size: 1.5rem;
  }
  
  .page-subtitle {
    font-size: 1rem;
  }
  
  .back-button {
    padding: 8px 14px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }
  
  .footer-container {
    flex-direction: column;
  }
  
  .footer-column {
    min-width: 100%;
  }
}

/* 性能优化：减少动画和效果在低性能设备上 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .navbar:hover,
  .image-block:hover,
  .nav-link:hover,
  .back-button:hover,
  .footer-column:hover {
    transform: none !important;
  }
  
  .image-wrapper img {
    transition: none !important;
  }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
  :root {
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --border-color: #555555;
  }
  
  .nav-link {
    border-width: 2px;
  }
  
  .back-button {
    border-width: 2px;
  }
}