body {
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  font-family: 'Montserrat', sans-serif;
  color: white;
  overflow-x: hidden;
}

.project-container {
  max-width: 80%;
  margin: 0 auto;
  padding: 60px 40px;
  position: relative;
}

.back-button {
  position: absolute;
  top: 30px;
  left: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 30px;
  padding: 10px 20px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.back-button:hover {
  background: white;
  color: black;
}





.project-header {
  display: flex;
  align-items: center;
  gap: 40px;
  margin-top: 80px;
  margin-bottom: 100px;
  padding: 40px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005));
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 12px rgba(164, 143, 255, 0.08), inset 0 0 0 transparent;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
}

.project-header:hover {
  box-shadow: 0 0 20px rgba(164, 143, 255, 0.15), inset 0 0 0 transparent;
}


.project-icon {
  width: 140px;
  height: 140px;
  border-radius: 16px;
  object-fit: cover;
  position: relative;
  border: none;
  transition: transform 0.3s ease;
  background-color: #0a0a0a;
  overflow: hidden;
}

.project-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: conic-gradient(from 0deg, #a48fff, #ffffff, #a48fff);
  animation: spinBorder 4s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;

}

@keyframes spinBorder {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}






.project-text {
  flex: 1;
}

.project-title {
  font-size: 2.2rem;
  font-weight: 700;
  color: transparent;
  background: linear-gradient(90deg, #c7c7c7, #f3f3f3);
  -webkit-background-clip: text;
  background-clip: text;
  letter-spacing: 0.2px;
  text-rendering: optimizeLegibility;
  margin-bottom: 8px;
  animation: subtleShift 10s ease-in-out infinite;
  background-size: 200% auto;
}

@keyframes subtleShift {
  0% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
  100% {
    background-position: 0% center;
  }
}





.project-description {
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.1rem;
  line-height: 1.6;
}









.project-gallery {
  position: relative;
  margin-top: 60px;
  margin-bottom: 40px;
}

.gallery-wrapper {
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0.005));
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 30px rgba(164, 143, 255, 0.04);
  padding: 20px;
}

.gallery-track {
  display: flex;
  gap: 30px;
  transition: transform 0.5s ease;
  will-change: transform;
}

.gallery-track img {
  max-height: 320px; /* чуть ниже по высоте */
  border-radius: 16px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-track img:hover {
  transform: scale(1.015);
  box-shadow: 0 0 20px rgba(164, 143, 255, 0.08);
}

.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 24px;
}

.gallery-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0a0a0a;
  color: white;
  font-size: 1.4rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  overflow: hidden;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.gallery-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

.gallery-btn:hover::before {
  opacity: 1;
}

.gallery-btn:active {
  transform: scale(0.94);
  background: #0a0a0a;
  box-shadow:
    inset 0 0 20px rgba(164, 143, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.5);
  border-color: rgba(164, 143, 255, 0.4);
  transition: all 0.1s ease-out;
}
















.project-tech {
  margin-top: 100px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-tech h2 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tech-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin: 0 auto;
  max-width: 1000px;
}

.tech-item {
  position: relative;
  padding: 18px 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all 0.3s ease;
  backdrop-filter: blur(4px);
  overflow: hidden;
}

.tech-item::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.tech-item:hover::before {
  opacity: 1;
}








.project-links {
  margin-top: 100px;
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  text-align: center;
}

.project-links h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 30px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.links-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

.link-btn {
  padding: 14px 30px;
  border-radius: 30px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  color: #0a0a0a;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 12px rgba(164, 143, 255, 0.2);
}

.link-btn:hover {
  background: white;
  box-shadow: 0 0 14px white;
}











.footer {
  /* margin-top: 120px; */
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding: 40px 5% 30px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
  position: relative;
  margin-top: auto;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;/* важно: центрируем всё по вертикали */
  padding: 0 20px;
  min-height: 120px; /* немного увеличим высоту */
  position: relative;
}


.footer-left .footer-logo {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: white;
  background: linear-gradient(120deg, #ffffff, #a48fff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  background-position: -100% center;
  animation: shineText 6s infinite ease-in-out;
}

.footer-slogan {
  margin: 10px 0 10px;
  line-height: 1; /* Жестко задаём */
  color: rgba(255, 255, 255, 0.4);
}



.footer-lang-switch {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  width: 120px;
  height: 44px; /* немного выше, чтоб встало на один уровень с текстом слева */
  box-sizing: border-box;
}


.lang-option {
  flex: 1;
  text-align: center;
  font-weight: 600;
  z-index: 2;
  line-height: 44px; /* чтобы текст был по центру */
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.3s ease;
  user-select: none;
}

.lang-option.active {
  color: #0a0a0a;
}

.lang-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 50%;
  height: 40px;
  background: linear-gradient(135deg, #a48fff, #866fff);
  border-radius: 10px;
  z-index: 1;
  transition: left 0.3s ease;
  box-shadow: 0 0 10px rgba(164, 143, 255, 0.4);
}


.footer-bottom {
  text-align: center;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.3);
}







/* ПОД МОДАЛКУ */
.img-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  padding-top: 80px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

.img-modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  padding: 4px;
  background: linear-gradient(135deg, #a48fff, #ffffff);
  box-shadow: 0 0 20px rgba(164, 143, 255, 0.4),
              0 0 40px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.img-modal-content:hover {
  transform: scale(1.01);
  box-shadow: 0 0 30px rgba(164, 143, 255, 0.6),
              0 0 50px rgba(255, 255, 255, 0.1);
}

.img-modal-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 34px;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.3s ease, opacity 0.3s ease;
  background: linear-gradient(120deg, #ffffff, #a48fff, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% auto;
  background-position: -100% center;
  animation: shineText 6s infinite ease-in-out;
  text-shadow: 0 0 12px rgba(164, 143, 255, 0.3);
  user-select: none;
}

.img-modal-close:hover {
  transform: rotate(90deg) scale(1.15);
  opacity: 0.9;
  text-shadow: 0 0 20px rgba(164, 143, 255, 0.7);
}

@keyframes shineText {
  0%   { background-position: -100% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 100% center; }
}







@media (max-width: 768px) {

  .back-button {
    left: unset;
  }

  .project-header {
    flex-direction: column;
    gap: 0;
  }

  .project-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .project-description {
    font-size: 0.8rem;
    text-align: center;
  }



  .gallery-track img {
    max-height: 200px;
  }

  .project-container {
    max-width: unset;
    padding: 40px 20px;
  }
  

  .project-links {
    margin-top: 50px;
  }



  /* FOOTER */
  .footer-container {
    padding: 0 10px;
  }

  .footer-left .footer-logo {
    font-size: 1.4rem;
  }


  .footer-lang-switch {
    width: 100px;
    height: 44px;
  }

  .lang-option {
    font-size: 0.75rem;
  }

  .lang-slider {
    top: 1px;
    /* width: 49%;
    height: 38px; */
  }


  .footer-slogan{
    font-size: 0.8rem;
    max-width: 200px;
  }

  .footer-bottom {
    font-size: 0.65rem;
    margin-top: 20px;
  }

}