/* 3D Effect Container */
.three-dee-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: #0a1929;
  background-image: 
    linear-gradient(rgba(59, 130, 246, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
  background-size: 120px 120px;
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

/* Enhanced grid lines */
.three-dee-container::before,
.three-dee-container::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  right: -50%;
  bottom: -50%;
  background: 
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 200px 200px;
  animation: gridMove 30s linear infinite;
  pointer-events: none;
  z-index: 1;
  transform: translateZ(-100px);
}

.three-dee-container::after {
  transform: translateZ(-200px);
  opacity: 0.7;
  animation: gridMove 40s linear infinite reverse;
}

@keyframes gridMove {
  0% {
    transform: translateY(0) translateX(0);
  }
  100% {
    transform: translateY(100px) translateX(100px);
  }
}

/* Ensure content appears above the 3D effect */
.three-dee-container + * {
  position: relative;
  z-index: 10;
}

/* Error message styling */
.three-dee-error {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 20px 40px;
  border-radius: 10px;
  text-align: center;
  max-width: 80%;
  z-index: 1000;
  font-family: 'Poppins', sans-serif;
}

/* 3D menu item badge */
.navmenu a[data-three-dee-menu] {
  position: relative;
  font-weight: 600;
  color: #0D7A31 !important;
}

.navmenu a[data-three-dee-menu]:after {
  content: '3D';
  background: #0D7A31;
  color: #1C304B;
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-left: 5px;
  font-weight: bold;
}

/* Content overlay for better readability */
.content-overlay {
  position: relative;
  z-index: 2;
  background: rgba(28, 48, 75, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 40px;
  margin: 100px auto 40px;
  max-width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Ensure the header is above the 3D effect */
#header {
  position: relative;
  z-index: 100;
  background: rgba(28, 48, 75, 0.9) !important;
  backdrop-filter: blur(5px);
}
