/* HACKER OVERLAY - STYLES FOR FAKE HACKED ERROR SCREEN */

@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=VT323&family=Fira+Code:wght@400;700&display=swap');

/* STRICTLY HIDE REAL LIVECHAT SDK WIDGET POPUPS & IFRAMES */
#chat-widget-container,
#chat-widget-minimized,
iframe[id*="chat-widget"],
iframe[src*="livechat"],
iframe[title*="LiveChat"],
iframe[name*="livechat"],
div[id*="chat-widget"],
div[class*="lc-"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -99999 !important;
}

#hacker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #03060c;
    z-index: 9999999;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'Share Tech Mono', 'Fira Code', 'Courier New', monospace;
    color: #00ff66;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

#hacker-overlay.active {
    display: flex;
    animation: hackerScreenFlicker 0.3s ease-in-out;
}

/* CRT SCANLINE & VIGNETTE EFFECT */
.hacker-crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0.25) 1px,
        transparent 1px,
        transparent 2px
    );
    pointer-events: none;
    z-index: 10;
}

.hacker-vignette {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: inset 0 0 100px rgba(255, 0, 55, 0.25), inset 0 0 180px rgba(0, 0, 0, 0.9);
    pointer-events: none;
    z-index: 11;
    animation: hackerRedPulse 2s infinite ease-in-out;
}

/* CANVAS MATRIX RAIN */
#hacker-matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.35;
}

/* MAIN CONTAINER BOX */
.hacker-box {
    position: relative;
    z-index: 20;
    width: 92%;
    max-width: 900px;
    background: rgba(10, 14, 23, 0.92);
    border: 2px solid #ff0033;
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.4), 0 0 10px rgba(0, 255, 102, 0.2), inset 0 0 20px rgba(255, 0, 51, 0.2);
    border-radius: 6px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    backdrop-filter: blur(10px);
}

/* HEADER & TITLES */
.hacker-header {
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px dashed rgba(255, 0, 51, 0.5);
    padding-bottom: 16px;
}

.hacker-skull-icon {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 10px #ff0033);
    animation: hackerIconGlow 1.5s infinite alternate;
}

.hacker-title-group {
    flex-grow: 1;
}

.hacker-glitch-title {
    font-family: 'VT323', 'Share Tech Mono', monospace;
    font-size: 2.5rem;
    font-weight: 700;
    color: #ff0033;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    text-shadow: 0 0 10px rgba(255, 0, 51, 0.8);
    margin: 0;
    line-height: 1.1;
}

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

.hacker-glitch-title::before {
    left: -2px;
    text-shadow: 2px 0 #00ffff;
    animation: hackerGlitch1 2s infinite linear alternate-reverse;
}

.hacker-glitch-title::after {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    animation: hackerGlitch2 3s infinite linear alternate-reverse;
}

.hacker-subtitle {
    color: #ffcc00;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* SOUND & MUTE TOGGLE */
.hacker-controls {
    display: flex;
    gap: 12px;
    align-items: center;
}

.hacker-music-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 18px;
}

.hacker-bar {
    width: 3px;
    background: #00ff66;
    border-radius: 1px;
    animation: barPulse 0.4s infinite ease-in-out alternate;
}

.hacker-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
.hacker-bar:nth-child(2) { height: 80%; animation-delay: 0.25s; }
.hacker-bar:nth-child(3) { height: 60%; animation-delay: 0.05s; }
.hacker-bar:nth-child(4) { height: 100%; animation-delay: 0.3s; }

@keyframes barPulse {
    0% { height: 20%; background: #00ff66; }
    100% { height: 100%; background: #ff0033; }
}

.hacker-sound-btn {
    background: rgba(255, 0, 51, 0.15);
    border: 1px solid #ff0033;
    color: #ff3355;
    padding: 6px 12px;
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hacker-sound-btn:hover {
    background: #ff0033;
    color: #ffffff;
    box-shadow: 0 0 12px #ff0033;
}

/* STATS GRID */
.hacker-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border: 1px solid rgba(0, 255, 102, 0.2);
    border-radius: 4px;
    font-size: 0.85rem;
}

.hacker-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hacker-stat-label {
    color: #8899a6;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.hacker-stat-value {
    color: #00ff66;
    font-weight: bold;
}

.hacker-stat-value.danger {
    color: #ff0033;
    text-shadow: 0 0 5px #ff0033;
}

.hacker-stat-value.warning {
    color: #ffaa00;
}

/* PROGRESS BAR */
.hacker-progress-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hacker-progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #ff3355;
}

.hacker-progress-track {
    width: 100%;
    height: 12px;
    background: #111;
    border: 1px solid #ff0033;
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}

.hacker-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #ff0033, #ff6600, #ff0055);
    box-shadow: 0 0 10px #ff0033;
    transition: width 0.3s ease;
}

/* TERMINAL CONSOLE */
.hacker-terminal {
    background: #040810;
    border: 1px solid rgba(0, 255, 102, 0.4);
    border-radius: 4px;
    padding: 14px;
    height: 180px;
    overflow-y: auto;
    font-size: 0.88rem;
    line-height: 1.45;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.8);
    scrollbar-width: thin;
    scrollbar-color: #ff0033 #040810;
}

.hacker-terminal::-webkit-scrollbar {
    width: 6px;
}

.hacker-terminal::-webkit-scrollbar-thumb {
    background: #ff0033;
    border-radius: 3px;
}

.hacker-log-line {
    margin: 2px 0;
    word-break: break-all;
}

.hacker-log-line.system { color: #00ccff; }
.hacker-log-line.success { color: #00ff66; }
.hacker-log-line.warning { color: #ffaa00; }
.hacker-log-line.danger { color: #ff0033; font-weight: bold; }
.hacker-log-line.attacker { color: #ff00ff; font-style: italic; }

/* INTERACTIVE PROMPT */
.hacker-prompt-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.88rem;
}

.hacker-prompt-label {
    color: #ff0033;
    font-weight: bold;
}

.hacker-prompt-input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ff66;
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
}

/* FOOTER & BUTTONS */
.hacker-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed rgba(255, 0, 51, 0.4);
    padding-top: 14px;
    flex-wrap: wrap;
    gap: 12px;
}

.hacker-timer-box {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #ffaa00;
}

.hacker-timer-digit {
    font-family: 'VT323', monospace;
    font-size: 1.4rem;
    color: #ff0033;
    background: #000;
    padding: 2px 8px;
    border: 1px solid #ff0033;
    border-radius: 3px;
    letter-spacing: 2px;
}

.hacker-action-btns {
    display: flex;
    gap: 12px;
}

.hacker-btn-reboot {
    background: linear-gradient(135deg, #cc0022, #880011);
    border: 1px solid #ff3355;
    color: #ffffff;
    font-family: inherit;
    font-weight: bold;
    font-size: 0.85rem;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
    letter-spacing: 1px;
    transition: all 0.25s;
    box-shadow: 0 0 15px rgba(255, 0, 51, 0.4);
}

.hacker-btn-reboot:hover {
    background: linear-gradient(135deg, #ff0033, #bb0022);
    box-shadow: 0 0 25px rgba(255, 0, 51, 0.8);
    transform: translateY(-2px);
}

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

/* ANIMATIONS */
@keyframes hackerScreenFlicker {
    0% { opacity: 0; transform: scale(1.02); }
    30% { opacity: 0.8; }
    60% { opacity: 0.4; }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes hackerRedPulse {
    0%, 100% { box-shadow: inset 0 0 80px rgba(255, 0, 55, 0.2), inset 0 0 150px rgba(0,0,0,0.9); }
    50% { box-shadow: inset 0 0 140px rgba(255, 0, 55, 0.5), inset 0 0 150px rgba(0,0,0,0.9); }
}

@keyframes hackerIconGlow {
    from { filter: drop-shadow(0 0 8px #ff0033); }
    to { filter: drop-shadow(0 0 22px #ff0033) drop-shadow(0 0 5px #ffaa00); }
}

@keyframes hackerGlitch1 {
    0% { clip: rect(20px, 9999px, 40px, 0); }
    20% { clip: rect(60px, 9999px, 10px, 0); }
    40% { clip: rect(10px, 9999px, 80px, 0); }
    60% { clip: rect(40px, 9999px, 30px, 0); }
    80% { clip: rect(80px, 9999px, 50px, 0); }
    100% { clip: rect(30px, 9999px, 70px, 0); }
}

@keyframes hackerGlitch2 {
    0% { clip: rect(50px, 9999px, 10px, 0); }
    20% { clip: rect(10px, 9999px, 70px, 0); }
    40% { clip: rect(70px, 9999px, 30px, 0); }
    60% { clip: rect(30px, 9999px, 90px, 0); }
    80% { clip: rect(90px, 9999px, 20px, 0); }
    100% { clip: rect(20px, 9999px, 60px, 0); }
}

/* FLOATING LIVE CHAT BUTTON */
.hacker-floating-chat-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 99999;
    background: linear-gradient(135deg, #ee0000, #bb0000);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 12px 20px;
    font-family: 'Montserrat', sans-serif, system-ui;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 25px rgba(238, 0, 0, 0.4), 0 0 10px rgba(255, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: chatPulse 2s infinite ease-in-out;
}

.hacker-floating-chat-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(238, 0, 0, 0.6), 0 0 15px rgba(255, 0, 0, 0.5);
    background: linear-gradient(135deg, #ff1111, #dd0000);
}

.hacker-floating-chat-btn svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

@keyframes chatPulse {
    0%, 100% { box-shadow: 0 8px 25px rgba(238, 0, 0, 0.4), 0 0 10px rgba(255, 0, 0, 0.3); }
    50% { box-shadow: 0 8px 30px rgba(238, 0, 0, 0.7), 0 0 20px rgba(255, 0, 0, 0.6); }
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .hacker-box {
        padding: 16px;
    }
    .hacker-glitch-title {
        font-size: 1.6rem;
    }
    .hacker-skull-icon {
        width: 50px;
        height: 50px;
    }
    .hacker-terminal {
        height: 140px;
        font-size: 0.78rem;
    }
    .hacker-footer {
        flex-direction: column;
        align-items: stretch;
    }
    .hacker-floating-chat-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 16px;
        font-size: 12px;
    }
}

