:root {
    --text-color: #f8fafc;
    --primary-color: #3b82f6;
    --secondary-color: #8b5cf6;
    --glass-bg: rgba(15, 23, 42, 0.2); /* More transparent for video background */
    --glass-border: rgba(255, 255, 255, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #000;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative; /* Important for absolute positioning of video */
}

/* Video Background Styles */
.video-background-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    background-color: #000;
}

#space-video {
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    opacity: 0.85; /* Dimming video slightly to ensure text pops */
}

/* Glassmorphism Container */
.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3.5rem 5rem;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeUp 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    z-index: 1; /* Stay above video */
}

/* Header Text Animations */
h1.animated-gradient-text.tracking-in {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(to right, #60a5fa, #c084fc, #f472b6);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 1rem;
    /* Combine gradient shift and tracking-in animations */
    animation: gradientShift 3s linear infinite, tracking-in-expand 1.5s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.subtitle {
    font-size: 1.25rem;
    color: #e2e8f0;
    font-weight: 300;
    margin-bottom: 3rem;
    line-height: 1.6;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.glowing-text {
    animation: textGlow 2s ease-in-out infinite alternate;
}

/* Button Animations */
.interactive-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.pulse-btn {
    animation: btnPulse 2s infinite;
}

.interactive-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg) scale(0);
    transition: transform 0.5s ease;
}

.interactive-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(139, 92, 246, 0.8);
    animation: none; /* Stop pulsing on hover */
}

.interactive-btn:hover::after {
    transform: rotate(45deg) scale(1);
}

.interactive-btn:active {
    transform: translateY(1px);
}

/* Keyframes */
@keyframes fadeUp {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes tracking-in-expand {
    0% {
        letter-spacing: -0.5em;
        opacity: 0;
    }
    40% {
        opacity: 0.6;
    }
    100% {
        letter-spacing: normal;
        opacity: 1;
    }
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 2px rgba(255, 255, 255, 0.1);
    }
    100% {
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.8), 0 0 20px rgba(139, 92, 246, 0.4);
    }
}

@keyframes btnPulse {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}