:root {
    --deep-space: #000113;
    --nebula-purple: #4A00E0;
    --cosmic-blue: #2A2A72;
    --stardust: rgba(255, 255, 255, 0.1);
    --galaxy-glow: #8E2DE2;
    --twinkle: #FFFFFF;
    --success: #00c853;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
}

body {
    background: var(--deep-space);
    min-height: 100vh;
    margin: 0;
    overflow: hidden;
    cursor: none;
}

.cursor-trail {
    position: fixed;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

.cursor-star {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--twinkle);
    border-radius: 50%;
    transition: all 0.5s ease-out;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.cosmic-bg {
    position: fixed;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(
        circle at 20% 30%,
        rgba(74, 0, 224, 0.2) 0%,
        transparent 40%
    ), radial-gradient(
        circle at 80% 70%,
        rgba(42, 42, 114, 0.3) 0%,
        transparent 40%
    );
    animation: cosmicPulse 15s infinite alternate;
}

@keyframes cosmicPulse {
    0% { opacity: 0.8; }
    100% { opacity: 1; }
}

.cosmic-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.stargate {
    background: rgba(10, 10, 30, 0.25);
    border-radius: 24px;
    padding: 3rem;
    border: 1px solid var(--stardust);
    box-shadow: 0 0 48px rgba(142, 45, 226, 0.2);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 600px;
    backdrop-filter: blur(12px);
}

.portal-glow {
    position: absolute;
    inset: -2px;
    background: linear-gradient(
        45deg,
        var(--nebula-purple),
        var(--cosmic-blue),
        var(--galaxy-glow)
    );
    z-index: -1;
    filter: blur(24px);
    opacity: 0.3;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
    border-radius: 2px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--nebula-purple), var(--galaxy-glow));
    transition: width 0.5s ease;
}

.question {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.question.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-header {
    margin-bottom: 3rem;
    text-align: center;
}

.nebula-text {
    font-size: 2rem;
    background: linear-gradient(45deg, #FFFFFF 30%, #8E2DE2 70%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
    text-shadow: 0 0 24px rgba(142, 45, 226, 0.4);
}

.starlight-sub {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    font-weight: 300;
    line-height: 1.6;
}

.field-group {
    position: relative;
    margin-bottom: 2rem;
}

input {
    width: 100%;
    padding: 1.2rem 1rem 1.2rem 3rem;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 16px rgba(142, 45, 226, 0.3);
}

label {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

input:focus ~ label,
input:valid ~ label {
    transform: translateY(-180%);
    left: 1rem;
    font-size: 0.9rem;
    color: var(--twinkle);
}

.stellar-underline {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--nebula-purple), var(--galaxy-glow));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

input:focus ~ .stellar-underline {
    transform: scaleX(1);
}

.wormhole-btn {
    position: relative;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(45deg, var(--nebula-purple), var(--galaxy-glow));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.wormhole-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(142, 45, 226, 0.4);
}

.btn-aura {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at center, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 70%);
    animation: aura-pulse 3s infinite;
}

@keyframes aura-pulse {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.2); opacity: 0.3; }
    100% { transform: scale(0.8); opacity: 0; }
}

.success-message {
    text-align: center;
}

.success-content {
    margin-top: 2rem;
}

.success-icon {
    font-size: 5rem;
    color: var(--success);
    margin: 2rem 0;
    animation: pulse 2s infinite;
    filter: drop-shadow(0 0 16px rgba(0, 200, 83, 0.4));
}

.success-details {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    margin-top: 1rem;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@media (max-width: 768px) {
    .stargate {
        padding: 2rem;
    }
    
    .nebula-text {
        font-size: 1.8rem;
    }
    
    .starlight-sub {
        font-size: 1rem;
    }
}