:root {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 229 100% 60%; /* #3A5BFF */
    --primary-foreground: 355.7 100% 97.3%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 282 66% 63%; /* #A259E6 */
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 316 100% 72%; /* #FF6EC7 */
    --radius: 0.5rem;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Adjust based on your header height */
}

body {
    background: #0a0a0a;
    color: #ffffff;
    overflow-x: hidden;
}

.space-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at center, #0a0a0a 0%, #000000 100%);
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, #eee, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 40px 70px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 50px 160px, #ddd, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 90px 40px, #fff, rgba(0,0,0,0)),
        radial-gradient(2px 2px at 130px 80px, #fff, rgba(0,0,0,0));
    background-repeat: repeat;
    background-size: 200px 200px;
    animation: twinkle 4s ease-in-out infinite;
}

.cosmic-dust {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 30%, rgba(58,91,255,0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255,110,199,0.10) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(162,89,230,0.08) 0%, transparent 60%);
    animation: nebulaPulse 15s ease-in-out infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

@keyframes nebulaPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.5;
    }
}

.content-wrapper {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.background-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: 
        linear-gradient(rgba(16, 185, 129, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(16, 185, 129, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridPulse 8s ease-in-out infinite;
}

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    animation: float 15s infinite linear;
}

@keyframes gridPulse {
    0% { opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { opacity: 0.3; }
}

@keyframes float {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) translateX(100px);
        opacity: 0;
    }
}

.space-pattern {
    background-image: 
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.05) 1px, transparent 0);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
}

.glow-effect {
    box-shadow: 0 0 20px 0 rgba(58,91,255,0.18), 0 0 30px 0 rgba(162,89,230,0.12), 0 0 40px 0 rgba(255,110,199,0.10);
    transition: all 0.3s ease;
}

.glow-effect:hover {
    box-shadow: 0 0 30px 0 rgba(58,91,255,0.28), 0 0 40px 0 rgba(162,89,230,0.18), 0 0 60px 0 rgba(255,110,199,0.15);
    transform: translateY(-2px);
}

.nav-link {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    padding: 4px 0;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, #3A5BFF, #A259E6, #FF6EC7);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: #A259E6;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.feature-card {
    background: rgba(17, 17, 17, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s cubic-bezier(.23,1.01,.32,1), box-shadow 0.3s, filter 0.3s;
    will-change: transform, box-shadow, filter;
    perspective: 800px;
    transform-style: preserve-3d;
}

.feature-card:hover {
    transform: rotateY(-8deg) rotateX(4deg) scale(1.04);
    filter: brightness(1.2) drop-shadow(0 8px 32px #A259E6aa);
    box-shadow: 0 8px 32px 0 #3A5BFF33, 0 1.5px 8px 0 #FF6EC733;
    border-color: #A259E6;
    z-index: 2;
}

.hero-gradient {
    background: linear-gradient(90deg, #3A5BFF, #A259E6, #FF6EC7);
    background-size: 200% 200%;
    animation: gradient 8s ease infinite;
}

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

.text-gradient {
    background: linear-gradient(90deg, #3A5BFF, #A259E6, #FF6EC7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Scroll indicator styles */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollBounce 2s infinite;
}

.scroll-indicator svg {
    width: 30px;
    height: 30px;
    fill: white;
    opacity: 0.7;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
} 

/* Enhanced Design Tool Image Styles */
.design-tool-image-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    transition: all 0.5s ease;
    perspective: 1000px;
}

.design-tool-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
}

.design-tool-image {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
    object-fit: contain;
    filter: brightness(0.95) contrast(1.1);
}

.design-tool-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        rgba(58, 91, 255, 0.1),
        rgba(162, 89, 230, 0.1),
        rgba(255, 110, 199, 0.1)
    );
    border-radius: 20px;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.design-tool-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    background: radial-gradient(
        circle at center,
        rgba(58, 91, 255, 0.2),
        rgba(162, 89, 230, 0.2),
        rgba(255, 110, 199, 0.2)
    );
    border-radius: 30px;
    filter: blur(20px);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: -1;
}

.design-tool-wrapper:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(5deg);
}

.design-tool-wrapper:hover .design-tool-image {
    transform: scale(1.02);
    box-shadow: 
        0 20px 40px rgba(58, 91, 255, 0.3),
        0 0 20px rgba(162, 89, 230, 0.2),
        0 0 40px rgba(255, 110, 199, 0.1);
    filter: brightness(1.1) contrast(1.2);
}

.design-tool-wrapper:hover .design-tool-overlay {
    opacity: 1;
}

.design-tool-wrapper:hover .design-tool-glow {
    opacity: 1;
    transform: scale(1.1);
}

/* Add floating animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.design-tool-wrapper {
    animation: float 6s ease-in-out infinite;
}

/* Add pulse animation for the glow */
@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.design-tool-glow {
    animation: pulse 4s ease-in-out infinite;
}

/* Fix for background image in layout section */
.canvas-container {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.canvas-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    z-index: -1;
}

/* Ensure background image persists during layout operations */
.canvas-container * {
    position: relative;
    z-index: 1;
}

/* Improve image quality */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-font-smoothing: subpixel-antialiased;
} 
#typing-effect {
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  /* border-right: .15em solid orange; */ /* Removed cursor */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  /* letter-spacing: .15em; */ /* Removed to keep original font style */
  animation:
    typing 4s steps(40, end) infinite; /* Removed blink-caret animation */
}

/* The typing effect */
@keyframes typing {
  0% {
    width: 0;
  }
  85% { /* Text finishes typing here */
    width: 100%;
  }
  100% { /* Text stays visible until loop restarts */
    width: 100%;
  }
}

/* The typewriter cursor effect - No longer needed */
/*
@keyframes blink-caret {
  from, to { border-color: transparent }
  50% { border-color: orange; }
}
*/
/* API Warning Message Styling */
#apiWarningMessage {
  font-size: 0.9em;
  color: #555; /* A slightly muted color */
  margin-top: 8px;
  text-align: center;
  padding: 5px 10px;
  background-color: #f8f8f8; /* A light background */
  border-radius: 4px;
  border: 1px solid #ddd;
}

/* Optional: Adjustments for the main loading indicator to better accommodate the new message */
#loadingIndicator {
  /* If you have existing styles for #loadingIndicator, they will be here. */
  /* Consider adding/adjusting these if not already present for good layout: */
  /* display: flex; */ /* Already set by JS, but good to have in CSS too */
  /* flex-direction: column; */ /* To stack loading message and API warning */
  /* align-items: center; */
  /* justify-content: center; */
}