:root {
  /* 蓝色系变量 */
  --primary: #2962ff;
  --primary-variant: #0039cb;
  --secondary: #00b0ff;
  --secondary-variant: #0091ea;
  --background: #f5f7ff;
  --surface: #ffffff;
  --error: #ff5252;
  --on-primary: #ffffff;
  --on-secondary: #000000;
  --on-background: #000000;
  --on-surface: #000000;
  --on-error: #ffffff;
  --shadow-color: rgba(41, 98, 255, 0.2);
  --card-radius: 16px;
  --element-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 暗色模式变量 - 默认不启用 */
  --dark-primary: #2962ff;
  --dark-primary-variant: #768fff;
  --dark-secondary: #00e5ff;
  --dark-secondary-variant: #00b8d4;
  --dark-background: #121826;
  --dark-surface: #1e293b;
  --dark-on-primary: #ffffff;
  --dark-on-secondary: #000000;
  --dark-on-background: #e2e8f0;
  --dark-on-surface: #e2e8f0;
  --dark-shadow-color: rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Roboto', sans-serif;
}

body {
  background-color: var(--background);
  color: var(--on-background);
  min-height: 100vh;
  padding-bottom: 60px;
  transition: background-color 0.5s ease, color 0.5s ease;
}

body.dark-mode {
  --primary: var(--dark-primary);
  --primary-variant: var(--dark-primary-variant);
  --secondary: var(--dark-secondary);
  --secondary-variant: var(--dark-secondary-variant);
  --background: var(--dark-background);
  --surface: var(--dark-surface);
  --on-primary: var(--dark-on-primary);
  --on-secondary: var(--dark-on-secondary);
  --on-background: var(--dark-on-background);
  --on-surface: var(--dark-on-surface);
  --shadow-color: var(--dark-shadow-color);
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s;
}

/* 标题区域 */
#title {
  background: linear-gradient(135deg, var(--primary), var(--primary-variant));
  color: var(--on-primary);
  text-align: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 6px var(--shadow-color);
  z-index: 10;
}

#title h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.subtitle {
  font-size: 1.2rem;
  font-weight: 300;
  opacity: 0.9;
}

/* 暗色模式切换按钮 */
.theme-toggle {
  position: absolute;
  top: 40px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: var(--transition);
  backdrop-filter: blur(4px);
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(30deg);
}

.theme-toggle i {
  color: white;
  font-size: 24px;
}

/* 几何形状装饰 */
.geometric-shapes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

.shape {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  animation: float 15s infinite ease-in-out;
}

.shape:nth-child(1) {
  width: 200px;
  height: 200px;
  background: var(--secondary);
  top: -50px;
  left: -50px;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 150px;
  height: 150px;
  background: var(--secondary-variant);
  bottom: 20px;
  right: 100px;
  animation-delay: 3s;
}

.shape:nth-child(3) {
  width: 100px;
  height: 100px;
  background: var(--primary-variant);
  top: 100px;
  right: 50px;
  animation-delay: 6s;
}

.shape:nth-child(4) {
  width: 80px;
  height: 80px;
  background: var(--on-primary);
  bottom: 80px;
  left: 30%;
  animation-delay: 9s;
}

/* 导航栏 */
.slider-navigation {
  background-color: var(--surface);
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px var(--shadow-color);
  border-radius: 0 0 var(--element-radius) var(--element-radius);
}

.nav-container {
  display: flex;
  justify-content: space-around;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.nav-item {
  padding: 16px 12px;
  text-align: center;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: var(--transition);
  color: var(--on-surface);
  opacity: 0.7;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--element-radius);
  overflow: hidden;
}

.nav-item.active {
  color: var(--primary);
  opacity: 1;
}

.nav-item i {
  font-size: 24px;
  margin-bottom: 4px;
  transition: var(--transition);
}

.nav-item span {
  font-size: 12px;
  font-weight: 500;
  transition: var(--transition);
}

.slider-bar {
  position: absolute;
  top: -2px;
  height: 4px;
  background-color: var(--primary);
  border-radius: 2px;
  transition: var(--transition);
  z-index: 0;
}

/* 内容区域 */
.content-container {
  max-width: 1200px;
  margin: 24px auto;
  padding: 0 16px;
}

.content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.content.active {
  display: block;
}

.section-title {
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  color: var(--on-background);
}

.home-list {
  list-style: none;
  margin-top: 30px;
}

.home-list li {
  display: flex;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 15px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.05),
    0 1px 2px rgba(0, 0, 0, 0.07);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  cursor: pointer;
  border-left: 4px solid var(--primary);
}

.home-list li:hover {
  box-shadow:
    0 7px 14px rgba(0, 0, 0, 0.08),
    0 3px 6px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-variant);
}

.home-list li .material-icons {
  margin-right: 15px;
  background: #fff;
  color: var(--primary);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.home-list li span {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--on-background);
}

/* 卡片布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 24px;
}

.card {
  background-color: var(--surface);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
  cursor: pointer;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 16px var(--shadow-color);
}

.card.member:hover {
  transform: translateY(-4px);
}

.card-image {
  height: 160px;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  position: relative;
  overflow: hidden;
}

.card-content {
  padding: 16px;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--on-surface);
}

.card p {
  color: var(--on-surface);
  opacity: 0.7;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* 成员卡片 */
.member-card {
  display: flex;
  padding: 16px;
  align-items: center;
  position: relative;
}

.member-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;
  margin-right: 16px;
}

.member-avatar img {
  width: 95%;
  height: 95%;
  border-radius: 50%;
  object-fit: cover;
}

.member-info {
  flex: 1;
}

.member-name {
  font-weight: 500;
  margin-bottom: 4px;
  color: var(--on-surface);
}

.member-role {
  font-size: 0.9rem;
  color: var(--on-surface);
  opacity: 0.7;
}

.dropdown-arrow {
  position: absolute;
  right: 16px;
  transition: transform 0.3s ease;
  color: var(--on-surface);
  opacity: 0.7;
}

.member-details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.3s ease;
  background: rgba(0, 0, 0, 0.03);
  color: var(--on-surface);
}

.member-card.expanded + .member-details {
  max-height: 500px; /* 根据内容调整 */
  padding: 16px;
}

.member-card.expanded .dropdown-arrow {
  transform: rotate(180deg);
}

.detail-item {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.detail-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.detail-item strong {
  display: block;
  margin-bottom: 8px;
  color: var(--primary);
}

.detail-item ul {
  padding-left: 20px;
  margin: 8px 0;
}

.detail-item li {
  margin-bottom: 6px;
}

.detail-item a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.3s;
}

.detail-item a:hover {
  color: var(--secondary-variant);
  text-decoration: underline;
}

/* 暗色模式适配 */
body.dark-mode .member-details {
  background: rgba(255, 255, 255, 0.05);
}

body.dark-mode .detail-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 公告样式 */
.announcement-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.announcement {
  background-color: var(--surface);
  border-radius: var(--element-radius);
  padding: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.announcement:hover {
  box-shadow: 0 4px 8px var(--shadow-color);
}

.announcement-date {
  font-size: 0.8rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.announcement-title {
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--on-surface);
}

.announcement-content {
  color: var(--on-surface);
  opacity: 0.8;
  font-size: 0.9rem;
}

/* 返回顶部按钮 - 优化为Material Design规范 */
.fab {
  position: fixed !important;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 10px 0 rgba(0, 0, 0, 0.14), 
              0 1px 18px 0 rgba(0, 0, 0, 0.12), 
              0 3px 5px -1px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  z-index: 999;
  pointer-events: none;
}

.fab.visible {
  opacity: 1;
  transform: translateY(0) scale(1); /* 显示状态 */
  pointer-events: auto; /* 显示时启用交互 */
}

/* 添加悬停动画 */
.fab:hover {
  background-color: var(--primary-variant);
  box-shadow: 0 6px 12px var(--shadow-color);
  transform: scale(1.1); /* 悬停时轻微放大 */
}

/* 添加点击动画 */
.fab:active {
  transform: scale(0.95); /* 点击时轻微缩小 */
  box-shadow: 0 2px 4px var(--shadow-color);
}

/* 添加波纹效果容器 */
.fab .ripple-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}

/* 波纹效果 */
.fab .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple 0.6s linear;
}

/* 添加图标动画 */
.fab i {
  transition: transform 0.3s ease;
}

.fab:hover i {
  transform: translateY(-3px); /* 悬停时图标上移 */
}

/* 波纹效果 */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  transform: scale(0);
  animation: ripple 0.6s linear;
}

/* 动画 */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  
  50% {
    transform: translateY(-20px) rotate(10deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  #title h1 {
    font-size: 2.2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .nav-item span {
    font-size: 10px;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-item i {
    font-size: 20px;
  }
  
  .nav-item span {
    display: none;
  }
}

/* 作品卡片详情按钮 */
.card-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
}

.detail-button {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.detail-button:hover {
  background: var(--primary-variant);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

/* 项目状态条 */
.project-status {
  background: rgba(0, 0, 0, 0.05);
  padding: 8px 16px;
  position: relative;
}

body.dark-mode .project-status {
  background: rgba(255, 255, 255, 0.05);
}

.status-bar {
  height: 6px;
  border-radius: 3px;
  margin-bottom: 4px;
  transition: width 0.5s ease;
}

.status-text {
  font-size: 0.8rem;
  color: var(--on-surface);
  opacity: 0.8;
}

/* 置顶公告 */
.announcement.sticky {
  border-left: 4px solid var(--primary);
  background: rgba(41, 98, 255, 0.05);
  box-shadow: 0 0 0 1px rgba(41, 98, 255, 0.1);
}

body.dark-mode .announcement.sticky {
  background: rgba(41, 98, 255, 0.1);
}

.sticky-badge {
  background: var(--primary);
  color: var(--on-primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 8px;
}

.announcement-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

/* 项目卡片图片容器 */
#project .card-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 项目卡片实际图片 */
#project .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
}

/* 图片加载失败时的回退背景 */
#project .card-image .image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary-variant));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 图片加载失败时显示回退背景 */
#project .card-image.image-failed img {
  opacity: 0;
}

#project .card-image.image-failed .image-fallback {
  opacity: 1;
}

/* 回退背景中的图标 */
#project .card-image .image-fallback::before {
  content: 'rocket_launch'; /* 使用项目相关图标 */
  font-family: 'Material Icons';
  font-size: 48px;
  color: rgba(255, 255, 255, 0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 项目状态条位置调整 */
#project .project-status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  backdrop-filter: blur(4px);
  z-index: 3; /* 确保在回退背景之上 */
}

body.dark-mode #project .project-status {
  background: rgba(0, 0, 0, 0.7);
}

#project .status-text {
  color: white;
  font-size: 0.9rem;
}

/* 悬停效果 */
#project .card:hover .card-image img {
  transform: scale(1.05);
}

#project .card .card-image img {
  transition: transform 0.5s ease;
}

/* 项目卡片内容区域 */
#project .card-content {
  padding: 20px;
  position: relative;
  z-index: 2;
  background: var(--surface);
}

#project .card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--on-surface);
}

#project .card p {
  color: var(--on-surface);
  opacity: 0.8;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 暗色模式适配 */
body.dark-mode #project .card-image .image-fallback::before {
  color: rgba(0, 0, 0, 0.2);
}

/* 作品卡片图片容器 */
.card-image {
  height: 180px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 作品卡片实际图片 */
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
  position: relative;
  z-index: 2;
}

/* 图片加载失败时的回退背景 */
.card-image .image-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary-variant));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* 图片加载失败时显示回退背景 */
.card-image.image-failed img {
  opacity: 0;
}

.card-image.image-failed .image-fallback {
  opacity: 1;
}

/* 回退背景中的图标 */
.card-image .image-fallback::before {
  content: 'image';
  font-family: 'Material Icons';
  font-size: 48px;
  color: rgba(255, 255, 255, 0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 悬停效果 */
.card:hover .card-image img {
  transform: scale(1.05);
}

.card .card-image img {
  transition: transform 0.5s ease;
}

/* 作品卡片内容区域 */
#opus .card-content {
  padding: 20px;
}

#opus .card h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--on-surface);
}

#opus .card p {
  color: var(--on-surface);
  opacity: 0.8;
  font-size: 0.95rem;
  line-height: 1.6;
  min-height: 60px;
}

/* 暗色模式适配 */
body.dark-mode .card-image .image-fallback::before {
  color: rgba(0, 0, 0, 0.2);
}

/* 在styles.css中添加渲染按钮和Toast样式 */
.render-button {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}

.render-button:hover {
  background: var(--primary-variant);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px var(--shadow-color);
}

.render-button i {
  font-size: 18px;
}

/* Toast提示样式 */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--surface);
  color: var(--on-surface);
  padding: 12px 24px;
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* 抖动动画 */
@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-4px); }
  100% { transform: translateX(0); }
}

.shake {
  animation: shake 180ms ease;
}

/* 警告Toast样式 */
.toast-warning {
  background: #ff9800;
  color: white;
}

/* 视频预览容器 */
.video-preview {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* 视频元素 */
.video-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

/* 播放图标 */
.play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.play-icon i {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease;
}

/* 视频链接 */
.video-link {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: white;
  z-index: 2;
}

.video-link i {
  font-size: 60px;
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  margin-bottom: 10px;
  transition: transform 0.3s ease;
}

.video-link span {
  font-size: 1rem;
  font-weight: 500;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* 视频回退背景 */
.video-fallback {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--secondary-variant));
  z-index: 1;
}

/* 悬停效果 */
.card:hover .play-icon i,
.card:hover .video-link i {
  transform: scale(1.1);
  color: rgba(255, 255, 255, 1);
}

.card:hover .video-preview video {
  transform: scale(1.05);
}

/* 暗色模式适配 */
body.dark-mode .play-icon i,
body.dark-mode .video-link i {
  color: rgba(255, 255, 255, 0.9);
}