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

:root {
  --night: #070708;
  --night-2: #0c0e12;
  --ember: #ffb454;
  --ember-2: #ff7a59;
  --teal: #4ff0c8;
  --stone: #c7c7c2;
}

body {
  font-family: 'IBM Plex Sans', sans-serif;
  background: radial-gradient(1200px 900px at 10% -10%, rgba(255, 180, 84, 0.12), transparent 55%),
    radial-gradient(900px 700px at 90% 10%, rgba(79, 240, 200, 0.12), transparent 50%),
    linear-gradient(180deg, var(--night), var(--night-2));
  color: #e2e8f0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.02em;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: overlay;
}

.glass-card {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  position: relative;
  overflow: hidden;
}

.glass-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: overlay;
}

.glass-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-hover:hover {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 30px rgba(14, 165, 233, 0.3), 0 12px 40px 0 rgba(0, 0, 0, 0.5);
  transform: translateY(-4px) scale(1.02);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  transition: all 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.blinking-cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background-color: #ffffff;
  animation: blink 1s step-end infinite;
  vertical-align: bottom;
  margin-left: 2px;
  box-shadow: 0 0 10px #ffffff;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.pixel-blast-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.bg-grid-white {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' width='32' height='32' fill='none' stroke='rgb(255 255 255 / 0.1)'%3e%3cpath d='M0 .5H31.5V32'/%3e%3c/svg%3e");
}

::selection {
  background-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  text-shadow: 0 0 5px #ffffff;
}

.neon-text-blue {
  text-shadow: 0 0 5px rgba(255, 255, 255, 0.6), 0 0 10px rgba(255, 255, 255, 0.3);
}

.neon-text-purple {
  text-shadow: 0 0 5px rgba(168, 85, 247, 0.6), 0 0 10px rgba(168, 85, 247, 0.3);
}

@keyframes float-slow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes rise-in {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  100% {
    background-position: 100% 50%;
  }
}

@keyframes fade-in-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade-in {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes text-shine {
  0% {
    background-position: 0% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes infinite-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

@keyframes scale-in {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glow-pulse {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.3);
  }

  50% {
    box-shadow: 0 0 30px rgba(14, 165, 233, 0.5), 0 0 40px rgba(14, 165, 233, 0.3);
  }
}

@keyframes slide-up {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce-in {
  0% {
    opacity: 0;
    transform: scale(0.3);
  }

  50% {
    opacity: 1;
    transform: scale(1.05);
  }

  70% {
    transform: scale(0.9);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes rotate-gradient {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 20px rgba(14, 165, 233, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(14, 165, 233, 0);
  }
}

@keyframes float-up-down {

  0%,
  100% {
    transform: translateY(0) translateX(0);
  }

  25% {
    transform: translateY(-20px) translateX(10px);
  }

  50% {
    transform: translateY(-10px) translateX(-10px);
  }

  75% {
    transform: translateY(-15px) translateX(5px);
  }
}

@keyframes gradient-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes sparkle {

  0%,
  100% {
    opacity: 0;
    transform: scale(0);
  }

  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.float-slow {
  animation: float-slow 8s ease-in-out infinite;
}

.rise-in {
  animation: rise-in 900ms ease forwards;
}

.shimmer-text {
  background: linear-gradient(90deg, #ffffff, var(--ember), #ffffff);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 3.5s ease-in-out infinite;
}

.animate-fade-in-up {
  animation: fade-in-up 1s ease-out forwards;
}

.animate-fade-in {
  animation: fade-in 0.8s ease-out forwards;
}

.animate-text-shine {
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.8) 0%,
      rgba(255, 255, 255, 1) 50%,
      rgba(255, 255, 255, 0.8) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: text-shine 3s linear infinite;
}

.animate-infinite-scroll {
  animation: infinite-scroll 40s linear infinite;
}

.animate-scale-in {
  animation: scale-in 0.6s ease-out forwards;
}

.animate-glow-pulse {
  animation: glow-pulse 2s ease-in-out infinite;
}

.animate-slide-up {
  animation: slide-up 0.7s ease-out forwards;
}

.animate-bounce-in {
  animation: bounce-in 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.animate-rotate-gradient {
  animation: rotate-gradient 8s linear infinite;
}

.animate-pulse-ring {
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

.animate-float-up-down {
  animation: float-up-down 6s ease-in-out infinite;
}

.animate-gradient-shift {
  background-size: 200% 200%;
  animation: gradient-shift 4s ease infinite;
}

.animate-sparkle {
  animation: sparkle 1.5s ease-in-out infinite;
}

/* Hover effects */
.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hover-glow {
  transition: filter 0.3s ease;
}

.hover-glow:hover {
  filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
}

.hover-rotate {
  transition: transform 0.5s ease;
}

.hover-rotate:hover {
  transform: rotate(5deg) scale(1.05);
}

/* Editorial homepage accents */
.hero-grid {
  background-image:
    radial-gradient(800px 500px at 10% 10%, rgba(255, 180, 84, 0.2), transparent 55%),
    radial-gradient(700px 500px at 90% 20%, rgba(79, 240, 200, 0.18), transparent 55%);
}

.edge-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.stat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.section-divider {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}
