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

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --primary-color: #6366f1;
  --secondary-color: #8b5cf6;
  --accent-color: #ec4899;
  --dark-bg: #0a0a0f;
  --card-bg: rgba(20, 20, 30, 0.6);
  --text-color: #f1f5f9;
  --text-secondary: #94a3b8;
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shine: rgba(255, 255, 255, 0.03);
  --border-subtle: rgba(255, 255, 255, 0.06);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--dark-bg);
  color: var(--text-color);
  background-image: 
    radial-gradient(circle at 20% 10%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    linear-gradient(to bottom, var(--dark-bg), #0f0f1a);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
.brand-font {
  font-family: "Space Grotesk", "Inter", sans-serif;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1.1;
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.2;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
}

h4,
h5,
h6 {
  margin: 1rem auto;
  font-weight: 600;
}

.neon-border {
  position: relative;
}
@keyframes neonBorder {
  0% {
    box-shadow: 0 0 5px #00ffcc, 0 0 15px #00ffcc;
  }
  50% {
    box-shadow: 0 0 10px #ff00ff, 0 0 20px #ff00ff;
  }
  100% {
    box-shadow: 0 0 5px #00ffcc, 0 0 15px #00ffcc;
  }
}

.glow-button {
  border: 2px solid #00ffcc;
  padding: 10px 20px;
  animation: neonBorder 2s infinite alternate;
}

.neon-border:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 1px solid var(--primary-color);
  border-radius: inherit;
  box-shadow: 0 0 8px var(--primary-color), inset 0 0 8px var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.neon-border:hover:before {
  opacity: 1;
}

.hero-gradient {
  background: linear-gradient(
    135deg,
    rgba(23, 186, 251, 0.3),
    rgba(0, 102, 255, 0.2),
    rgba(23, 186, 251, 0.1)
  );
  backdrop-filter: blur(10px);
  animation: gridGlow 4s ease-in-out infinite alternate;
}
@keyframes gridGlow {
  0% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.8;
  }
}

pre,
.code-block {
  font-family: "Space Mono", monospace;
  background: rgba(10, 10, 10, 0.95);
  /* background: rgba(5, 5, 20, 0.7); */
  /* border-left: 3px solid var(--primary-color); */
  padding: 1rem;
  margin: 3rem auto;
  overflow-x: auto;
  /* Custom styles for CodeDynasty */
  /* box-shadow: 0px 0px 15px rgba(0, 255, 170, 0.3); */
  border-radius: 10px;
  padding: 16px;

  display: inline-block;
  overflow-x: auto;
}

.code-text {
  font-family: "Space Mono", monospace;
  color: var(--primary-color);
}

.terminal-effect {
  position: relative;
  overflow: hidden;
}

.terminal-effect:after {
  content: "";
  position: absolute;
  height: 15px;
  width: 7px;
  bottom: 0;
  right: 0;
  background-color: var(--primary-color);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  from,
  to {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
}

.grid-line-bg {
  background-image: linear-gradient(var(--card-bg) 1px, transparent 1px),
    linear-gradient(90deg, var(--card-bg) 1px, transparent 1px);
  background-size: 20px 20px;
  background-position: center center;
}

.card-3d {
  transform-style: preserve-3d;
  perspective: 1000px;
}

.card-3d-inner {
  transform: perspective(1000px) rotateX(0) rotateY(0);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card-3d:hover .card-3d-inner {
  transform: translateZ(20px);
}

.hover-glow:hover {
  box-shadow: 0 0 15px var(--primary-color);
}

.news-hover:hover img {
  filter: none;
}

.news-hover img {
  filter: grayscale(0.4) brightness(0.8);
  transition: filter 0.3s ease;
}

.button-neon {
  position: relative;
  overflow: hidden;
}

.button-neon:after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: 0.5s;
}

.button-neon:hover:after {
  left: 100%;
}

.nav-link:before {
  content: "{";
  margin-right: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:after {
  content: "}";
  margin-left: 0.25rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover:before,
.nav-link:hover:after {
  opacity: 1;
  color: var(--primary-color);
}

.footer-link:before {
  content: ">";
  margin-right: 0.5rem;
  color: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: inline-block;
  transform: translateX(-10px);
}

.footer-link:hover:before {
  opacity: 1;
  transform: translateX(0);
}

.categories-list li {
  position: relative;
}

.categories-list li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translateY(-50%);
}

.glitch-text {
  position: relative;
  display: flex;
}
.glitch-text span {
  width: fit-content;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.glitch-text:hover:after {
  content: attr(data-text);
  position: absolute;
  left: 0px;
  top: 0;
  color: var(--accent-color);
  overflow: hidden;
  clip: rect(0, 900px, 0, 0);
  animation: glitch-anim 2s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% {
    clip: rect(44px, 9999px, 56px, 0);
  }
  20% {
    clip: rect(12px, 9999px, 76px, 0);
  }
  40% {
    clip: rect(62px, 9999px, 82px, 0);
  }
  60% {
    clip: rect(22px, 9999px, 67px, 0);
  }
  80% {
    clip: rect(15px, 9999px, 34px, 0);
  }
  100% {
    clip: rect(53px, 9999px, 24px, 0);
  }
}

/* 3D Cube Animation */
.cube-container {
  perspective: 1000px;
  width: 50px;
  height: 50px;
}

.cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotate 10s infinite linear;
}

.cube-face {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 1px solid var(--primary-color);
  opacity: 0.7;
}

.cube-front {
  transform: translateZ(20px);
}
.cube-back {
  transform: rotateY(180deg) translateZ(20px);
}
.cube-right {
  transform: rotateY(90deg) translateZ(20px);
}
.cube-left {
  transform: rotateY(-90deg) translateZ(20px);
}
.cube-top {
  transform: rotateX(90deg) translateZ(20px);
}
.cube-bottom {
  transform: rotateX(-90deg) translateZ(20px);
}

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

.red {
  border: 2px red solid;
}
.red-a * {
  border: 2px red solid;
}

.glass-card {
  background: linear-gradient(
    145deg,
    rgba(20, 20, 30, 0.4) 0%,
    rgba(20, 20, 30, 0.6) 100%
  );
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 8px 32px 0 rgba(99, 102, 241, 0.15);
  transform: translateY(-2px);
}

.glass-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(99, 102, 241, 0.05) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass-card:hover::before {
  opacity: 1;
}

.grid-pattern {
  background-size: 30px 30px;
  background-image: linear-gradient(
      to right,
      rgba(255, 255, 255, 0.05) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
}

/* Starfield Animation */
@keyframes move-stars {
  from {
    transform: translateY(0px);
  }
  to {
    transform: translateY(-2000px);
  }
}

#stars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 50px 50px;
  opacity: 0.5;
  animation: move-stars 200s linear infinite;
}

#stars2 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 100px 100px;
  opacity: 0.3;
  animation: move-stars 150s linear infinite;
}

#stars3 {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: transparent;
  background-image: radial-gradient(white 1px, transparent 1px);
  background-size: 150px 150px;
  opacity: 0.1;
  animation: move-stars 100s linear infinite;
}

/* Glow Animation */
@keyframes glow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3),
      0 0 20px rgba(255, 255, 255, 0.3), 0 0 30px rgba(29, 185, 251, 0.3),
      0 0 40px rgba(29, 185, 251, 0.3);
  }
  50% {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5),
      0 0 30px rgba(255, 255, 255, 0.5), 0 0 40px rgba(29, 185, 251, 0.5),
      0 0 50px rgba(29, 185, 251, 0.5);
  }
}

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

/* Modern Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  padding: 0.875rem 1.75rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(99, 102, 241, 0.3);
}

/* Modern Card Styles */
.modern-card {
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.5), rgba(20, 20, 30, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 1.25rem;
  padding: 2rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

/* Section Spacing */
.section-padding {
  padding: 6rem 0;
}

@media (max-width: 768px) {
  .section-padding {
    padding: 3rem 0;
  }
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Better Focus States */
*:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Improved Link Styles */
a {
  transition: color 0.2s ease;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary-color);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtle Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Modern Navigation */
.nav-modern {
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
}

/* Hero Section Modern */
.hero-modern {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-modern::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

/* Project Card Hover Effect */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.project-card:hover::after {
  opacity: 1;
}

/* Better Code Blocks */
pre {
  border-radius: 0.75rem;
  border: 1px solid var(--border-subtle);
}

/* Improved Spacing */
.container-modern {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem;
}

@media (max-width: 768px) {
  .container-modern {
    padding: 0 1rem;
  }
}

/* ============================================
   PREMIUM HERO SECTION STYLES
   ============================================ */

.hero-premium {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Animated Gradient Orbs */
.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

.gradient-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

.gradient-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-delay: 7s;
}

.gradient-orb-3 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.3) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: 14s;
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-50px, 50px) scale(0.9);
  }
}

/* Grid Pattern */
.bg-grid-pattern {
  background-image: 
    linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
}

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

/* Premium Badge */
.badge-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #a5b4fc;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.badge-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.3), transparent);
  animation: badgeGlow 3s ease-in-out infinite;
}

@keyframes badgeGlow {
  0%, 100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

/* Premium Gradient Text */
.gradient-text-premium {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 25%, #ec4899 50%, #f59e0b 75%, #6366f1 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 8s ease infinite;
}

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

/* Hero Title */
.hero-title {
  text-shadow: 0 0 80px rgba(99, 102, 241, 0.5);
  letter-spacing: -0.03em;
}

/* Stats */
.stat-item {
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Premium Buttons */
.btn-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-center;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  background-size: 200% 200%;
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.6);
  animation: gradientShift 2s ease infinite;
}

.btn-premium-glow {
  position: absolute;
  inset: -2px;
  background: linear-gradient(45deg, #6366f1, #8b5cf6, #ec4899, #f59e0b);
  border-radius: 1rem;
  opacity: 0;
  filter: blur(10px);
  transition: opacity 0.4s ease;
  z-index: -1;
}

.btn-premium:hover .btn-premium-glow {
  opacity: 1;
  animation: rotate 4s linear infinite;
}

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

.btn-secondary-premium {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-center;
  padding: 1rem 2.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: white;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-secondary-premium:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(99, 102, 241, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.2);
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.scroll-indicator-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(99, 102, 241, 0.5), transparent);
  animation: scrollLine 2s ease-in-out infinite;
}

.scroll-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6366f1;
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.8);
  animation: scrollDot 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0%, 100% {
    opacity: 0.3;
  }
  50% {
    opacity: 1;
  }
}

@keyframes scrollDot {
  0%, 100% {
    transform: translateY(-20px);
    opacity: 0;
  }
  50% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Slow Pulse Animation */
@keyframes pulse-slow {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse-slow {
  animation: pulse-slow 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Floating Particles */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(99, 102, 241, 0.6);
  border-radius: 50%;
  pointer-events: none;
  animation: particleFloat 15s linear infinite;
}

@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0) scale(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-100px) translateX(100px) scale(1);
    opacity: 0;
  }
}

/* Enhanced Card Hover Effects */
.modern-card {
  position: relative;
  overflow: hidden;
}

.modern-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.modern-card:hover::after {
  opacity: 1;
}

/* Shimmer Effect for Cards */
@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.modern-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.modern-card:hover::before {
  animation: shimmer 1.5s ease-in-out;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 3rem;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .stat-divider {
    display: none;
  }
  
  .gradient-orb {
    width: 300px;
    height: 300px;
  }
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-card {
  position: relative;
  padding: 2rem;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.4), rgba(20, 20, 30, 0.6));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.feature-card:hover::before {
  transform: translateX(100%);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.feature-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  color: #a5b4fc;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover .feature-icon {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(139, 92, 246, 0.3));
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.4);
}

/* ============================================
   ENHANCED ARTICLE CARDS
   ============================================ */

.modern-card {
  position: relative;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.5), rgba(20, 20, 30, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  padding: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.modern-card > * {
  padding: 0 1.5rem;
}

.modern-card > *:first-child {
  padding: 0;
}

.modern-card > *:last-child {
  padding-bottom: 1.5rem;
}

.modern-card .aspect-video {
  margin-bottom: 0;
}

.modern-card .badge {
  margin-top: 1.5rem;
}

.modern-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-8px);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

/* Reading Time Badge */
.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: #a5b4fc;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */

.newsletter-section {
  position: relative;
  padding: 4rem 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

svg {
  margin: auto !important;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.3;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-input {
  flex: 1;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.75rem;
  color: white;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.newsletter-input:focus {
  outline: none;
  border-color: rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* ============================================
   TESTIMONIALS / SOCIAL PROOF
   ============================================ */

.testimonial-card {
  padding: 2rem;
  background: linear-gradient(145deg, rgba(20, 20, 30, 0.5), rgba(20, 20, 30, 0.7));
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 1.25rem;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  border-color: rgba(99, 102, 241, 0.3);
  transform: translateY(-4px);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(99, 102, 241, 0.3);
}

/* ============================================
   MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
  .feature-card {
    padding: 1.5rem;
  }
  
  .feature-icon {
    width: 56px;
    height: 56px;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
  
  .stat-item {
    margin-bottom: 1rem;
  }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #6366f1;
  outline-offset: 4px;
  border-radius: 0.5rem;
}

/* ============================================
   FOOTER ENHANCEMENTS
   ============================================ */

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: rgba(99, 102, 241, 0.5);
  color: #a5b4fc;
  transform: translateY(-2px);
}

/* ============================================
   LOADING STATES & MICRO-INTERACTIONS
   ============================================ */

.btn-premium:active {
  transform: scale(0.98);
}

.btn-secondary-premium:active {
  transform: scale(0.98);
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05) 25%, rgba(255, 255, 255, 0.1) 50%, rgba(255, 255, 255, 0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ============================================
   PREMIUM CURSOR EFFECTS (Optional)
   ============================================ */

@media (pointer: fine) {
  .btn-premium,
  .btn-secondary-premium,
  .modern-card,
  .feature-card {
    cursor: pointer;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
  .hero-premium,
  .newsletter-section,
  footer,
  header {
    display: none;
  }
  
  body {
    background: white;
    color: black;
  }
}

/* ============================================
   NOTIFICATION TOAST SYSTEM
   ============================================ */

.notification-toast {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 9999;
  min-width: 320px;
  max-width: 500px;
  padding: 1rem 1.5rem;
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: translateX(calc(100% + 2rem));
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.notification-toast.show {
  transform: translateX(0);
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.notification-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: bold;
  flex-shrink: 0;
}

.notification-success .notification-icon {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.notification-error .notification-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.notification-info .notification-icon {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.notification-message {
  color: #f1f5f9;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.notification-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.notification-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Mobile notification positioning */
@media (max-width: 640px) {
  .notification-toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: auto;
  }
}

/* ============================================
   LOADING STATES
   ============================================ */

.btn-premium.loading,
.btn-secondary-premium.loading {
  pointer-events: none;
  opacity: 0.8;
}

.loading-dots {
  display: inline-flex;
  align-items: center;
}

.loading-dots span {
  animation: loadingDot 1.4s ease-in-out infinite;
  opacity: 0;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes loadingDot {
  0%, 60%, 100% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}

/* Success state for button */
.btn-premium.success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-premium.success .btn-premium-glow {
  background: linear-gradient(45deg, #22c55e, #16a34a, #22c55e);
}

/* ============================================
   SHAKE ANIMATION
   ============================================ */

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(10px);
  }
}

.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* ============================================
   CONFETTI ANIMATION
   ============================================ */

.confetti {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall 1s ease-out forwards;
}

@keyframes confettiFall {
  0% {
    transform: translate(0, 0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) rotate(720deg);
    opacity: 0;
  }
}

/* ============================================
   FORM ENHANCEMENTS
   ============================================ */

.newsletter-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.newsletter-form button:disabled {
  cursor: not-allowed;
}

/* Input focus animation */
.newsletter-input:focus {
  animation: inputFocusPulse 0.3s ease-out;
}

@keyframes inputFocusPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

/* Success checkmark animation */
@keyframes checkmark {
  0% {
    transform: scale(0) rotate(0deg);
  }
  50% {
    transform: scale(1.2) rotate(180deg);
  }
  100% {
    transform: scale(1) rotate(360deg);
  }
}

.btn-premium.success span:last-child {
  animation: checkmark 0.5s ease-out;
}

/* ============================================
   ENHANCED HOVER STATES
   ============================================ */

.newsletter-input:hover:not(:disabled) {
  border-color: rgba(99, 102, 241, 0.3);
}

.newsletter-form button:hover:not(:disabled) {
  transform: translateY(-2px);
}

/* ============================================
   ACCESSIBILITY ENHANCEMENTS
   ============================================ */

.notification-toast:focus-within {
  outline: 2px solid #6366f1;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .notification-toast {
    border: 2px solid currentColor;
  }
  
  .btn-premium,
  .btn-secondary-premium {
    border: 2px solid currentColor;
  }
}

/* Dark mode adjustments (if needed) */
@media (prefers-color-scheme: dark) {
  .notification-toast {
    background: rgba(10, 10, 15, 0.98);
  }
}
