@tailwind base;
@tailwind components;
@tailwind utilities;

body, html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  background: black;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

.background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
  overflow: hidden;
  z-index: 0; /* Behind other content */
}

.background::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.1), rgba(0, 0, 0, 0.5));
  opacity: 0.5;
  pointer-events: none; /* Allow clicks to pass through */
}

.code {
  position: absolute;
  color: rgba(0, 255, 0, 0.7);
  font-family: 'Courier New', Courier, monospace;
  white-space: nowrap;
  overflow: hidden;
  animation: move 10s linear infinite;
}

@keyframes move {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(-100%);
  }
}

@keyframes idleWavy {
  0%, 100% {
    transform: translateY(0) rotate(0);
  }
  50% {
    transform: translateY(-5px) rotate(2deg);
  }
}

.idle-wavy {
  animation: idleWavy 4s ease-in-out infinite;
}

.fade-up-element {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-up-element.visible {
  opacity: 1;
  transform: translateY(0);
}

/* For smooth scrolling on the entire page */
html {
  scroll-behavior: smooth;
}

/* Add these styles to ensure text is readable on the dynamic background */
.dynamic-background-content {
  position: relative;
  z-index: 1;
}

/* Adjust text colors for better contrast against the dynamic background */
.dynamic-background-content h2,
.dynamic-background-content h3,
.dynamic-background-content p {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Add a subtle overlay to content sections for better readability */
.dynamic-background-section {
  position: relative;
}

.dynamic-background-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
  border-radius: 8px;
}

/* Add this to your existing CSS */
.card-on-dynamic-bg {
  background-color: rgba(30, 30, 40, 0.7);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* For text on dynamic background */
.text-on-dynamic-bg {
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Modern dark card with ambient light effect */
.modern-dark-card {
  background-color: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.4),
    0 0 15px rgba(149, 128, 255, 0.1),
    inset 0 0 20px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.modern-dark-card:hover {
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(149, 128, 255, 0.2),
    inset 0 0 25px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Ambient glow effect */
.ambient-glow {
  position: relative;
  overflow: hidden;
}

.ambient-glow::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at center,
    rgba(149, 128, 255, 0.03) 0%,
    rgba(149, 128, 255, 0) 60%
  );
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
  z-index: 0;
}

.ambient-glow:hover::before {
  opacity: 1;
}

/* Scrolling text section styles */
.scrolling-text-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.scrolling-text-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.8) 70%, rgba(0, 0, 0, 1) 100%);
  z-index: -1;
}

@media (prefers-reduced-motion: reduce) {
  .scrolling-text-section h2 {
    transform: translateX(0) !important;
    opacity: 1 !important;
    transition: none !important;
  }
}
