body {
  background: linear-gradient(-45deg, #0a0d23, #1a1f43, #2a2f63, #0a0d23);
  background-size: 400% 400%;
  color: #fff;
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

#backgroundCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 14px;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  animation: navSlide 1.5s ease-out;
}

@keyframes navSlide {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.main-logo {
  height: 40px;
  animation: logoPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5)); }
  50% { transform: scale(1.05); filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8)); }
}

nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #ccc;
  text-decoration: none;
  padding: 10px 15px;
  transition: all 0.3s ease;
  border-radius: 5px;
}

nav ul li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

nav .stats {
  display: flex;
  gap: 20px;
  font-weight: bold;
}

.breadcrumb {
  padding: 15px 40px;
  color: #888;
  font-size: 14px;
  animation: breadcrumbSlide 1.2s ease-out 0.5s both;
  position: relative;
  z-index: 10;
}

@keyframes breadcrumbSlide {
  from { transform: translateX(-50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.title {
  font-family: 'Orbitron', sans-serif;
  font-size: 36px;
  color: #fff;
  padding: 20px 40px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 3px;
  position: relative;
  z-index: 10;
  animation: titleGlow 2s ease-out;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

@keyframes titleGlow {
  from { transform: scale(0.8); opacity: 0; text-shadow: 0 0 10px rgba(255, 255, 255, 0.1); }
  to { transform: scale(1); opacity: 1; text-shadow: 0 0 20px rgba(255, 255, 255, 0.3); }
}

.search-sort {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  position: relative;
  z-index: 10;
  animation: searchFade 1.8s ease-out 0.8s both;
  gap: 20px;
}

.search-sort input, .search-sort select {
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 25px;
  color: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.search-sort input:focus, .search-sort select:focus {
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
  outline: none;
  transform: scale(1.02);
}

.search-sort input:hover, .search-sort select:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 500px));
  gap: 30px;
  padding: 40px;
  position: relative;
  z-index: 10;
  animation: productsFade 2.5s ease-out 1s both;
}

@keyframes productsFade {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

.product {
  text-align: center;
  position: relative;
  background: rgba(0, 0, 0, 0.6);
  padding: 20px;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  transition: all 0.4s ease;
  animation: productStagger 0.5s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
  max-width: 500px;
  margin: 0 auto;
  width: 100%;
}

.product:nth-child(1) { animation-delay: 1.2s; }
.product:nth-child(2) { animation-delay: 1.4s; }
.product:nth-child(3) { animation-delay: 1.6s; }
.product:nth-child(4) { animation-delay: 1.8s; }
.product:nth-child(5) { animation-delay: 2s; }

@keyframes productStagger {
  to { opacity: 1; transform: translateY(0); }
}

.product:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  background: rgba(0, 0, 0, 0.8);
}

.product .group-label {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: bold;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.product .placeholder {
  width: 100%;
  height: 440px;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  margin-bottom: 15px;
  transition: all 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.product:hover .placeholder {
  transform: scale(1.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.product .price {
  color: #ccc;
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 500;
}

.product .name {
  color: #fff;
  font-size: 18px;
  font-family: 'Orbitron', sans-serif;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
}

.hidden {
  display: none;
}

.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  justify-content: center;
  align-items: center;
  backdrop-filter: blur(5px);
}

.popup.active {
  display: flex;
}

.popup-content {
  background: linear-gradient(135deg, #0f172a, #1e2a44);
  border-radius: 20px;
  padding: 30px;
  width: 90%;
  max-width: 1000px;
  height: 85%;
  max-height: 700px;
  display: flex;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 191, 255, 0.4), 0 0 15px rgba(0, 95, 127, 0.3);
  border: 1px solid rgba(0, 191, 255, 0.2);
  animation: popupFadeIn 0.6s ease-out;
}

@keyframes popupFadeIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 25px;
  font-size: 28px;
  color: #d1d5db;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 5px 10px;
  border-radius: 50%;
}

.close-btn:hover {
  color: #00b4d8;
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg) scale(1.1);
}

.popup-left {
  flex: 1.2;
  padding: 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 191, 255, 0.1);
}

#popupImage {
  max-width: 100%;
  max-height: 100%;
  border-radius: 10px;
  object-fit: contain;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

#popupImage:hover {
  transform: scale(1.03);
  box-shadow: 0 0 25px rgba(0, 191, 255, 0.5);
}

.popup-right {
  flex: 1;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.02);
  border-left: 1px solid rgba(0, 191, 255, 0.1);
  border-radius: 0 15px 15px 0;
}

#popupName {
  font-family: 'Orbitron', sans-serif;
  font-size: 32px;
  color: #00b4d8;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

#popupDescription {
  color: #a3bffa;
  font-size: 16px;
  margin-bottom: 25px;
  line-height: 1.6;
  background: rgba(0, 0, 0, 0.2);
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #00b4d8;
}

.plan {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(10, 20, 30, 0.5));
  border: 1px solid rgba(0, 191, 255, 0.15);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.plan::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
  animation: planGlow 6s infinite;
  z-index: 0;
}

@keyframes planGlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.plan.out-of-stock {
  opacity: 0.6;
  pointer-events: none;
  filter: grayscale(50%);
}

.plan:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 191, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(10, 20, 30, 0.7));
}

.plan h3 {
  font-size: 20px;
  color: #00d4ff;
  margin: 0 0 12px 0;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 5px rgba(0, 212, 255, 0.3);
}

.plan p {
  font-size: 16px;
  color: #a3bffa;
  margin: 0 0 15px 0;
  position: relative;
  z-index: 1;
}

.plan button {
  background: linear-gradient(90deg, #00b4d8, #00f0ff);
  border: none;
  padding: 12px 25px;
  color: #fff;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.plan button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: buttonShine 2s infinite;
}

@keyframes buttonShine {
  0% { left: -100%; }
  20% { left: 100%; }
  100% { left: 100%; }
}

.plan button:hover {
  transform: scale(1.08);
  box-shadow: 0 0 20px rgba(0, 180, 216, 0.5);
}

.plan.out-of-stock button {
  background: linear-gradient(90deg, #4a4a4a, #666);
  cursor: not-allowed;
}

.plan.out-of-stock button:hover {
  transform: none;
  box-shadow: none;
}

.homepage-container {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 60px);
  padding-top: 60px; /* Match navbar height */
  background: rgba(10, 13, 35, 0.3);
  backdrop-filter: blur(5px);
}

.homepage {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 60px 40px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.intro {
  flex: 1.2;
  padding-right: 60px;
}

.built-by-tag {
  background: rgba(0, 0, 0, 0.7);
  color: #00b4d8;
  padding: 8px 16px;
  border-radius: 20px;
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
  box-shadow: 0 0 10px rgba(0, 180, 216, 0.3);
}

.intro h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 56px;
  color: #fff;
  margin: 0 0 30px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
  line-height: 1.2;
}

.description {
  color: #a3bffa;
  font-size: 18px;
  margin-bottom: 30px;
  line-height: 1.8;
  max-width: 600px;
}

.features {
  list-style: none;
  padding: 0;
  color: #93c5fd;
  font-size: 16px;
}

.features li {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.features li:before {
  content: '⦿';
  color: #00b4d8;
  margin-right: 12px;
  font-size: 12px;
}

.product-showcase {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 30px;
  flex-wrap: wrap;
  position: relative;
}

.product-item {
  width: 180px;
  height: 240px;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(10, 20, 30, 0.8));
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(0, 191, 255, 0.2);
}

.product-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.2);
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 0 20px rgba(0, 191, 255, 0.5);
}
