@import url('./space-grotesk.css');

* { 
    font-family: 'Space Grotesk', sans-serif; 
}

body {
    background-color: #0a0e1a;
    color: #e2e8f0;
    overflow-x: hidden;
}

/* Prevent horizontal scrolling globally */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: border-box;
}

/* Cyber Grid Background */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* Glowing text effect */
.glow-text {
    text-shadow: 0 0 20px rgba(59, 130, 246, 0.8),
                 0 0 40px rgba(59, 130, 246, 0.6),
                 0 0 60px rgba(59, 130, 246, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* Neon borders */
.neon-border {
    border: 2px solid transparent;
    background: linear-gradient(#0a0e1a, #0a0e1a) padding-box,
                linear-gradient(135deg, #3b82f6, #10b981) border-box;
    position: relative;
}

.neon-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, #3b82f6, #10b981);
    opacity: 0;
    transition: opacity 0.3s ease;
    filter: blur(8px);
}

.neon-border:hover::before {
    opacity: 0.8;
}

/* Quiz progress bar */
.quiz-progress {
    background: linear-gradient(90deg, #3b82f6 var(--progress), #1e293b var(--progress));
    transition: background 0.5s ease;
}

/* Holographic button */
.holo-button {
    background: linear-gradient(135deg, #3b82f6, #10b981, #8b5cf6, #ec4899);
    background-size: 200% 200%;
    animation: holo-shift 3s ease infinite;
    position: relative;
    overflow: hidden;
}

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

.holo-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: rotate(45deg);
    animation: holo-shine 3s ease infinite;
}

@keyframes holo-shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Floating particles */
.particle {
    position: absolute;
    background: #3b82f6;
    border-radius: 50%;
    opacity: 0.6;
    animation: float-up 10s infinite;
}

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

/* Scanner effect */
.scanner-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #10b981, transparent);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

/* Terminal text effect */
.terminal-text {
    font-family: 'Courier New', monospace;
    color: #10b981;
    text-shadow: 0 0 5px #10b981;
}

.terminal-cursor {
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Service card hover effect */
.service-card {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    transition: all 0.3s ease;
    max-width: 100%;
    overflow: hidden;
    word-wrap: break-word;
    box-sizing: border-box;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

/* Fix executor cards layout */
.service-card h3 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 200px;
}

.service-card .flex {
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Quiz step animation */
.quiz-step {
    opacity: 0;
    transform: translateX(50px);
    animation: slide-in 0.5s ease forwards;
}

@keyframes slide-in {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Glitch effect */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-1 0.5s infinite;
    color: #00ffff;
    z-index: -1;
}

.glitch::after {
    animation: glitch-2 0.5s infinite;
    color: #ff00ff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(20% 0 30% 0); transform: translate(-2px, 2px); }
    40% { clip-path: inset(50% 0 20% 0); transform: translate(2px, -2px); }
    60% { clip-path: inset(10% 0 60% 0); transform: translate(-2px, 1px); }
    80% { clip-path: inset(80% 0 5% 0); transform: translate(1px, -1px); }
}

@keyframes glitch-2 {
    0%, 100% { clip-path: inset(0 0 0 0); transform: translate(0); }
    20% { clip-path: inset(60% 0 10% 0); transform: translate(2px, -1px); }
    40% { clip-path: inset(20% 0 40% 0); transform: translate(-2px, 2px); }
    60% { clip-path: inset(5% 0 80% 0); transform: translate(1px, -2px); }
    80% { clip-path: inset(30% 0 50% 0); transform: translate(-1px, 1px); }
}

/* Mobile menu backdrop */
.mobile-menu-backdrop {
    backdrop-filter: blur(10px);
    background: rgba(10, 14, 26, 0.9);
}

/* NDA modal */
.modal-backdrop {
    backdrop-filter: blur(5px);
    background: rgba(10, 14, 26, 0.8);
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(59, 130, 246, 0.3);
    position: relative;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    word-wrap: break-word;
}

/* Form inputs - unified styling */
.cyber-input, 
input[type="text"], 
input[type="email"], 
input[type="tel"], 
input[type="number"],
textarea,
select {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    color: #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    font-family: inherit;
}

.cyber-input:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    outline: none;
    background: rgba(30, 41, 59, 0.7);
}

/* Placeholder styling */
.cyber-input::placeholder,
input::placeholder,
textarea::placeholder {
    color: rgba(148, 163, 184, 0.6);
}

/* Radio and checkbox custom styling */
input[type="radio"],
input[type="checkbox"] {
    width: auto;
    accent-color: #3b82f6;
    margin-right: 0.5rem;
}

/* Labels */
label {
    color: #e2e8f0;
    font-weight: 500;
}

/* Form sections */
.form-section {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

/* Improved selected state */
.cyber-input:checked + div,
input[type="radio"]:checked + div,
input[type="checkbox"]:checked + div {
    border-color: #3b82f6 !important;
    background: rgba(59, 130, 246, 0.2) !important;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
}

/* Loading animation */
.loading-dots span {
    animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% { transform: scale(0); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        margin: 0.5rem;
        padding: 1.5rem;
    }
    
    .service-card {
        margin-bottom: 1rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    .quiz-step {
        padding: 0.5rem;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Ensure text is readable on mobile */
    p, li {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Stack elements better on mobile */
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Better button spacing */
    .space-x-4 > * + * {
        margin-left: 0.5rem;
    }
    
    /* Floating buttons should be smaller on mobile */
    .fixed.bottom-20 {
        bottom: 5rem;
    }
    
    .fixed.bottom-4 {
        bottom: 1rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .modal-content {
        padding: 1rem;
        margin: 0.25rem;
    }
    
    /* Smaller floating buttons on very small screens */
    .fixed .w-12 {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .fixed .w-6 {
        width: 1.25rem;
        height: 1.25rem;
    }
}

/* Binary rain animation for login page */
.binary-rain {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
}

.binary-rain span {
    position: absolute;
    color: #0f0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    animation: fall linear infinite;
    text-shadow: 0 0 5px #0f0;
}

@keyframes fall {
    to {
        transform: translateY(100vh);
    }
}

/* Error shake animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-10px); }
    20%, 40%, 60%, 80% { transform: translateX(10px); }
}

.error-shake {
    animation: shake 0.5s ease;
}

/* Required field indicator */
.required::after {
    content: ' *';
    color: #ef4444;
}