:root {
    --neon-pink: #ff00ff;
    --neon-blue: #00ffff;
    --dark-purple: #150050;
    --deep-purple: #0a0020;
    --grid-color: rgba(255, 0, 255, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, var(--deep-purple), var(--dark-purple));
    color: white;
    min-height: 100vh;
    overflow: hidden;
    perspective: 1000px;
}

.container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.grid-bg {
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    background-image: linear-gradient(var(--grid-color) 1px, transparent 1px),
                    linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 40px 40px;
    transform: perspective(500px) rotateX(60deg);
    animation: gridMove 20s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

@keyframes gridMove {
    0% {
        transform: perspective(500px) rotateX(60deg) translateY(0);
    }
    100% {
        transform: perspective(500px) rotateX(60deg) translateY(40px);
    }
}

.stars {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -2;
    opacity: 0.7;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 2.5s cubic-bezier(0.68, -0.55, 0.27, 1.55), opacity 2.5s ease-in-out;
    transform: translateY(0) scale(1);
    opacity: 1;
    max-width: 70%;
    position: relative;
}

.logo-container.fade-out {
    transform: translateY(-100px) scale(0.8);
    opacity: 0;
    pointer-events: none;
}

.logo {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 0 15px rgba(255, 0, 255, 0.7));
    animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 0, 255, 0.7));
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(255, 0, 255, 0.9));
    }
}

.form-container {
    background: rgba(10, 0, 32, 0.8);
    border: 2px solid var(--neon-pink);
    border-radius: 10px;
    padding: 2rem;
    margin-top: 2rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 2.5s cubic-bezier(0.23, 1, 0.32, 1), opacity 2.5s ease-in-out;
    transform: translateY(50px);
    opacity: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(50px);
    display: none;
}

.form-container.fade-in {
    opacity: 1;
    transform: translate(-50%, -50%) translateY(0);
    display: block;
}

.form-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: white;
    text-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
    letter-spacing: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    color: var(--neon-blue);
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.form-input {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid rgba(0, 255, 255, 0.3);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

.button-container {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.btn {
    color: white;
    border: none;
    padding: 0.8rem 1rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 5px;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.encrypt-btn {
    background: linear-gradient(to right, #9933ff, var(--neon-blue));
}

.submit-btn {
    background: linear-gradient(to right, var(--neon-pink), #ff6a00);
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: all 0.6s ease;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.7);
}

.btn i {
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.social-link {
    color: white;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-link:hover {
    color: var(--neon-blue);
    transform: translateY(-3px);
    text-shadow: 0 0 10px var(--neon-blue);
}

.success-message {
    display: none;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-icon {
    font-size: 3rem;
    color: var(--neon-blue);
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.retro-sun {
    position: fixed;
    bottom: -40%;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 300px;
    background: radial-gradient(ellipse at center, 
                                #ff6a00 0%, 
                                #ff0055 50%, 
                                rgba(255, 0, 106, 0) 70%);
    border-radius: 50% 50% 0 0;
    filter: blur(20px);
    z-index: -3;
    opacity: 0.6;
    animation: sunPulse 8s ease-in-out infinite alternate;
}

@keyframes sunPulse {
    0% {
        opacity: 0.6;
        filter: blur(20px);
    }
    100% {
        opacity: 0.8;
        filter: blur(25px);
    }
}

/* New animated background elements */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -4;
    overflow: hidden;
}

.laser {
    position: absolute;
    height: 2px;
    background: var(--neon-pink);
    box-shadow: 0 0 10px var(--neon-pink);
    opacity: 0;
    animation: laserMove linear infinite;
}

@keyframes laserMove {
    0% {
        transform: translateY(-100%) rotate(var(--rotation));
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(100vh) rotate(var(--rotation));
        opacity: 0;
    }
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,0,255,0.3) 0%, rgba(255,0,255,0) 70%);
    filter: blur(10px);
    animation: circleFloat linear infinite;
    opacity: 0;
}

@keyframes circleFloat {
    0% {
        transform: translate(var(--startX), 120%) scale(0.5);
        opacity: 0;
    }
    10% {
        opacity: var(--opacity);
    }
    90% {
        opacity: var(--opacity);
    }
    100% {
        transform: translate(var(--endX), -20%) scale(1);
        opacity: 0;
    }
}

.glitch-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: none;
}

.scanline {
    width: 100%;
    height: 1px;
    position: absolute;
    background: rgba(0, 255, 255, 0.3);
    animation: scanline 6s linear infinite;
    opacity: 0;
}

@keyframes scanline {
    0% {
        top: 0%;
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    80% {
        opacity: 0.8;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* Color shift animation for background */
.color-shift {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
                              rgba(150, 0, 150, 0) 0%, 
                              rgba(150, 0, 150, 0.1) 50%, 
                              rgba(150, 0, 150, 0) 100%);
    z-index: -3;
    mix-blend-mode: color-dodge;
    animation: colorShift 15s ease-in-out infinite alternate;
}

@keyframes colorShift {
    0% {
        opacity: 0.3;
        transform: translateX(-20%) rotate(0deg);
    }
    100% {
        opacity: 0.6;
        transform: translateX(20%) rotate(10deg);
    }
}

/* Animated stars with shooting star effect */
.shooting-star {
    position: absolute;
    width: 100px;
    height: 2px;
    background: linear-gradient(to right, transparent, white, transparent);
    animation: shootingStar linear infinite;
    opacity: 0;
}

@keyframes shootingStar {
    0% {
        transform: translate(0, 0) rotate(var(--angle));
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    20% {
        transform: translate(calc(var(--travel) * 0.2), calc(var(--travel) * 0.2)) rotate(var(--angle));
        opacity: 1;
    }
    100% {
        transform: translate(var(--travel), var(--travel)) rotate(var(--angle));
        opacity: 0;
    }
}

/* Status Modal */
.status-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 0, 32, 0.8);
    display: none; /* Initially hidden */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.status-modal.active {
    opacity: 1;
    pointer-events: auto;
    display: flex; /* Show when active */
}

.status-text {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    color: var(--neon-blue);
    margin-bottom: 1rem;
    text-shadow: 0 0 5px var(--neon-blue);
    letter-spacing: 2px;
}

.status-console {
    width: 80%;
    max-width: 600px;
    min-height: 100px; /* Adjusted height */
    max-height: 300px; /* Added max-height */
    background-color: rgba(0, 0, 0, 0.7);
    border: 2px solid var(--neon-blue);
    border-radius: 5px;
    color: var(--neon-blue);
    font-family: monospace;
    padding: 1rem;
    overflow-y: auto; /* Changed to auto for scrolling */
    position: relative;
}

.encryption-line {
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: typeLine 0.1s forwards;
}

@keyframes typeLine {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .logo {
        max-width: 300px;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-title {
        font-size: 1.5rem;
    }
    
    .button-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .logo {
        max-width: 250px;
    }
    
    .form-container {
        padding: 1rem;
    }
    
    .container {
        padding: 1rem;
    }
}

.loading-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--deep-purple);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 1s ease-out;
}

.loading-animation.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 100px;
    height: 100px;
    border: 5px solid rgba(255, 0, 255, 0.3);
    border-radius: 50%;
    border-top: 5px solid var(--neon-pink);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* VHS noise effect */
.noise {
    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.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.05;
    z-index: 5;
    pointer-events: none;
}
