/* YMSecure - Advanced Visual Effects CSS */

/* Matrix Rain Effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
}

.matrix-column {
    position: absolute;
    font-family: 'Courier New', monospace;    font-size: 14px;
    color: #00D2FF;
    animation: matrixRain linear infinite;
}

@keyframes matrixRain {
    0% {
        transform: translateY(-100vh);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(100vh);
        opacity: 0;
    }
}

/* Cyberpunk Grid */
.cyber-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;    background-image: 
        linear-gradient(rgba(0, 210, 255, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 210, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(50px, 50px);
    }
}

/* Neon Border Effects */
.neon-border {
    position: relative;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.neon-border::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    margin: -2px;
    border-radius: inherit;    background: var(--gradient-cyber);
    animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
    0% {
        opacity: 0.5;
        filter: blur(1px);
    }
    100% {
        opacity: 1;
        filter: blur(0px);
    }
}

/* Holographic Text Effect */
.holographic-text {
    background: linear-gradient(
        45deg,
        #ff0081,
        #ff8c00,
        #40e0d0,
        #ff0081
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hologramShift 3s ease-in-out infinite;
    position: relative;
}

.holographic-text::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hologramScan 2s linear infinite;
}

@keyframes hologramShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

@keyframes hologramScan {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 100% 0;
    }
}

/* Glitch Effect */
.glitch-text {
    position: relative;
    animation: glitch 2s infinite;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch-text::before {
    animation: glitch-1 0.5s infinite;
    color: #ff0081;
    z-index: -1;
}

.glitch-text::after {
    animation: glitch-2 0.5s infinite;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(-2px, -2px);
    }
    60% {
        transform: translate(2px, 2px);
    }
    80% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-1 {
    0%, 100% {
        transform: translate(0);
    }
    10% {
        transform: translate(-2px, -2px);
    }
    20% {
        transform: translate(2px, 2px);
    }
    30% {
        transform: translate(-2px, 2px);
    }
    40% {
        transform: translate(2px, -2px);
    }
}

@keyframes glitch-2 {
    0%, 100% {
        transform: translate(0);
    }
    10% {
        transform: translate(2px, 2px);
    }
    20% {
        transform: translate(-2px, -2px);
    }
    30% {
        transform: translate(2px, -2px);
    }
    40% {
        transform: translate(-2px, 2px);
    }
}

/* Scanline Effect */
.scanlines {
    position: relative;
    overflow: hidden;
}

.scanlines::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 245, 255, 0.03) 2px,
        rgba(0, 245, 255, 0.03) 4px
    );
    animation: scanline 0.1s linear infinite;
    pointer-events: none;
}

@keyframes scanline {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(4px);
    }
}

/* Data Stream Effect */
.data-stream {
    position: absolute;
    width: 2px;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--brand-primary),
        transparent
    );
    animation: dataFlow 3s linear infinite;
}

@keyframes dataFlow {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Circuit Board Pattern */
.circuit-pattern {
    background-image: 
        radial-gradient(circle at 25px 25px, var(--brand-primary) 2px, transparent 2px),
        linear-gradient(0deg, rgba(0, 245, 255, 0.1) 50%, transparent 50%),
        linear-gradient(90deg, rgba(0, 245, 255, 0.1) 50%, transparent 50%);
    background-size: 50px 50px, 50px 50px, 50px 50px;
    animation: circuitFlow 10s linear infinite;
}

@keyframes circuitFlow {
    0% {
        background-position: 0 0, 0 0, 0 0;
    }
    100% {
        background-position: 50px 50px, 25px 25px, 25px 25px;
    }
}

/* Energy Orb Effect */
.energy-orb {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--brand-primary), transparent);
    animation: energyPulse 2s ease-in-out infinite;
}

.energy-orb::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, transparent, var(--brand-primary));
    animation: energyRipple 2s ease-in-out infinite;
    opacity: 0.3;
}

@keyframes energyPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.7;
    }
}

@keyframes energyRipple {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Laser Beam Effect */
.laser-beam {
    position: relative;
    height: 2px;
    background: var(--brand-primary);
    box-shadow: 
        0 0 5px var(--brand-primary),
        0 0 10px var(--brand-primary),
        0 0 15px var(--brand-primary);
    animation: laserSweep 3s linear infinite;
}

@keyframes laserSweep {
    0% {
        width: 0%;
        opacity: 1;
    }
    50% {
        width: 100%;
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0;
    }
}

/* Hexagon Grid Pattern */
.hex-grid {
    background-image: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2300f5ff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: hexMove 20s linear infinite;
}

@keyframes hexMove {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 60px 60px;
    }
}

/* Terminal Cursor */
.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--brand-primary);
    animation: cursorBlink 1s infinite;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Particle System */
.particle-system {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 50%;
    animation: particleMove 8s linear infinite;
    opacity: 0.6;
}

@keyframes particleMove {
    0% {
        transform: translate(0, 100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
        transform: scale(1);
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translate(0, -100px) scale(0);
        opacity: 0;
    }
}

/* Cyberpunk Button Effect */
.cyber-btn {
    position: relative;
    background: transparent;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
    padding: 12px 24px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.cyber-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--brand-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.cyber-btn:hover::before {
    left: 0;
}

.cyber-btn:hover {
    color: var(--bg-primary);
    box-shadow: 
        0 0 20px var(--brand-primary),
        inset 0 0 20px rgba(0, 245, 255, 0.2);
}

/* Digital Clock Display */
.digital-display {
    font-family: 'Courier New', monospace;
    background: #000;
    color: var(--brand-primary);
    padding: 10px 20px;
    border: 2px solid var(--brand-primary);
    border-radius: 5px;
    text-shadow: 0 0 10px var(--brand-primary);
    box-shadow: 
        inset 0 0 10px rgba(0, 245, 255, 0.2),
        0 0 20px rgba(0, 245, 255, 0.3);
}

/* Noise Texture Overlay */
.noise-overlay {
    position: relative;
}

.noise-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E");
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* Responsive Animations */
@media (prefers-reduced-motion: reduce) {
    .matrix-column,
    .cyber-grid,
    .holographic-text,
    .glitch-text,
    .scanlines::before,
    .data-stream,
    .circuit-pattern,
    .energy-orb,
    .laser-beam,
    .hex-grid,
    .terminal-cursor,
    .particle-dot {
        animation: none;
    }
}

/* Print Styles */
@media print {
    .matrix-bg,
    .cyber-grid,
    .scanlines::before,
    .particle-system,
    .noise-overlay::after {
        display: none;
    }
}
