/* Shared Styles for KurTek Solutions */

/* Base Styles */
body {
    background-color: #050505;
    color: #d4d4d8;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* Grid Background */
.bg-grid {
    background-size: 40px 40px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* Glass Card */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Typing cursor */
.cursor-blink {
    animation: blink 1s step-end infinite;
}

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

/* Dot Pattern for Data Card */
.bg-dots {
    background-image: radial-gradient(rgba(255,255,255,0.2) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Code Matrix Animation */
.code-matrix {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
    background-size: 200% 100%;
    animation: matrix-flow 3s linear infinite;
}

@keyframes matrix-flow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Binary Rain Effect */
.binary-rain {
    position: relative;
    overflow: hidden;
}

.binary-rain::before {
    content: "01001010 01110101 01110010 01110100 01100101 01101011";
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    color: rgba(99, 102, 241, 0.3);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    animation: binary-fall 4s linear infinite;
    white-space: nowrap;
    overflow: hidden;
}

@keyframes binary-fall {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200vh); }
}

/* Circuit Board Pattern */
.circuit-board {
    background-image: 
        linear-gradient(90deg, rgba(99, 102, 241, 0.1) 1px, transparent 1px),
        linear-gradient(rgba(99, 102, 241, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    position: relative;
}

.circuit-board::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
    animation: circuit-pulse 2s ease-in-out infinite;
}

@keyframes circuit-pulse {
    0%, 100% { opacity: 0.3; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
}

/* Terminal Typing Effect */
.terminal-typing {
    overflow: hidden;
    border-right: 2px solid #6366f1;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: #6366f1; }
}

/* Data Visualization Bars */
.data-bars {
    display: flex;
    align-items: end;
    gap: 2px;
    height: 40px;
}

.data-bar {
    width: 4px;
    background: linear-gradient(to top, #6366f1, #818cf8);
    border-radius: 2px 2px 0 0;
    animation: data-pulse 2s ease-in-out infinite;
}

.data-bar:nth-child(1) { animation-delay: 0s; }
.data-bar:nth-child(2) { animation-delay: 0.2s; }
.data-bar:nth-child(3) { animation-delay: 0.4s; }
.data-bar:nth-child(4) { animation-delay: 0.6s; }
.data-bar:nth-child(5) { animation-delay: 0.8s; }

@keyframes data-pulse {
    0%, 100% { height: 20%; }
    50% { height: 100%; }
}

/* Network Nodes Animation */
.network-nodes {
    position: relative;
}

.network-node {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #6366f1;
    border-radius: 50%;
    animation: node-pulse 3s ease-in-out infinite;
}

.network-connection {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent, #6366f1, transparent);
    animation: connection-flow 2s linear infinite;
}

@keyframes node-pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% { 
        transform: scale(1.2);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

@keyframes connection-flow {
    0% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(0); }
}

/* Loading Spinner for AI Processing */
.ai-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(99, 102, 241, 0.1);
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    animation: ai-spin 1s linear infinite;
}

@keyframes ai-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Holographic Effect */
.holographic {
    background: linear-gradient(45deg, 
        rgba(99, 102, 241, 0.1) 0%,
        rgba(129, 140, 248, 0.1) 25%,
        rgba(165, 180, 252, 0.1) 50%,
        rgba(129, 140, 248, 0.1) 75%,
        rgba(99, 102, 241, 0.1) 100%);
    background-size: 400% 400%;
    animation: holographic-shift 4s ease-in-out infinite;
}

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

/* Page Transition */
.page-transition {
    opacity: 0;
    transform: translateY(20px);
    animation: page-enter 0.6s ease-out forwards;
}

@keyframes page-enter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design Helpers */
@media (max-width: 768px) {
    .binary-rain::before {
        font-size: 10px;
    }
    
    .data-bars {
        height: 30px;
    }
    
    .network-node {
        width: 6px;
        height: 6px;
    }
}