/* projects.css - 独立样式，不引用 index.css */
a {
  text-decoration: none;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-image: url("../imgs/bg.png");
  background-position: center 0; 
  background-repeat: no-repeat; 
  background-attachment: fixed;
  background-size: cover;
  display: flex;
  flex-direction: column;
}

/* 导航栏样式 - 从 index.css 复制过来但移除冲突部分 */
.bar {
  position: fixed;
  width: 100%;
  height: 9%;
  background-image: linear-gradient(rgba(255, 255, 255, 0.5));
  backdrop-filter: blur(10px);
  z-index: 1000;
}

.bar-team {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  margin-left: 5%;
  width: 90%;
}

.bar-team-icon {
  height: 7vh;
  width: auto;
  max-width: 100%;
  margin-right: 1em;
  object-fit: contain;
}

.bar-team-name {
  display: flex;
  align-items: center;
  margin: 0;
  font-size: 25px;
  color: white;
  font-weight: bold;
}

.bar-menu {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 5%;
  display: flex;
  align-items: center;
  gap: 2em;
}

.home {
  position: relative;
  color: #ffffff;
  font-size: 1.18em;
  margin: 0;
  transform: color 0.3s ease-in-out;
}

.home::after {
  position: absolute;
  content: "";
  background-color: #f2c3fc;
  left: 0;
  width: 100%;
  height: 2px;
  bottom: -0.5em;
  transform: scaleX(0);
  transition: transform 0.3s ease-in-out;  
}

.home:hover {
  color: #f1cbf9;
}

.home:hover::after {
  transform: scaleX(1);  
}

.projects-container {
  position: relative;
}

.projects {
  position: relative;
  color: #ffffff;
  font-size: 1.18em;
  margin: 0;
  transform: color 0.3s ease-in-out;
  display: block;
  padding: 10px 0;
}

.projects::after {
  content: ">";
  position: absolute;
  right: -1.0em;
  top: 50%;
  transform: translateY(-50%) rotate(90deg);
  transition: transform 0.3s ease-in-out;
}

.projects:hover {
  color: #f1cbf9;
}

.projects:hover::after {
  transform: translateY(-50%) rotate(-90deg);
}

.project-list {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 15px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  list-style-type: none;
  padding: 10px 0;
  margin: 0;
  width: 30vh;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.projects-container:hover .project-list {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-list li {
  padding: 12px 20px;
  color: #000000;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.project-list li:hover {
  background-color: rgba(255, 255, 255, 0.5);
}

.project-list li a {
  color: inherit;
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* 页脚样式 */
.footer {
  position: relative;
  bottom: 0;
  width: 100%;
  height: 10vh;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  margin-top: auto;
}

/* 项目页面特有样式 */
.projects-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 100px 20px 60px;
  box-sizing: border-box;
  width: 100%;
}

.projects-container-glass {
  width: 90%;
  max-width: 1200px;
  height: 75vh;
  background-color: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  overflow: hidden;
}

.projects-list {
  width: 300px;
  background-color: rgba(255, 255, 255, 0.5);
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.projects-list-title {
  margin-top: 0;
  margin-bottom: 20px;
  color: #333;
  font-size: 1.5em;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project-item {
  display: flex;
  align-items: center;
  padding: 15px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 0.5);
}

.project-item:hover {
  background-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.project-item.active {
  background-color: rgba(241, 203, 249, 0.3);
  border-left: 4px solid #f1cbf9;
}

.project-icon {
  width: 50px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
}

.project-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-info h3 {
  margin: 0 0 5px 0;
  font-size: 1.1em;
  color: #333;
}

.project-info p {
  margin: 0;
  font-size: 0.9em;
  color: #666;
}

.project-details {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
}

.project-detail {
  display: none;
}

.project-detail.active {
  display: block;
  animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.project-header h2 {
  margin: 0;
  color: #333;
  font-size: 2em;
}

.project-links {
  display: flex;
  gap: 15px;
}

.github-link, .download-link {
  display: flex;
  align-items: center;
  padding: 8px 15px;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.github-link {
  background-color: #333;
  color: white;
}

.github-link:hover {
  background-color: #555;
}

.download-link {
  background-color: #f1cbf9;
  color: #333;
}

.download-link:hover {
  background-color: #e6b3f0;
}

.github-link img {
  width: 20px;
  height: 20px;
  margin-right: 8px;
}

.project-content {
  display: flex;
  gap: 30px;
}

.project-image {
  flex: 1;
  max-width: 500px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.project-image img {
  width: 100%;
  height: auto;
  display: block;
}

.project-description {
  flex: 1;
}

.project-description h3 {
  color: #333;
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 1.3em;
}

.project-description p {
  line-height: 1.6;
  color: #555;
  margin-bottom: 20px;
}

.project-description ul {
  padding-left: 20px;
  margin-bottom: 20px;
}

.project-description li {
  margin-bottom: 8px;
  color: #555;
  line-height: 1.5;
}

.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tech-tag {
  background-color: #f1cbf9;
  color: #333;
  padding: 5px 10px;
  border-radius: 15px;
  font-size: 0.9em;
}

.stay-tuned {
  font-style: italic;
  color: #888;
  text-align: center;
  margin-top: 30px;
}

/* 响应式设计 */
@media (max-width: 992px) {
  .project-content {
    flex-direction: column;
  }
  
  .project-image {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .projects-container-glass {
    flex-direction: column;
    height: auto;
    min-height: 80vh;
  }
  
  .projects-list {
    width: 100%;
    max-height: 200px;
    border-right: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  }
  
  .project-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .project-links {
    align-self: flex-end;
  }
}

@media (max-width: 576px) {
  .projects-main {
    padding: 80px 10px 40px;
  }
  
  .projects-container-glass {
    width: 95%;
  }
  
  .project-links {
    flex-direction: column;
    width: 100%;
    align-self: center;
  }
  
  .github-link, .download-link {
    justify-content: center;
  }
}