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

:root {
    --primary-color: #00d4ff;
    --secondary-color: #7c3aed;
    --dark-bg: #000000;
    --card-bg: #0a0a0a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
}

body {
    min-height: 100vh;
    background: var(--dark-bg);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    overflow: hidden;
    position: relative;
}

/* Background Effects */
.mystery-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.mystery-gradient {
    position: absolute;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 30% 20%, rgba(0, 212, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(124, 58, 237, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
    opacity: 0.9;
}

.mystery-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 100px 100px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(100px, 100px); }
}

#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.mystery-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Main Content */
.mystery-center {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Logo */
.mystery-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 60px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-icon {
    margin-bottom: 30px;
    filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.logo-icon svg {
    filter: drop-shadow(0 0 30px rgba(0, 212, 255, 0.4));
}

.logo-text {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.3);
    animation: glow 3s ease-in-out infinite alternate;
}

@keyframes glow {
    0% { filter: brightness(1) drop-shadow(0 0 20px rgba(0, 212, 255, 0.4)); }
    100% { filter: brightness(1.1) drop-shadow(0 0 30px rgba(124, 58, 237, 0.5)); }
}

.logo-slogan {
    font-size: 1.2rem;
    letter-spacing: 0.2em;
    font-weight: 300;
    text-transform: uppercase;
    position: relative;
    animation: fadeIn 1s ease-out 0.5s both;
}

.slogan-text {
    color: var(--primary-color);
    opacity: 0.8;
    animation: glitchFlicker 8s ease-in-out infinite 2s;
}

.slogan-glitch {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: var(--primary-color);
    opacity: 0;
}

.slogan-glitch:nth-child(2) {
    color: var(--secondary-color);
    animation: glitch1 8s ease-in-out infinite 2s;
}

.slogan-glitch:nth-child(3) {
    color: #ff00ff;
    animation: glitch2 8s ease-in-out infinite 2s;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 0.8; }
}

@keyframes glitchFlicker {
    0%, 100% { 
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    92% { 
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    92.5% {
        opacity: 0.3;
        text-shadow: 0 0 20px rgba(124, 58, 237, 0.8);
    }
    93% {
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
    94% {
        opacity: 0.9;
        text-shadow: 0 0 15px rgba(0, 212, 255, 0.7);
    }
    94.5% {
        opacity: 0.1;
        text-shadow: 0 0 25px rgba(255, 0, 255, 0.8);
    }
    95% {
        opacity: 0.8;
        text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    }
}

@keyframes glitch1 {
    0%, 100% { opacity: 0; }
    92.5% {
        opacity: 0.8;
        transform: translate(-2px, -1px);
        clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    }
    93% { opacity: 0; }
    94.5% {
        opacity: 0.7;
        transform: translate(2px, 1px);
        clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    }
    95% { opacity: 0; }
}

@keyframes glitch2 {
    0%, 100% { opacity: 0; }
    92.5% {
        opacity: 0.6;
        transform: translate(1px, -2px);
        clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%);
    }
    93% { opacity: 0; }
    94.5% {
        opacity: 0.5;
        transform: translate(-1px, 2px);
        clip-path: polygon(0 10%, 100% 10%, 100% 30%, 0 30%);
    }
    95% { opacity: 0; }
}

/* Contact Button */
.mystery-contact-btn {
    position: relative;
    padding: 15px 50px;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    background: transparent;
    border: 1.5px solid rgba(0, 212, 255, 0.5);
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    animation: fadeIn 1s ease-out 0.8s both;
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-glow {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.mystery-contact-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.3);
}

.mystery-contact-btn:hover .btn-glow {
    left: 100%;
}

/* Contact Modal */
.contact-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.contact-modal.active {
    display: block;
    opacity: 1;
}

.contact-modal-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.contact-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 450px;
    background: linear-gradient(135deg, #0a0a0a 0%, #141420 100%);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    transition: transform 0.3s ease;
}

.contact-modal.active .contact-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

.contact-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-modal-close:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(90deg);
}

.contact-modal h2 {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-align: center;
}

.modal-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    margin: 0 auto 30px;
    border-radius: 2px;
}

/* Form Styles */
.form-group {
    position: relative;
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-secondary);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.form-group input:focus ~ label,
.form-group input:valid ~ label,
.form-group textarea:focus ~ label,
.form-group textarea:valid ~ label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.form-group input:focus ~ .input-border,
.form-group textarea:focus ~ .input-border {
    width: 100%;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 50px;
    color: white;
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Floating Particles */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    pointer-events: none;
    opacity: 0;
    animation: particleFloat 10s infinite;
}

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

/* Synapse Fire Effect */
.synapse-fire-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    pointer-events: none;
    overflow: hidden;
}

/* Floating dots */
.synapse-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle, rgba(255, 255, 255, 1) 0%, rgba(0, 212, 255, 0.8) 50%, rgba(0, 212, 255, 0.3) 100%);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.9), 0 0 50px rgba(0, 212, 255, 0.8);
    animation: dotPulse 2s ease-out forwards;
}

@keyframes dotPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    20% {
        transform: scale(1.5);
        opacity: 1;
    }
    80% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* Connection flash between dots */
.synapse-connection-flash {
    position: absolute;
    height: 500px;
    background: radial-gradient(ellipse at center,
        rgba(255, 255, 255, 1) 0%,
        rgba(255, 255, 255, 0.9) 5%,
        rgba(230, 240, 255, 0.7) 15%,
        rgba(0, 212, 255, 0.4) 30%,
        rgba(124, 58, 237, 0.2) 45%,
        transparent 60%);
    filter: blur(50px);
    opacity: 0;
    transform-origin: center;
    animation: connectionFlash 1.5s ease-out forwards;
}

@keyframes connectionFlash {
    0% {
        opacity: 0;
        height: 0px;
    }
    25% {
        opacity: 1;
        height: 500px;
    }
    40% {
        opacity: 0.9;
        height: 600px;
    }
    100% {
        opacity: 0;
        height: 700px;
    }
}

.synapse-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.synapse-path {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    filter: drop-shadow(0 0 10px currentColor);
    opacity: 0;
    animation: synapseFlow 1.5s ease-out forwards;
}

@keyframes synapseFlow {
    0% {
        stroke-dasharray: 0 1000;
        stroke-dashoffset: 0;
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    50% {
        stroke-dasharray: 200 1000;
        stroke-dashoffset: -200;
        opacity: 1;
    }
    100% {
        stroke-dasharray: 200 1000;
        stroke-dashoffset: -1000;
        opacity: 0;
    }
}

.synapse-pulse {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    box-shadow: 0 0 30px var(--primary-color), 0 0 60px var(--secondary-color);
    transform: translate(-50%, -50%);
    opacity: 0;
    animation: pulseBurst 1s ease-out forwards;
}

@keyframes pulseBurst {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(3);
        opacity: 0;
    }
}

/* Logo pulse on synapse */
.logo-synapse-pulse {
    animation: logoSynapsePulse 0.5s ease-out;
}

@keyframes logoSynapsePulse {
    0% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(0, 212, 255, 0.8)) brightness(1.2);
    }
    100% {
        filter: drop-shadow(0 0 20px rgba(0, 212, 255, 0.3));
    }
}

/* Responsive */
@media (max-width: 768px) {
    .logo-text {
        font-size: 2.5rem;
    }
    
    .logo-slogan {
        font-size: 1rem;
    }
    
    .logo-icon svg {
        width: 80px;
        height: 80px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 2rem;
    }
    
    .contact-modal-content {
        padding: 30px 20px;
    }
}