* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
} 

html, 
body { 
  width: 100%; 
  height: 100%; 
  overflow: hidden; 
  background: #232845; 
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; 
} 

canvas { 
  position: fixed; 
  inset: 0; 
  display: block; 
  z-index: 0; 
} 

/* Екран завантаження */ 
#loader-screen { 
  position: fixed; 
  inset: 0; 
  background: #232845; 
  z-index: 100; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
  align-items: center; 
  gap: 20px; 
  transition: opacity 0.8s ease, visibility 0.8s ease; 
} 

#loader-screen.hidden { 
  opacity: 0; 
  visibility: hidden; 
  pointer-events: none; 
} 

.loader-title { 
  color: #ffffff; 
  font-size: 1.1rem; 
  font-weight: 600; 
  letter-spacing: 3px; 
  text-transform: uppercase; 
} 

.loader-progress-container { 
  width: 220px; 
  height: 4px; 
  background: rgba(255, 255, 255, 0.1); 
  border-radius: 2px; 
  overflow: hidden; 
} 

.loader-progress-bar { 
  width: 0%; 
  height: 100%; 
  background: #2AD4B4; 
  transition: width 0.1s ease; 
} 

.loader-percentage { 
  color: rgba(255, 255, 255, 0.6); 
  font-size: 0.9rem; 
  letter-spacing: 2px; 
  font-variant-numeric: tabular-nums; 
} 

/* Flex UI Overlay (шапка) */ 
.ui-overlay { 
  position: relative; 
  z-index: 10; 
  width: 100%; 
  height: 100%; 
  display: flex; 
  flex-direction: column; 
  justify-content: space-between; 
  padding: 30px 40px; 
  pointer-events: none; 
} 

header { 
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  pointer-events: auto; 
  flex-wrap: wrap;
  gap: 15px;
} 

.logo { 
  color: #ffffff; 
  font-size: 1.25rem; 
  font-weight: 700; 
  letter-spacing: 2px; 
  text-transform: uppercase; 
} 

/* Навігація */
.nav-menu {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px;
  border-radius: 30px;
  overflow-x: auto;
  max-width: 100%;
}

.nav-link {
  background: transparent;
  border: none;
  color: rgba(12, 12, 12, 0.7);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: #050505;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
  background: #2AD4B4;
  color: #1a1f35;
  font-weight: 600;
}

.header-right { 
  display: flex; 
  align-items: center; 
  gap: 15px; 
} 

.badge { 
  background: rgba(255, 255, 255, 0.1); 
  backdrop-filter: blur(10px); 
  border: 1px solid rgba(255, 255, 255, 0.2); 
  color: #ffffff; 
  padding: 8px 16px; 
  border-radius: 20px; 
  font-size: 0.85rem; 
  letter-spacing: 1px; 
} 

.clay-btn { 
  background: rgba(35, 40, 69, 0.8); 
  backdrop-filter: blur(10px); 
  border: 1px solid #2AD4B4; 
  color: #ffffff; 
  padding: 8px 18px; 
  border-radius: 20px; 
  font-size: 0.85rem; 
  letter-spacing: 1px; 
  cursor: pointer; 
  transition: all 0.3s ease; 
  white-space: nowrap;
} 

.clay-btn:hover { 
  background: #2AD4B4; 
  color: #1a1f35; 
} 

.clay-btn.active { 
  background: #2AD4B4; 
  color: #1a1f35; 
  border-color: #2AD4B4; 
  font-weight: 600; 
}

/* Контентні вкладки */
.content-container {
  position: absolute;
  inset: 120px 40px 40px 40px;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.tab-pane {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease;
  transform: translateY(20px);
  pointer-events: none;
  overflow-y: auto;
  max-height: 100%;
  padding-bottom: 20px;
}

.tab-pane.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

/* Стилі для Home */
.hero-content {
  max-width: 500px;
}

.hero-content h1 {
  background: linear-gradient(to right, rgba(15, 20, 35, 0.85), transparent);
  padding: 12px 18px;
  border-radius: 8px;
  color: #ffffff;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 15px;
  letter-spacing: -1px;
}

.hero-content p {
  background: linear-gradient(to right, rgba(15, 20, 35, 0.85), transparent);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 25px;
  padding: 6px 12px;
  border-radius: 6px;
}

/* Стилі для Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  max-width: 900px;
  width: 100%;
  pointer-events: auto;
}

.project-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.project-card:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #2AD4B4;
  transform: translateY(-5px);
}

.project-card h3 {
  color: #ffffff;
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.project-card p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  line-height: 1.4;
}

.project-tag {
  align-self: flex-start;
  font-size: 0.75rem;
  color: #2AD4B4;
  background: rgba(42, 212, 180, 0.1);
  padding: 4px 10px;
  border-radius: 10px;
  margin-top: 15px;
}

/* Стилі для About Me & Contacts */
.info-card {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 100%;
  pointer-events: auto;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.info-card h2 {
  color: #0a0a0a;
  font-size: 2rem;
  margin-bottom: 15px;
}

.info-card p {
  color: rgba(10, 10, 10, 0.75);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 15px;
}

/* Модальне вікно (мініатюрне, в кутку, без затемнення екрана) */
#shopModal.modal-overlay {
  position: fixed;
  top: 80px;
  right: 20px;
  bottom: auto;
  left: auto;
  background: transparent; 
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; 
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 0;
}

#shopModal.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto; 
}

#shopModal.modal-overlay .modal-content {
  position: relative;
  transform: scale(0.9);
  transform-origin: top right;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 14px 12px 12px 12px;
  border-radius: 12px;
  width: 220px;
  max-width: 100%;
  box-sizing: border-box;
  pointer-events: auto;
  background: rgba(35, 40, 69, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

#shopModal.modal-overlay.active .modal-content {
  transform: scale(1);
}

.close-btn {
  position: absolute;
  top: 6px; 
  right: 6px;
  background: rgba(255, 255, 255, 0.08); 
  border: none;
  color: #fff; 
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.shop-btn {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 10px;
  padding: 6px 10px;
  background: #2AD4B4;
  color: #111;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.2s;
}

.shop-btn:hover {
  background: #23b095;
}

.logo-btn {
  color: #070707;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  pointer-events: auto;
}

.logo-btn:hover {
  color: #2AD4B4;
  transform: translateY(-1px);
}

/* Медіа-запити для мобільних пристроїв */
@media (max-width: 768px) {
  .ui-overlay {
    padding: 16px;
  }

  header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-right {
    justify-content: space-between;
  }

  .nav-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .content-container {
    inset: 140px 16px 20px 16px;
    align-items: flex-start;
  }

  .tab-pane#home {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    height: 100%;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .hero-content h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0;
    padding: 10px 14px;
    text-align: center;
    background: rgba(15, 20, 35, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    letter-spacing: -0.5px;
  }

  .hero-content p {
    position: static;
    font-size: 0.8rem;
    margin-bottom: 4px;
    padding: 8px 12px;
    text-align: center;
    background: rgba(15, 20, 35, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
  }

  .hero-content .clay-btn {
    align-self: center;
    margin-bottom: 0;
    padding: 6px 14px;
    font-size: 0.80rem;
  }

  .info-card {
    padding: 25px;
  }

  /* На мобільних мініатюрне вікно магазину зсуваємо трохи нижче шапки, щоб не перекривати меню */
  #shopModal.modal-overlay {
    color: #faf9f9;
    top: 120px;
    right: 16px;
  }
}