/* --- CYBER-HACK TYCOON GLOBAL DESIGN STYLES --- */

:root {
    --bg-color: #030804;
    --bg-darker: #010402;
    --border-color: #00ff66;
    --border-dim: #00441a;
    --text-primary: #33ff77;
    --text-muted: #008833;
    
    --neon-green: #00ff66;
    --neon-cyan: #00f0ff;
    --neon-magenta: #ff0055;
    --neon-yellow: #ffea00;
    
    --glow-green: 0 0 10px rgba(0, 255, 102, 0.4);
    --glow-cyan: 0 0 10px rgba(0, 240, 255, 0.4);
    --glow-magenta: 0 0 10px rgba(255, 0, 85, 0.4);
    
    --font-terminal: 'Share Tech Mono', monospace;
    --font-pixel: 'VT323', monospace;
}

/* Base Body Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-terminal);
    height: 100vh;
    overflow: hidden;
    position: relative;
    user-select: none;
}

/* CRT Scanline & Flicker Simulation Overlay */
.crt::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0; left: 0; bottom: 0; right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    aspect-ratio: 1;
    background-size: 100% 4px, 6px 100%;
    z-index: 99999;
    pointer-events: none;
}

.crt-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Vignette borders removed as requested by player */
    background: none;
    pointer-events: none;
    z-index: 99998;
}

/* Desktop Grid Layout */
.desktop {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
}

/* Status Bar Style */
.status-bar {
    height: 40px;
    background-color: var(--bg-darker);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(0, 255, 102, 0.15);
    z-index: 1000;
}

.status-left, .status-middle, .status-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-family: var(--font-terminal);
    font-weight: bold;
    color: var(--neon-green);
    text-shadow: var(--glow-green);
    font-size: 1.1rem;
}

.status-divider {
    color: var(--border-dim);
}

.status-sec {
    font-size: 0.85rem;
}

.stat-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 255, 102, 0.05);
    border: 1px solid var(--border-dim);
    padding: 2px 8px;
    border-radius: 3px;
}

.stat-counter .label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.stat-counter .value {
    font-weight: bold;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.text-cyan {
    color: var(--neon-cyan) !important;
    text-shadow: var(--glow-cyan);
}

.text-magenta {
    color: var(--neon-magenta) !important;
    text-shadow: var(--glow-magenta);
}

.text-green {
    color: var(--neon-green) !important;
    text-shadow: var(--glow-green);
}

#time-display {
    color: var(--neon-yellow);
    letter-spacing: 1px;
}

/* Workspace containing OS Windows */
.workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-image: radial-gradient(var(--border-dim) 1px, transparent 1px);
    background-size: 30px 30px;
    background-color: var(--bg-color);
}

/* Window Component Design */
.window {
    position: absolute;
    background-color: rgba(3, 8, 4, 0.93);
    border: 2px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 255, 102, 0.1);
    display: flex;
    flex-direction: column;
    min-width: 250px;
    min-height: 150px;
    border-radius: 4px;
    z-index: 100;
}

.window.active-window {
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 20px rgba(0, 240, 255, 0.25);
    z-index: 500;
}

.window.active-window .window-header {
    background-color: rgba(0, 240, 255, 0.12);
    border-bottom: 2px solid var(--neon-cyan);
    color: var(--neon-cyan);
}

.window-header {
    background-color: rgba(0, 255, 102, 0.08);
    border-bottom: 2px solid var(--border-color);
    padding: 6px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

.window-title {
    font-size: 0.85rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.win-btn {
    cursor: pointer;
    font-size: 0.8rem;
    padding: 1px 6px;
    background: rgba(0, 255, 102, 0.1);
    border: 1px solid var(--border-dim);
    border-radius: 2px;
    transition: all 0.2s;
}

.win-btn:hover {
    background: var(--neon-green);
    color: var(--bg-color);
}

.window-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Custom Scrollbar for Hacker look */
.window-content::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
.window-content::-webkit-scrollbar-track {
    background: var(--bg-darker);
}
.window-content::-webkit-scrollbar-thumb {
    background: var(--border-dim);
    border-radius: 3px;
}
.window-content::-webkit-scrollbar-thumb:hover {
    background: var(--border-color);
}

/* TERMINAL THEME & CLICKER BUTTON */
.terminal-theme {
    background-color: rgba(1, 4, 2, 0.95);
}

.terminal-log {
    flex: 1;
    border: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, 0.8);
    padding: 10px;
    font-size: 0.85rem;
    overflow-y: auto;
    margin-bottom: 12px;
    border-radius: 2px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
}

.terminal-log p {
    margin-bottom: 5px;
    word-break: break-all;
    line-height: 1.25;
}

.system-msg {
    color: var(--text-muted);
}

.code-line {
    color: var(--neon-cyan);
    animation: typing 0.15s ease-out;
}

@keyframes typing {
    from { opacity: 0; transform: translateX(-5px); }
    to { opacity: 1; transform: translateX(0); }
}

.hack-btn {
    position: relative;
    height: 65px;
    border: 2px solid var(--border-color);
    background: rgba(0, 255, 102, 0.05);
    color: var(--neon-green);
    font-family: var(--font-terminal);
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.2s;
    border-radius: 3px;
    box-shadow: inset 0 0 15px rgba(0, 255, 102, 0.1);
}

.hack-btn:hover {
    background: rgba(0, 255, 102, 0.15);
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.25), inset 0 0 15px rgba(0, 255, 102, 0.1);
    border-color: var(--neon-green);
}

.hack-btn:active {
    transform: scale(0.98);
    background: rgba(0, 255, 102, 0.3);
}

.hack-btn-glow {
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 102, 0.35), transparent);
    transform: skewX(-25deg);
    transition: 0.75s;
}

.hack-btn:hover .hack-btn-glow {
    left: 150%;
}

.terminal-footer {
    margin-top: 8px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
}

/* SHOP & CONVERSION THEME */
.shop-theme {
    padding: 0;
}

.shop-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-dim);
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-terminal);
    padding: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-btn.active {
    color: var(--neon-green);
    background: rgba(0, 255, 102, 0.05);
    border-bottom: 2px solid var(--neon-green);
    text-shadow: var(--glow-green);
}

.shop-panels {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.shop-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Upgrade Card design */
.shop-item {
    border: 1px solid var(--border-dim);
    background: rgba(0, 10, 5, 0.3);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 3px;
    transition: all 0.2s;
}

.shop-item.unlocked {
    border-color: rgba(0, 255, 102, 0.25);
}

.shop-item.affordable {
    border-color: var(--border-color);
}

.shop-item.affordable:hover {
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.15);
}

.item-info {
    flex: 1;
}

.item-name {
    font-weight: bold;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 3px 0;
}

.item-stats {
    font-size: 0.75rem;
    color: var(--neon-cyan);
}

.item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.item-count {
    font-size: 0.85rem;
    color: var(--neon-yellow);
    background: rgba(255, 234, 0, 0.08);
    padding: 1px 6px;
    border-radius: 2px;
    border: 1px solid rgba(255, 234, 0, 0.15);
}

.buy-btn {
    font-family: var(--font-terminal);
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--bg-color);
    background-color: var(--neon-green);
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    border-radius: 2px;
    transition: all 0.2s;
}

.buy-btn:disabled {
    background-color: var(--border-dim);
    color: var(--text-muted);
    cursor: not-allowed;
}

.buy-btn:not(:disabled):hover {
    box-shadow: 0 0 10px rgba(0, 255, 102, 0.6);
    background-color: #55ffa1;
}

/* Conversion Panel design */
.conversion-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 10px;
    gap: 15px;
}

.conversion-box h3 {
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
}

.conversion-box p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.exchange-stats {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.3);
    padding: 10px 20px;
    border-radius: 3px;
    font-size: 1.1rem;
}

.exchange-controls {
    display: flex;
    gap: 12px;
    width: 100%;
}

.action-btn {
    flex: 1;
    font-family: var(--font-terminal);
    font-size: 0.85rem;
    font-weight: bold;
    padding: 8px;
    cursor: pointer;
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    border-radius: 2px;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-color);
    box-shadow: var(--glow-cyan);
}

/* COMMLINK / NARRATIVE INBOX THEME */
.commlink-theme {
    background-color: #020603;
}

.inbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-dim);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.inbox-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.unread-badge {
    background: var(--neon-magenta);
    color: #fff;
    font-size: 0.7rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
    box-shadow: var(--glow-magenta);
}

.commlink-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.empty-inbox {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    gap: 10px;
}

.glitch-icon {
    font-size: 2.5rem;
    animation: icon-flicker 3s infinite;
}

@keyframes icon-flicker {
    0%, 90%, 94%, 98%, 100% { opacity: 0.6; transform: scale(1); }
    92%, 96% { opacity: 0.2; transform: scale(0.9) rotate(5deg); }
}

.empty-inbox p {
    font-size: 0.85rem;
}

.empty-inbox .sub {
    font-size: 0.7rem;
    opacity: 0.6;
}

/* Email View */
.email-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-dim);
    background: rgba(0, 0, 0, 0.4);
    border-radius: 2px;
}

.email-header {
    border-bottom: 1px solid var(--border-dim);
    padding: 8px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 255, 102, 0.02);
}

.email-content {
    flex: 1;
    padding: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
    overflow-y: auto;
    color: #dfdfdf;
    border-bottom: 1px solid var(--border-dim);
}

.email-content p {
    margin-bottom: 10px;
}

.email-options {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opt-btn {
    font-family: var(--font-terminal);
    font-size: 0.8rem;
    padding: 6px 10px;
    background: rgba(255, 0, 85, 0.05);
    color: var(--neon-magenta);
    border: 1px solid var(--neon-magenta);
    cursor: pointer;
    text-align: left;
    border-radius: 2px;
    transition: all 0.2s;
}

.opt-btn:hover {
    background: var(--neon-magenta);
    color: #fff;
    box-shadow: var(--glow-magenta);
}

/* NOTIFICATIONS */
#notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10000;
}

.notif {
    width: 280px;
    padding: 12px 15px;
    background: rgba(1, 4, 2, 0.95);
    border-left: 4px solid var(--border-color);
    border-top: 1px solid var(--border-dim);
    border-right: 1px solid var(--border-dim);
    border-bottom: 1px solid var(--border-dim);
    color: #fff;
    font-size: 0.8rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.7);
    border-radius: 0 3px 3px 0;
    transform: translateX(120%);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notif.show {
    transform: translateX(0);
}

.notif-title {
    font-weight: bold;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.notif.info { border-left-color: var(--neon-cyan); }
.notif.success { border-left-color: var(--neon-green); }
.notif.alert { border-left-color: var(--neon-magenta); }
.notif.warning { border-left-color: var(--neon-yellow); }

.notif.info .notif-title { color: var(--neon-cyan); }
.notif.success .notif-title { color: var(--neon-green); }
.notif.alert .notif-title { color: var(--neon-magenta); }
.notif.warning .notif-title { color: var(--neon-yellow); }

/* --- GLITCH TEXT EFFECT --- */
.glitch {
    position: relative;
}

.glitch::before, .glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-darker);
}

.glitch::before {
    left: 2px;
    text-shadow: -1px 0 var(--neon-magenta);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -1.5px 0 var(--neon-cyan);
    clip: rect(85px, 450px, 140px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(15px, 9999px, 66px, 0); }
    10% { clip: rect(85px, 9999px, 5px, 0); }
    20% { clip: rect(27px, 9999px, 115px, 0); }
    30% { clip: rect(125px, 9999px, 40px, 0); }
    40% { clip: rect(3px, 9999px, 80px, 0); }
    50% { clip: rect(90px, 9999px, 34px, 0); }
    60% { clip: rect(110px, 9999px, 125px, 0); }
    70% { clip: rect(12px, 9999px, 75px, 0); }
    80% { clip: rect(85px, 9999px, 14px, 0); }
    90% { clip: rect(45px, 9999px, 95px, 0); }
    100% { clip: rect(60px, 9999px, 12px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(40px, 9999px, 105px, 0); }
    15% { clip: rect(75px, 9999px, 20px, 0); }
    35% { clip: rect(5px, 9999px, 90px, 0); }
    55% { clip: rect(120px, 9999px, 60px, 0); }
    75% { clip: rect(30px, 9999px, 110px, 0); }
    95% { clip: rect(95px, 9999px, 15px, 0); }
    100% { clip: rect(10px, 9999px, 85px, 0); }
}

/* --- EMERGENCY LOCKDOWN STYLES --- */

.text-lockdown {
    color: var(--neon-magenta) !important;
    text-shadow: var(--glow-magenta);
    font-weight: bold;
    animation: text-blink 0.8s infinite alternate;
}

@keyframes text-blink {
    0% { opacity: 0.25; }
    100% { opacity: 1; }
}

/* Red-Alert pulsing background for status bar under lockdown */
.status-bar.lockdown-active {
    border-bottom-color: var(--neon-magenta);
    box-shadow: 0 4px 15px rgba(255, 0, 85, 0.3);
    animation: status-flicker 1.5s infinite alternate;
}

@keyframes status-flicker {
    0% { background-color: var(--bg-darker); }
    100% { background-color: rgba(255, 0, 85, 0.08); }
}

/* Lockdown button overrides */
.hack-btn.lockdown-mode {
    border-color: var(--neon-magenta);
    color: var(--neon-magenta);
    background: rgba(255, 0, 85, 0.04);
    box-shadow: inset 0 0 15px rgba(255, 0, 85, 0.1);
}

.hack-btn.lockdown-mode:hover {
    background: rgba(255, 0, 85, 0.12);
    border-color: #ff3370;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.2), inset 0 0 15px rgba(255, 0, 85, 0.15);
}

.hack-btn.lockdown-mode:active {
    background: rgba(255, 0, 85, 0.25);
}

/* System Locked alert box */
.lockdown-alert-box {
    border: 2px dashed var(--neon-magenta);
    background: rgba(255, 0, 85, 0.05);
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    margin: 15px 0;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.1);
    animation: alert-box-pulse 2s infinite alternate;
}

@keyframes alert-box-pulse {
    0% { border-color: var(--neon-magenta); box-shadow: 0 0 10px rgba(255, 0, 85, 0.1); }
    100% { border-color: #ff5585; box-shadow: 0 0 20px rgba(255, 0, 85, 0.3); }
}

.lockdown-alert-title {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--neon-magenta);
    text-shadow: var(--glow-magenta);
    margin-bottom: 12px;
}

.lockdown-alert-p {
    font-size: 0.85rem;
    color: #dedede;
    margin-bottom: 15px;
    line-height: 1.4;
}

.lockdown-instructions {
    background: rgba(0, 0, 0, 0.85);
    border: 1px solid rgba(255, 0, 85, 0.3);
    padding: 12px;
    font-size: 0.8rem;
    color: var(--neon-yellow);
    border-radius: 3px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.lockdown-instructions strong {
    color: var(--neon-magenta);
}

.lockdown-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* --- DECRYPTION INTRUSION MINI-GAME STYLES --- */

.intrusion-theme {
    background-color: #010602 !important;
    display: flex;
    flex-direction: column;
    padding: 12px 15px;
    justify-content: space-between;
}

.intrusion-timer-bar {
    width: 100%;
    height: 8px;
    background-color: var(--bg-darker);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid var(--border-dim);
}

#intrusion-progress {
    width: 100%;
    height: 100%;
    background-color: var(--neon-cyan);
    box-shadow: var(--glow-cyan);
    transition: width 0.1s linear;
}

.intrusion-header {
    text-align: center;
    margin-bottom: 15px;
    font-size: 0.85rem;
}

.intrusion-target {
    font-family: var(--font-terminal);
    font-size: 1.9rem;
    font-weight: bold;
    color: var(--neon-cyan);
    text-shadow: var(--glow-cyan);
    margin-top: 6px;
    letter-spacing: 3px;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.15);
    padding: 6px 15px;
    display: inline-block;
    border-radius: 3px;
}

.intrusion-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.intrusion-btn {
    font-family: var(--font-terminal);
    font-size: 0.85rem;
    font-weight: bold;
    padding: 8px;
    background: rgba(0, 240, 255, 0.04);
    color: var(--neon-cyan);
    border: 1px solid rgba(0, 240, 255, 0.25);
    cursor: pointer;
    border-radius: 2px;
    text-align: center;
    transition: all 0.15s ease;
}

.intrusion-btn:hover {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.intrusion-btn:active {
    transform: scale(0.96);
    background: rgba(0, 240, 255, 0.3);
}

.intrusion-btn.wrong-choice {
    border-color: var(--neon-magenta) !important;
    color: var(--neon-magenta) !important;
    background: rgba(255, 0, 85, 0.12) !important;
    box-shadow: var(--glow-magenta) !important;
    animation: shake-btn 0.3s;
}

.intrusion-footer {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

#intrusion-timer-txt {
    color: var(--neon-yellow);
    font-weight: bold;
}

/* --- FLOATING VULNERABILITY ALERT WIDGET --- */

.vuln-alert-button {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(1, 6, 2, 0.96);
    border: 2px solid var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
    padding: 10px 24px;
    border-radius: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    z-index: 9999;
    animation: float-pulse 2.5s infinite ease-in-out;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.vuln-alert-button:hover {
    transform: translateX(-50%) scale(1.05) translateY(-2px);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 0 10px rgba(0, 255, 102, 0.3);
    border-color: var(--neon-green);
}

.vuln-alert-button:active {
    transform: translateX(-50%) scale(0.98);
}

.vuln-alert-icon {
    color: var(--neon-cyan);
    font-weight: bold;
    font-size: 1.15rem;
    animation: icon-scale-anim 1.5s infinite ease-in-out alternate;
}

.vuln-alert-text {
    font-family: var(--font-terminal);
    font-size: 0.85rem;
    font-weight: bold;
    color: #ffffff;
    letter-spacing: 0.8px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

.vuln-alert-timer {
    font-family: var(--font-terminal);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--neon-yellow);
    background: rgba(255, 234, 0, 0.1);
    padding: 1px 6px;
    border-radius: 10px;
    border: 1px solid rgba(255, 234, 0, 0.2);
}

/* Keyframes Animations */

@keyframes float-pulse {
    0% {
        transform: translateX(-50%) translateY(0px);
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    }
    50% {
        transform: translateX(-50%) translateY(-8px);
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.55), 0 0 10px rgba(0, 240, 255, 0.2);
    }
    100% {
        transform: translateX(-50%) translateY(0px);
        box-shadow: 0 0 15px rgba(0, 240, 255, 0.3);
    }
}

@keyframes shake-btn {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-4px); }
    40%, 80% { transform: translateX(4px); }
}

@keyframes icon-scale-anim {
    0% { transform: scale(1) rotate(0deg); color: var(--neon-cyan); }
    100% { transform: scale(1.3) rotate(15deg); color: var(--neon-yellow); text-shadow: 0 0 10px rgba(255, 234, 0, 0.6); }
}

.text-blink-slow {
    animation: text-blink-slow-anim 1.2s infinite alternate ease-in-out;
}

@keyframes text-blink-slow-anim {
    0% { opacity: 0.35; color: var(--neon-yellow); text-shadow: none; }
    100% { opacity: 1; color: var(--neon-yellow); text-shadow: 0 0 8px rgba(255, 234, 0, 0.5); }
}

/* --- FULLSCREEN FEEDBACK OVERLAY & CENTER BANNERS --- */

.feedback-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
}

.feedback-overlay.success-flash {
    background: radial-gradient(circle, rgba(0, 255, 102, 0.22) 0%, rgba(0, 255, 102, 0.04) 75%);
    animation: flash-overlay-anim 0.6s ease-out forwards;
}

.feedback-overlay.error-flash {
    background: radial-gradient(circle, rgba(255, 0, 85, 0.3) 0%, rgba(255, 0, 85, 0.05) 75%);
    animation: flash-overlay-anim 0.6s ease-out forwards;
}

@keyframes flash-overlay-anim {
    0% { opacity: 0; }
    15% { opacity: 1; }
    100% { opacity: 0; }
}

.banner-container {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 100001;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.giant-banner {
    background: rgba(1, 4, 2, 0.96);
    border-top: 3px solid var(--border-color);
    border-bottom: 3px solid var(--border-color);
    width: 100%;
    padding: 22px 0;
    text-align: center;
    transform: scaleY(0);
    opacity: 0;
    filter: blur(10px);
    animation: banner-slide-in-anim 1.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.giant-banner.banner-success {
    border-color: var(--neon-green);
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.45), inset 0 0 15px rgba(0, 255, 102, 0.15);
}

.giant-banner.banner-error {
    border-color: var(--neon-magenta);
    box-shadow: 0 0 35px rgba(255, 0, 85, 0.45), inset 0 0 15px rgba(255, 0, 85, 0.15);
}

.banner-title {
    font-family: var(--font-terminal);
    font-size: 2.3rem;
    font-weight: bold;
    letter-spacing: 6px;
    margin-bottom: 6px;
}

.banner-success .banner-title {
    color: var(--neon-green);
    text-shadow: var(--glow-green);
}

.banner-error .banner-title {
    color: var(--neon-magenta);
    text-shadow: var(--glow-magenta);
}

.banner-subtitle {
    font-family: var(--font-terminal);
    font-size: 1.05rem;
    color: #e0e0e0;
    letter-spacing: 2.5px;
}

@keyframes banner-slide-in-anim {
    0% { transform: scaleY(0); opacity: 0; filter: blur(10px); }
    12% { transform: scaleY(1); opacity: 1; filter: blur(0); }
    85% { transform: scaleY(1); opacity: 1; filter: blur(0); }
    98% { opacity: 0; filter: blur(10px); }
    100% { transform: scaleY(0); opacity: 0; }
}

/* --- ACTIVE LOGS CLEANER GAUGE STYLES --- */

.logs-cleaner-gauge {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: rgba(0, 255, 102, 0.02);
    border: 1px solid var(--border-dim);
    padding: 10px;
    border-radius: 3px;
}

.gauge-label {
    font-family: var(--font-terminal);
    font-size: 0.8rem;
    color: var(--text-primary);
    font-weight: bold;
    letter-spacing: 0.5px;
}

.gauge-container {
    width: 100%;
    height: 24px;
    background: var(--bg-darker);
    border: 1px solid var(--border-dim);
    position: relative;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.gauge-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #ffea00, var(--neon-magenta));
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
    transition: width 0.2s ease-out;
}

.gauge-txt {
    position: absolute;
    width: 100%;
    text-align: center;
    font-family: var(--font-terminal);
    font-weight: bold;
    font-size: 0.95rem;
    color: #ffffff;
    text-shadow: 0 1px 4px #000, 0 -1px 4px #000, 1px 0 4px #000, -1px 0 4px #000;
}

.gauge-sub {
    font-family: var(--font-terminal);
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: right;
    margin-top: 2px;
}

/* --- MOBILE & TABLET RESPONSIVENESS SYSTEM --- */

.mobile-taskbar {
    display: none; /* Hidden by default on desktop */
}

@media (max-width: 768px) {
    /* Reveal and style the mobile bottom navigation taskbar */
    .mobile-taskbar {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 55px;
        background-color: var(--bg-darker);
        border-top: 2px solid var(--border-dim);
        justify-content: space-around;
        align-items: center;
        z-index: 10000;
        box-shadow: 0 -4px 15px rgba(0, 255, 102, 0.1);
        padding: 0 5px;
    }

    .taskbar-item {
        background: none;
        border: none;
        font-size: 1.4rem;
        cursor: pointer;
        padding: 6px 12px;
        border-radius: 4px;
        color: var(--text-muted);
        transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .taskbar-item:hover {
        background: rgba(0, 240, 255, 0.05);
        color: var(--neon-cyan);
    }

    .taskbar-item.active-item {
        background: rgba(0, 255, 102, 0.06);
        color: var(--neon-green);
        border-bottom: 2px solid var(--neon-green);
        text-shadow: var(--glow-green);
        filter: drop-shadow(0 0 4px var(--neon-green));
    }

    /* Convert absolute floating windows into full-viewport stacked windows */
    .window {
        display: none !important; /* Hide all windows by default on mobile */
        position: fixed !important;
        top: 45px !important;
        left: 8px !important;
        width: calc(100% - 16px) !important;
        height: calc(100% - 112px) !important;
        max-height: calc(100% - 112px) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.85);
        z-index: 100 !important;
    }

    /* Show only the active/toggled window */
    .window.mobile-visible {
        display: flex !important;
    }

    /* Let overlays always sit on top */
    #win-tutorial, #win-intrusion {
        z-index: 100000 !important;
    }

    /* Adjust Status Bar metrics to fit tight phone displays (down to 320px) */
    .status-bar {
        font-size: 0.72rem;
        height: 45px;
        padding: 0 8px;
    }

    .status-left, .status-middle {
        gap: 6px;
    }

    .status-right {
        gap: 4px;
    }

    .status-divider {
        display: none; /* Hide dividers to conserve horizontal space */
    }

    .status-left .status-sec {
        display: none; /* Hide 'Architect: LoikH' text in header, it's visible in INFO/TUTO anyway */
    }

    .stat-counter {
        gap: 2px;
        padding: 1px 4px;
        background: none;
        border: none;
    }

    .stat-counter .label {
        display: none; /* Hide text labels (LINES OF CODE, etc.), keep only colored numbers! */
    }

    .stat-counter .value {
        font-size: 0.95rem;
    }

    #time-display {
        display: none; /* Hide clock on mobile to make room for currency counts */
    }

    /* Disable drag header move cursor visual on touchscreens */
    .window-header {
        cursor: default;
    }

    /* Touch-friendly compilation and action button sizing */
    .hack-btn {
        height: 54px;
        font-size: 1rem;
    }

    /* Adjust Hex Matching Grid columns on tiny screens */
    .intrusion-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 6px !important;
    }

    .intrusion-target {
        font-size: 1.5rem;
        padding: 4px 10px;
    }

    /* Reposition vulnerability alert above mobile taskbar */
    .vuln-alert-button {
        width: calc(100% - 24px) !important;
        bottom: 68px !important;
        padding: 8px 16px;
        justify-content: center;
    }
}

/* --- ACHIEVEMENT SYSTEM STYLES --- */
.achievement-item {
    transition: all 0.3s ease;
}
.achievement-item:hover {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 243, 255, 0.05) !important;
}
.achievement-item.unlocked {
    box-shadow: inset 0 0 10px rgba(0, 255, 102, 0.1);
}

/* --- MINI-GAME EXTRA STYLES --- */
.simon-btn {
    transition: all 0.1s ease;
    cursor: pointer;
}
.simon-btn:active {
    transform: scale(0.95);
}
.brute-container {
    border-radius: 4px;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.5);
}

/* Custom styled validation button for Brute Force mini-game */
#brute-action-btn {
    border-color: var(--neon-magenta) !important;
    color: var(--neon-magenta) !important;
    background: rgba(255, 0, 85, 0.05) !important;
    box-shadow: inset 0 0 15px rgba(255, 0, 85, 0.1) !important;
}
#brute-action-btn:hover {
    background: rgba(255, 0, 85, 0.18) !important;
    box-shadow: 0 0 15px rgba(255, 0, 85, 0.35), inset 0 0 15px rgba(255, 0, 85, 0.1) !important;
    border-color: var(--neon-magenta) !important;
}
#brute-action-btn:active {
    transform: scale(0.97) !important;
    background: rgba(255, 0, 85, 0.3) !important;
}



