* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

header {
  text-align: center;
  padding: 40px 0;
  margin-bottom: 30px;
}

h1 {
  font-size: 2.8rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.2rem;
  color: #666;
  max-width: 600px;
  margin: 0 auto;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.portfolio-item {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.portfolio-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.portfolio-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

.portfolio-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-item:hover .portfolio-image img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(106, 17, 203, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.view-icon {
  color: white;
  font-size: 2rem;
}

.portfolio-content {
  padding: 25px;
}

.portfolio-title {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #2c3e50;
}

.portfolio-description {
  color: #666;
  margin-bottom: 15px;
}

.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag {
  background: #eef2ff;
  color: #4f6df5;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

/* 详情弹出层样式 */
.detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal-content {
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 1100px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
  animation: modalFadeIn 0.4s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 25px;
  color: #666;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s;
  background: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding-bottom: 7px;
  padding-left: 1px;
}

.close-modal:hover {
  color: #ff6b6b;
}

.modal-header {
  padding: 30px 30px 20px;
  border-bottom: 1px solid #eee;
}

.modal-title {
  display: inline-block;
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 10px;
}

.modal-address {
  font-size: 18px;
}

.modal-subtitle {
  color: #666;
  /* font-size: 1.1rem; */
  font-size: 17px;
}

.modal-body {
  padding: 20px 30px 30px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 30px;
}

@media (max-width: 768px) {
  .modal-body {
    grid-template-columns: 1fr;
  }
}

.project-info {
  display: flex;
  flex-direction: column;
  gap: 25px;
  grid-column: 1 / span 2;
}

.info-section h3 {
  color: #3498db;
  margin-bottom: 10px;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-section h3 i {
  font-size: 1.1rem;
}

.info-section p,
.info-section ul {
  color: #555;
  line-height: 1.7;
}

.info-section ul {
  padding-left: 20px;
}

.info-section li {
  margin-bottom: 8px;
  position: relative;
}

.info-section li:before {
  content: "•";
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: -15px;
}

.feature-name {
  font-weight: bold;
}

.feature-desc {
  font-size: 14px;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.tech-tag {
  background: #3498db;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.project-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gallery-main {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-main img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  /* cursor: pointer; */
  cursor: nesw-resize;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-thumb {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s, transform 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.gallery-thumb:hover,
.gallery-thumb.active {
  opacity: 1;
  transform: scale(1.05);
}

.gallery-thumb img {
  width: 100%;
  height: 70px;
  object-fit: cover;
  display: block;
}

footer {
  text-align: center;
  margin-top: 60px;
  padding: 20px;
  color: #666;
  border-top: 1px solid #ddd;
}

/* 幻灯片样式 */
.slideshow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.slideshow {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.slide {
  display: none;
  text-align: center;
}

.slide.active {
  display: block;
}

.slide img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
}

.slide-caption {
  color: white;
  margin-top: 20px;
  font-size: 1.2rem;
}

.close-slideshow {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  transition: color 0.3s;
}

.close-slideshow:hover {
  color: #ff6b6b;
}

.slideshow-nav {
  position: absolute;
  top: 50%;
  width: 100%;
  /* display: flex; */
  display: none;
  justify-content: space-between;
  transform: translateY(-50%);
  padding: 0 20px;
}

.slideshow:hover .slideshow-nav {
  display: flex;
}

.nav-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgb(221, 221, 221, 0.8);
}

.nav-btn:hover {
  /* background: rgba(255, 255, 255, 0.4); */
  background-color: rgb(221, 221, 221, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.2rem;
  }

  .modal-body {
    grid-template-columns: 1fr;
  }

  .gallery-thumbs {
    grid-template-columns: repeat(2, 1fr);
  }
}
