.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 2rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.popup::-webkit-scrollbar {
  display: none;
}

.popup h2 {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
  color: #ddd;
  text-align: center;
  font-weight: 600;
}

.popup.show {
  opacity: 1;
}

.popup-content {
  border: 1px solid #333333;
  background-color: #232323;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 12px;
  max-width: 900px;
  position: relative;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transform: translateY(-20px);
  opacity: 0;
  transition: all 0.3s ease;
  color: #ccc;
}

.popup.show .popup-content {
  transform: translateY(0);
  opacity: 1;
}

.popup-image {
  margin-bottom: 1.5rem;
  text-align: center;
}

.popup-image img {
  max-width: 100%;
  max-height: 350px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.popup-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.popup-details h3 {
  font-size: 2.3rem;
  margin: 0 0 0.5rem 0;
  font-weight: 600;
}

.popup-details p {
  margin: 0;
  line-height: 1.6;
  font-size: 1.15rem;
}

.popup-technologies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  list-style: none;
}

.popup-technologies li {
  background: #8b5cf6;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  transition: 0.3s ease;
  color: #ddd;
}

.popup-technologies li:hover {
  background: #7b4ce6;
  color: #fff;
  cursor: default;
}

.popup-links {
  display: flex;
  gap: 1rem;
  margin: 0;
  justify-content: center;
}

.neutron-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  justify-content: center;
}

.popup-button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: #8b5cf6;
  color: #ddd;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
  text-align: center;
  min-width: 200px;
  font-size: 1.05rem;
  cursor: pointer;
}

.popup-button:hover {
  background-color: #7b4ce6;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(149, 124, 179, 0.2);
  color: #fff;
}

.popup-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.close-popup {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 24px;
  cursor: pointer;
  color: #999;
  transition: color 0.3s ease;
}

.close-popup:hover {
  color: #ccc;
}

/* Demo Projects */
.demo-projects {
  margin: 0.75rem 0 0 0;
  display: grid;
  gap: 1.75rem;
  padding: 1.5rem;
  border-radius: 12px;
}

.demo-project {
  background: #2e2e2e;
  border: 1px solid #404040;
  padding: 2rem;
  border-radius: 12px;
  transition: all 0.3s ease;
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  align-items: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.demo-project:hover {
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.demo-project-image {
  width: 100%;
  height: 180px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.demo-project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.demo-project-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 600px;
}

.demo-project h4 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
  line-height: 1.3;
}

.demo-project p {
  color: #bbbbbb;
  margin: 0;
  line-height: 1.7;
  font-size: 1.05rem;
  color: #ddd;
}

.demo-link {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  background-color: #8b5cf6;
  color: #ddd;
  text-decoration: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: 0.5rem;
  align-self: flex-start;
  cursor: pointer;
}

.demo-link:hover {
  background-color: #7b4ce6;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(168, 143, 185, 0.2);
  color: #fff;
}

.demo-link:active {
  transform: translateY(0);
  box-shadow: none;
}

.demo-note {
  font-style: italic;
  color: #ddd;
  background-color: #2e2e2e;
  margin-bottom: 1.5rem;
  padding: 0.6rem 1rem;
  border-left: 4px solid #7b4ce6;
  border-radius: 0 6px 6px 0;
  font-size: 1rem !important;
  line-height: 1.4;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .demo-project {
    grid-template-columns: 1fr;
    padding: 1.5rem;
    gap: 1.5rem;
  }

  .demo-project-image {
    height: 220px;
  }

  .demo-project-content {
    max-width: 100%;
  }

  .demo-project h4 {
    font-size: 1.3rem;
  }

  .demo-project p {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .demo-projects {
    padding: 1rem;
    gap: 2rem;
  }

  .demo-project {
    padding: 1.25rem;
  }

  .demo-project-image {
    height: 180px;
  }
}

@media (max-width: 768px) {
  .popup-content {
    margin: 10% auto;
    padding: 1.25rem;
  }

  .popup h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
  }

  .popup-details h3 {
    font-size: 1.4rem;
  }

  .popup-button {
    min-width: 180px;
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }

  .neutron-links {
    flex-direction: column;
  }

  .popup-links {
    flex-direction: column;
  }
}
