/* Additional Cyberpunk Effects and Animations */

/* Matrix Rain Effect */
.matrix-mode {
    position: relative;
}

.matrix-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.9);
    overflow: hidden;
}

.matrix-column {
    position: absolute;
    top: -20%;
    width: 20px;
    height: 120%;
    animation: matrix-rain linear infinite;
}

.matrix-char {
    color: #0f0;
    font-size: 1.2rem;
    opacity: 0;
    animation: matrix-char-fade 2s linear infinite;
    animation-delay: calc(var(--i) * 0.1s);
}

@keyframes matrix-rain {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

@keyframes matrix-char-fade {
    0%, 100% {
        opacity: 0;
    }
    10%, 90% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
        text-shadow: 0 0 8px #0f0;
    }
}

/* Enhanced Glitch Effects */
.glitching-intense:before {
    animation: glitch-animation 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
}

.glitching-intense:after {
    animation: glitch-animation 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
}

.random-glitch {
    animation: random-glitch 0.2s ease;
}

@keyframes random-glitch {
    0% {
        transform: translate(0);
        opacity: 1;
    }
    20% {
        transform: translate(-4px, 4px);
        opacity: 0.8;
    }
    40% {
        transform: translate(-4px, -4px);
        opacity: 1;
    }
    60% {
        transform: translate(4px, 4px);
        opacity: 0.8;
    }
    80% {
        transform: translate(4px, -4px);
        opacity: 1;
    }
    100% {
        transform: translate(0);
        opacity: 1;
    }
}

/* CRT Screen Effect */
.terminal:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
    z-index: 2;
    pointer-events: none;
    opacity: 0.15;
}

/* Scan Lines */
.terminal:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.15),
        rgba(0, 0, 0, 0.15) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 2;
}

/* Flicker Effect */
.terminal {
    animation: flicker 0.15s infinite alternate;
}

@keyframes flicker {
    0%, 19.999%, 22%, 62.999%, 64%, 64.999%, 70%, 100% {
        opacity: 1;
    }
    20%, 21.999%, 63%, 63.999%, 65%, 69.999% {
        opacity: 0.95;
    }
}

/* Neon Glow Effects */
.neon-text {
    color: #fff;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #fff,
        0 0 20px #0ff,
        0 0 30px #0ff,
        0 0 40px #0ff;
}

.neon-border {
    border-color: #0ff;
    box-shadow: 
        0 0 5px #0ff,
        0 0 10px #0ff,
        inset 0 0 5px #0ff;
}

/* Hacker Terminal Cursor */
.terminal-cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background-color: var(--primary-color);
    animation: blink 1s step-end infinite;
}

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

/* Data Stream Effect */
.data-stream {
    position: relative;
    overflow: hidden;
}

.data-stream:before {
    content: "01010101010101010101010101010101010101010101010101010101010101010101010101010101";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0.1;
    animation: data-stream 20s linear infinite;
}

@keyframes data-stream {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-100%) translateY(100%);
    }
}

/* Holographic Effect */
.holographic {
    position: relative;
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.8);
}

.holographic:before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0) 0%,
        rgba(0, 255, 255, 0.8) 50%,
        rgba(0, 255, 255, 0) 100%
    );
    background-size: 200% 200%;
    mix-blend-mode: overlay;
    animation: holographic 5s linear infinite;
}

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

/* Digital Distortion */
.digital-distortion {
    position: relative;
    overflow: hidden;
}

.digital-distortion:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect x="0" y="0" width="100" height="100" fill="none" stroke="cyan" stroke-width="1"/></svg>');
    opacity: 0.1;
    animation: digital-distortion 10s linear infinite;
}

@keyframes digital-distortion {
    0% {
        transform: translateX(0) translateY(0) scale(1);
    }
    25% {
        transform: translateX(10px) translateY(-10px) scale(1.05);
    }
    50% {
        transform: translateX(0) translateY(0) scale(1);
    }
    75% {
        transform: translateX(-10px) translateY(10px) scale(0.95);
    }
    100% {
        transform: translateX(0) translateY(0) scale(1);
    }
}

/* Enhanced Button Hover Effects */
.cyber-button:hover {
    background-color: rgba(0, 255, 255, 0.2);
    box-shadow: 
        0 0 10px rgba(0, 255, 255, 0.5),
        0 0 20px rgba(0, 255, 255, 0.3),
        inset 0 0 5px rgba(0, 255, 255, 0.2);
    transform: translateY(-3px);
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cyber-button:hover::before {
    left: 100%;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cyber-button:active {
    transform: translateY(-1px);
    box-shadow: 
        0 0 5px rgba(0, 255, 255, 0.5),
        inset 0 0 5px rgba(0, 255, 255, 0.2);
}

/* Code Block Styling */
.code-block {
    font-family: 'Share Tech Mono', monospace;
    background-color: rgba(0, 0, 0, 0.7);
    border-left: 3px solid var(--primary-color);
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
    position: relative;
}

.code-block:before {
    content: "CODE:";
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary-color);
    color: #000;
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* Terminal Command Line */
.command-line {
    display: flex;
    align-items: center;
    font-family: 'Share Tech Mono', monospace;
    margin-bottom: 10px;
}

.command-prompt {
    color: var(--primary-color);
    margin-right: 10px;
}

.command-input {
    flex-grow: 1;
    background: transparent;
    border: none;
    color: var(--text-color);
    font-family: 'Share Tech Mono', monospace;
    font-size: 1rem;
    outline: none;
}

/* Loading Bar */
.loading-bar {
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    margin: 10px 0;
    position: relative;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background-color: var(--primary-color);
    width: 0%;
    animation: loading 3s ease-in-out infinite;
}

.loading-bar:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(0, 255, 255, 0.4) 50%,
        transparent 100%
    );
    animation: loading-shine 2s linear infinite;
}

@keyframes loading {
    0% {
        width: 0%;
    }
    50% {
        width: 100%;
    }
    100% {
        width: 0%;
    }
}

@keyframes loading-shine {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Hexagon Grid Background */
.hex-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="56" height="100" viewBox="0 0 56 100"><path d="M28 0L56 25V75L28 100L0 75V25L28 0Z" stroke="cyan" stroke-width="0.5" fill="none" opacity="0.2"/></svg>');
    background-size: 56px 100px;
    opacity: 0.05;
    pointer-events: none;
}

/* Circuit Board Pattern */
.circuit-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M0 50 L50 50 L50 0" stroke="cyan" stroke-width="0.5" fill="none"/><path d="M50 100 L50 50 L100 50" stroke="cyan" stroke-width="0.5" fill="none"/><circle cx="50" cy="50" r="3" fill="cyan" opacity="0.5"/></svg>');
    background-size: 100px 100px;
    opacity: 0.05;
    pointer-events: none;
}

/* Enhanced Section Transitions */
.section {
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.section.active {
    animation: section-enter 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes section-enter {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Cyberpunk Cards with Hover Effects */
.cyber-card {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cyber-card:before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%,
        var(--secondary-color) 50%,
        var(--tertiary-color) 100%
    );
}

.cyber-card:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 5px 15px rgba(0, 255, 255, 0.2),
        0 0 5px rgba(0, 255, 255, 0.5);
}

.cyber-card:hover:before {
    animation: card-rainbow 2s linear infinite;
}

@keyframes card-rainbow {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}

/* Cyberpunk Form Elements */
.cyber-input {
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 10px 15px;
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    transition: all 0.3s ease;
}

.cyber-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

.cyber-select {
    appearance: none;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    color: var(--text-color);
    padding: 10px 15px;
    font-family: 'Share Tech Mono', monospace;
    outline: none;
    transition: all 0.3s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="6" viewBox="0 0 12 6"><path d="M0 0L6 6L12 0" stroke="cyan" stroke-width="1" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

.cyber-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.3);
}

/* Cyberpunk Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.5);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Cyberpunk Text Selection */
::selection {
    background-color: var(--primary-color);
    color: #000;
}

/* Cyberpunk Tooltip */
.cyber-tooltip {
    position: relative;
    display: inline-block;
}

.cyber-tooltip:hover:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--primary-color);
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 100;
}

.cyber-tooltip:hover:before {
    content: "";
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: var(--primary-color) transparent transparent transparent;
    z-index: 100;
}

/* Cyberpunk Progress Bars */
.cyber-progress {
    width: 100%;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.cyber-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--primary-color) 0%,
        var(--secondary-color) 100%
    );
    width: var(--progress, 0%);
    transition: width 0.5s ease;
}

.cyber-progress:after {
    content: attr(data-label);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-size: 0.8rem;
    text-shadow: 0 0 2px #000;
}

/* Cyberpunk Badges */
.cyber-badge {
    display: inline-block;
    padding: 3px 8px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.cyber-badge:before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.2), transparent);
    animation: badge-shine 2s infinite linear;
}

@keyframes badge-shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Cyberpunk Alerts */
.cyber-alert {
    padding: 15px;
    margin: 15px 0;
    border-left: 5px solid;
    position: relative;
    background-color: rgba(0, 0, 0, 0.7);
}

.cyber-alert.info {
    border-color: var(--primary-color);
}

.cyber-alert.warning {
    border-color: var(--tertiary-color);
}

.cyber-alert.danger {
    border-color: var(--secondary-color);
}

.cyber-alert:before {
    position: absolute;
    top: 15px;
    right: 15px;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

.cyber-alert.info:before {
    content: "\f05a";
    color: var(--primary-color);
}

.cyber-alert.warning:before {
    content: "\f071";
    color: var(--tertiary-color);
}

.cyber-alert.danger:before {
    content: "\f06a";
    color: var(--secondary-color);
}

/* Cyberpunk Dividers */
.cyber-divider {
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%,
        var(--primary-color) 50%,
        transparent 100%
    );
    margin: 30px 0;
    position: relative;
}

.cyber-divider:before {
    content: "";
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 10px;
    background-color: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary-color);
}

/* Cyberpunk Tables */
.cyber-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.cyber-table th, .cyber-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.cyber-table th {
    background-color: rgba(0, 0, 0, 0.7);
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
}

.cyber-table tr:hover {
    background-color: rgba(0, 255, 255, 0.05);
}

/* Cyberpunk Accordion */
.cyber-accordion {
    margin: 15px 0;
}

.cyber-accordion-header {
    padding: 15px;
    background-color: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.cyber-accordion-header:after {
    content: "+";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.cyber-accordion-header.active:after {
    content: "-";
}

.cyber-accordion-content {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.cyber-accordion-content.active {
    padding: 15px;
    max-height: 500px;
}

/* Cyberpunk Tabs */
.cyber-tabs {
    margin: 20px 0;
}

.cyber-tab-nav {
    display: flex;
    border-bottom: 1px solid var(--primary-color);
}

.cyber-tab-link {
    padding: 10px 20px;
    background-color: transparent;
    color: var(--text-color);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cyber-tab-link.active {
    background-color: rgba(0, 255, 255, 0.1);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

.cyber-tab-content {
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
}

.cyber-tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

/* Cyberpunk Modal */
.cyber-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cyber-modal.active {
    opacity: 1;
    visibility: visible;
}

.cyber-modal-content {
    width: 80%;
    max-width: 600px;
    background-color: var(--terminal-color);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
    position: relative;
    transform: translateY(-50px);
    transition: all 0.3s ease;
}

.cyber-modal.active .cyber-modal-content {
    transform: translateY(0);
}

.cyber-modal-header {
    padding: 15px;
    border-bottom: 1px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cyber-modal-title {
    color: var(--primary-color);
    font-family: 'Orbitron', sans-serif;
    margin: 0;
}

.cyber-modal-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cyber-modal-close:hover {
    color: var(--primary-color);
}

.cyber-modal-body {
    padding: 20px;
}

.cyber-modal-footer {
    padding: 15px;
    border-top: 1px solid var(--primary-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
