/* HACKR.EXE - Windows 95 Styling */

:root {
    --win95-bg: #008080;
    --win95-gray: #c0c0c0;
    --win95-dark: #808080;
    --win95-light: #ffffff;
    --win95-darker: #404040;
    --win95-blue: #000080;
    --win95-text: #000000;
    --terminal-green: #00ff00;
    --terminal-bg: #0a0a0a;
    --danger-red: #ff0000;
    --money-green: #00aa00;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'MS Sans Serif';
    src: local('MS Sans Serif'), local('Segoe UI'), local('Tahoma');
}

body {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
    font-size: 11px;
    background: var(--win95-bg);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    user-select: none;
}

/* Classic beveled button/panel effect */
.bevel-out {
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
}

.bevel-in {
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

/* Desktop */
#desktop {
    width: 100%;
    /* sits below the fixed 24px resource bar, above the 28px taskbar */
    height: calc(100vh - 24px - 28px);
    margin-top: 24px;
    position: relative;
    padding: 10px;
}

/* Desktop Icons */
.desktop-icon {
    width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5px;
    cursor: pointer;
    margin-bottom: 10px;
}

.desktop-icon:hover {
    background: rgba(0, 0, 128, 0.3);
}

.desktop-icon.selected {
    background: var(--win95-blue);
}

.desktop-icon .icon {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    image-rendering: pixelated;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.desktop-icon .label {
    color: white;
    text-align: center;
    text-shadow: 1px 1px 1px black;
    font-size: 11px;
    word-wrap: break-word;
    max-width: 100%;
}

/* Icon Grid */
#icon-grid {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    height: 100%;
    align-content: flex-start;
    gap: 5px;
}

/* Taskbar */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: var(--win95-gray);
    border-top: 2px solid var(--win95-light);
    display: flex;
    align-items: center;
    padding: 2px 4px;
    z-index: 9999;
}

#start-button {
    height: 22px;
    padding: 2px 6px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 11px;
}

#start-button:active {
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

#start-button .icon {
    width: 16px;
    height: 16px;
}

#taskbar-programs {
    flex: 1;
    display: flex;
    gap: 2px;
    margin-left: 4px;
    overflow: hidden;
}

.taskbar-program {
    height: 22px;
    min-width: 120px;
    max-width: 160px;
    padding: 2px 6px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.taskbar-program.active {
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    background: #dfdfdf;
}

#system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    height: 22px;
    font-size: 11px;
}

/* Windows */
.window {
    position: absolute;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    min-width: 200px;
    min-height: 100px;
    display: none;
    flex-direction: column;
    box-shadow: 2px 2px 0 rgba(0,0,0,0.3);
}

.window.visible {
    display: flex;
}

.window.maximized {
    /* below the 24px resource bar (so the titlebar stays visible/clickable),
       above the 18px news ticker + 28px taskbar */
    top: 24px !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - 24px - 46px) !important;
}

.window-titlebar {
    background: linear-gradient(90deg, var(--win95-blue), #1084d0);
    color: white;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    cursor: move;
    height: 18px;
}

.window.inactive .window-titlebar {
    background: linear-gradient(90deg, #808080, #a0a0a0);
}

.window-title {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
}

.window-title .icon {
    width: 14px;
    height: 14px;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-btn {
    width: 16px;
    height: 14px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Marlett', sans-serif;
}

.window-btn:active {
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

.window-menubar {
    background: var(--win95-gray);
    padding: 2px;
    border-bottom: 1px solid var(--win95-dark);
}

.window-menubar span {
    padding: 2px 8px;
    cursor: pointer;
}

.window-menubar span:hover {
    background: var(--win95-blue);
    color: white;
}

.window-content {
    flex: 1;
    overflow: auto;
    padding: 8px;
    background: var(--win95-gray);
}

.window-statusbar {
    background: var(--win95-gray);
    border-top: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    padding: 2px 4px;
    font-size: 11px;
    display: flex;
    gap: 4px;
}

.status-section {
    padding: 0 4px;
    border: 1px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

/* Terminal Styling */
.terminal-window .window-content {
    background: var(--terminal-bg);
    color: var(--terminal-green);
    font-family: 'Courier New', monospace;
    padding: 0;
}

.terminal-output {
    padding: 8px;
    height: calc(100% - 60px);
    overflow-y: auto;
    font-size: 12px;
    line-height: 1.4;
}

.terminal-output .line {
    margin-bottom: 2px;
}

.terminal-output .success {
    color: #00ff00;
}

.terminal-output .error {
    color: #ff4444;
}

.terminal-output .warning {
    color: #ffaa00;
}

.terminal-output .info {
    color: #00aaff;
}

.terminal-output .critical {
    color: #ff00ff;
    font-weight: bold;
    text-shadow: 0 0 5px #ff00ff;
}

.terminal-input-area {
    display: flex;
    padding: 8px;
    border-top: 1px solid #333;
    background: #0f0f0f;
}

.terminal-prompt {
    color: var(--terminal-green);
    margin-right: 8px;
}

.terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--terminal-green);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    outline: none;
}

/* Hack Button */
#hack-button {
    width: 100%;
    padding: 20px;
    margin-top: 10px;
    background: #1a1a1a;
    border: 2px solid var(--terminal-green);
    color: var(--terminal-green);
    font-family: 'Courier New', monospace;
    font-size: 18px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.1s;
}

#hack-button:hover {
    background: #0f3f0f;
    box-shadow: 0 0 10px var(--terminal-green);
}

#hack-button:active {
    transform: scale(0.98);
    box-shadow: 0 0 20px var(--terminal-green);
}

/* Resource Display */
#resource-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 24px;
    background: var(--win95-gray);
    border-bottom: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 20px;
    z-index: 9998;
    font-size: 11px;
}

.resource-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.resource-icon {
    font-size: 14px;
}

.resource-value {
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.resource-rate {
    color: #666;
    font-size: 10px;
}

/* Heat Meter */
#heat-meter {
    width: 100px;
    height: 12px;
    background: #333;
    border: 1px solid #666;
    position: relative;
    overflow: hidden;
}

#heat-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff00, #ffff00, #ff0000);
    width: 0%;
    transition: width 0.3s;
}

/* Buttons */
.win95-button {
    padding: 4px 12px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    cursor: pointer;
    font-size: 11px;
    font-family: inherit;
}

.win95-button:active {
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

.win95-button:disabled {
    color: #808080;
    cursor: not-allowed;
}

.win95-button.primary {
    font-weight: bold;
    border: 3px solid;
    border-color: #000 #000 #000 #000;
    outline: 1px solid var(--win95-dark);
}

/* Input Fields */
.win95-input {
    padding: 3px 4px;
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    font-family: inherit;
    font-size: 11px;
}

/* Lists */
.win95-list {
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    padding: 2px;
    max-height: 200px;
    overflow-y: auto;
}

.win95-list-item {
    padding: 2px 4px;
    cursor: pointer;
}

.win95-list-item:hover {
    background: var(--win95-blue);
    color: white;
}

.win95-list-item.selected {
    background: var(--win95-blue);
    color: white;
}

/* Tabs */
.win95-tabs {
    display: flex;
    margin-bottom: -2px;
}

.win95-tab {
    padding: 4px 12px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    cursor: pointer;
    position: relative;
    z-index: 1;
    margin-right: 2px;
}

.win95-tab.active {
    background: var(--win95-gray);
    border-bottom-color: var(--win95-gray);
    z-index: 2;
}

.win95-tab-content {
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    padding: 10px;
    background: var(--win95-gray);
}

/* Progress Bars */
.progress-bar {
    height: 16px;
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--win95-blue);
    transition: width 0.3s;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 10px;
}

/* Upgrade Cards */
.upgrade-card {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.upgrade-card.owned {
    background: #a0ffa0;
}

.upgrade-card.locked {
    opacity: 0.6;
}

.upgrade-info h4 {
    margin-bottom: 4px;
}

.upgrade-info p {
    font-size: 10px;
    color: #444;
}

.upgrade-cost {
    text-align: right;
}

/* Skill Tree */
.skill-tree {
    display: flex;
    gap: 10px;
    padding: 8px;
    overflow-x: auto;
    align-items: flex-start;
}

.skill-branch {
    flex: 0 0 170px;
    width: 170px;
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    padding: 6px;
}

.skill-branch h3 {
    text-align: center;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--win95-dark);
    font-size: 12px;
}

.skill-node {
    padding: 5px;
    margin-bottom: 5px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}

.skill-node strong { font-size: 10px; }

.skill-node.locked {
    opacity: 0.45;
    cursor: not-allowed;
}

.skill-node.owned {
    background: #a0a0ff;
    border-color: var(--win95-blue);
}

.skill-node.available {
    background: #d8ffd8;
    border-color: #2a2;
    box-shadow: 0 0 4px rgba(0,180,0,0.5);
}

.skill-node:hover:not(.locked) {
    background: #e0e0e0;
}

/* Email Client */
.email-list {
    width: 200px;
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    height: 100%;
    overflow-y: auto;
}

.email-item {
    padding: 4px 8px;
    border-bottom: 1px solid #ccc;
    cursor: pointer;
}

.email-item:hover {
    background: var(--win95-blue);
    color: white;
}

.email-item.unread {
    font-weight: bold;
}

.email-preview {
    flex: 1;
    padding: 10px;
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    margin-left: 8px;
    overflow-y: auto;
}

/* Network Map */
.network-map {
    width: 100%;
    flex: 1;
    min-height: 260px;
    background: #000813;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(rgba(0,80,40,0.18) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,80,40,0.18) 1px, transparent 1px);
    background-size: 24px 24px;
}

.network-node {
    position: absolute;
    width: 64px;
    height: 58px;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.15s;
}

.network-node:hover {
    transform: translate(-50%, -50%) scale(1.12);
    z-index: 5;
}

.network-node .net-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a3;
    background: #001a10;
    box-shadow: 0 0 6px rgba(0,255,120,0.25);
}

.network-node .net-label {
    font-size: 9px;
    color: #00ff88;
    text-align: center;
    margin-top: 3px;
    text-shadow: 0 0 3px #000, 1px 1px 0 #000;
    line-height: 1.1;
    max-width: 90px;
}

.network-node .net-check { display: inline-block; vertical-align: middle; }

.network-node.hacked .net-icon { border-color: #00ff00; box-shadow: 0 0 8px rgba(0,255,0,0.5); }
.network-node.available .net-icon { border-color: #ffcc00; box-shadow: 0 0 8px rgba(255,204,0,0.5); }
.network-node.locked .net-icon { border-color: #660000; opacity: 0.55; }
.network-node.locked .net-label { color: #886; }
.network-node.selected .net-icon { border-color: #fff; box-shadow: 0 0 10px #fff; }

/* Phishing */
.phishing-compose {
    background: white;
    padding: 10px;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
}

.phishing-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 10px;
}

.phish-stat {
    text-align: center;
    padding: 10px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
}

.phish-stat .value {
    font-size: 18px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* Bank Window */
.bank-balance {
    font-size: 32px;
    font-family: 'Courier New', monospace;
    text-align: center;
    padding: 20px;
    background: #0a0a0a;
    color: var(--money-green);
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    margin-bottom: 10px;
}

.bank-transactions {
    background: white;
    border: 2px solid;
    border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    height: 150px;
    overflow-y: auto;
    padding: 8px;
}

.transaction {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #eee;
    font-size: 11px;
}

.transaction.income .amount {
    color: green;
}

.transaction.expense .amount {
    color: red;
}

/* Start Menu */
#start-menu {
    position: fixed;
    bottom: 28px;
    left: 0;
    width: 200px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: none;
    z-index: 10000;
}

#start-menu.visible {
    display: block;
}

#start-menu-sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 24px;
    background: linear-gradient(180deg, var(--win95-dark), var(--win95-blue));
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 10px;
    letter-spacing: 1px;
}

#start-menu-items {
    margin-left: 24px;
    padding: 4px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
}

.start-menu-item:hover {
    background: var(--win95-blue);
    color: white;
}

.start-menu-divider {
    height: 2px;
    margin: 4px 0;
    border-top: 1px solid var(--win95-dark);
    border-bottom: 1px solid var(--win95-light);
}

/* Notifications */
.notification {
    position: fixed;
    right: 10px;
    padding: 10px 15px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    z-index: 10001;
    max-width: 300px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-title {
    font-weight: bold;
    margin-bottom: 5px;
}

/* Scrollbars - Win95 style */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #c0c0c0;
    background-image: url("data:image/svg+xml,%3Csvg width='2' height='2' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='1' height='1' fill='%23c0c0c0'/%3E%3Crect x='1' width='1' height='1' fill='%23ffffff'/%3E%3Crect y='1' width='1' height='1' fill='%23ffffff'/%3E%3Crect x='1' y='1' width='1' height='1' fill='%23c0c0c0'/%3E%3C/svg%3E");
}

::-webkit-scrollbar-thumb {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
}

::-webkit-scrollbar-button {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    display: block;
}

/* Dialog/Message Box */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10002;
}

.dialog {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    min-width: 300px;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.dialog-content {
    padding: 20px;
    display: flex;
    gap: 15px;
}

.dialog-icon {
    font-size: 32px;
}

.dialog-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    padding: 10px;
    border-top: 1px solid var(--win95-dark);
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: #ffffcc;
    border: 1px solid #000;
    padding: 4px 8px;
    font-size: 11px;
    z-index: 10003;
    pointer-events: none;
    max-width: 200px;
}

/* Loading/Boot Screen */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #000;
    color: #aaa;
    font-family: 'Courier New', monospace;
    padding: 20px;
    z-index: 10004;
    overflow: hidden;
}

#boot-screen.hidden {
    display: none;
}

#boot-text {
    font-size: 14px;
    line-height: 1.6;
}

/* Animations */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.cursor-blink {
    animation: blink 1s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(2px, -2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(2px, 2px); }
    100% { transform: translate(0); }
}

.glitch {
    animation: glitch 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 800px) {
    .window {
        width: 100% !important;
        height: calc(100vh - 52px) !important;
        top: 24px !important;
        left: 0 !important;
    }
}

/* ============================================================
   Phase 0 additions: pixel icons, news ticker, world bar,
   tray button, assistant (BONZO.DLL)
   ============================================================ */

/* Pixel-art icons */
.pico { image-rendering: pixelated; image-rendering: crisp-edges; vertical-align: middle; }
.ico, .ico-inline { display: inline-flex; align-items: center; vertical-align: middle; }
.ico-inline { margin-right: 2px; }
.resource-icon .pico { width: 16px; height: 16px; }
.desktop-icon .icon .pico { width: 32px; height: 32px; }
.dialog-icon .pico { width: 40px; height: 40px; }

/* News ticker (satirical headlines) */
#news-ticker {
    position: fixed;
    bottom: 28px;            /* sits just above the taskbar */
    left: 0; right: 0;
    height: 18px;
    background: #000080;
    color: #00ff66;
    font-size: 11px;
    line-height: 18px;
    overflow: hidden;
    white-space: nowrap;
    z-index: 90;
    border-top: 1px solid #000;
}
#news-track {
    display: inline-block;
    padding-left: 100%;
    animation: news-scroll 40s linear infinite;
}
@keyframes news-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-100%); }
}

/* NetMap world bar */
#world-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 6px;
    margin-bottom: 6px;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    font-weight: bold;
}
#world-bar button { padding: 1px 8px; }
#world-progress { font-size: 11px; color: #333; font-weight: normal; }

/* System-tray sound toggle */
.tray-btn {
    cursor: pointer;
    padding: 0 6px;
    margin-right: 6px;
    border: 1px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    font-size: 10px;
}
.tray-btn.off { color: #a00; }

/* "NEW" mail tag */
.new-tag {
    background: #a00; color: #fff;
    font-size: 8px; font-weight: bold;
    padding: 0 3px; border-radius: 2px;
    vertical-align: middle;
}

/* Assistant: BONZO.DLL */
#clippy {
    position: fixed;
    right: 16px;
    bottom: 44px;
    z-index: 4000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}
.clippy-sprite {
    width: 52px; height: 52px;
    display: flex; align-items: center; justify-content: center;
    background: var(--win95-gray);
    border: 2px solid;
    border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
    cursor: pointer;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
.clippy-sprite.wiggle { animation: clippy-wiggle 0.4s ease-in-out 2; }
@keyframes clippy-wiggle {
    0%,100% { transform: rotate(0); }
    25% { transform: rotate(-6deg); }
    75% { transform: rotate(6deg); }
}
.clippy-bubble {
    position: relative;
    width: 240px;
    margin-bottom: 8px;
    padding: 10px;
    background: #ffffe1;
    border: 1px solid #000;
    box-shadow: 3px 3px 8px rgba(0,0,0,0.4);
    font-size: 12px;
    line-height: 1.4;
}
.clippy-buttons {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.clippy-buttons button { padding: 2px 8px; font-size: 11px; }
.clippy-tail {
    position: absolute;
    bottom: -8px; right: 20px;
    width: 0; height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #ffffe1;
}

/* Tutorial highlight pulse */
.tutorial-highlight {
    outline: 3px solid #ffcc00 !important;
    outline-offset: 2px;
    animation: tut-pulse 1s ease-in-out infinite;
    position: relative;
    z-index: 3500;
}
@keyframes tut-pulse {
    0%,100% { outline-color: #ffcc00; }
    50% { outline-color: #ff6600; }
}

/* ============================================================
   Phase 1: Staff (idle buildings) + Achievements
   ============================================================ */

/* Staff panel */
#staff-list { display: flex; flex-direction: column; height: 100%; }
.staff-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 6px 8px; gap: 8px;
    background: var(--win95-gray);
    border-bottom: 2px solid var(--win95-dark);
    flex-wrap: wrap;
}
.staff-amounts { display: flex; align-items: center; gap: 3px; }
.staff-amt { padding: 1px 6px !important; font-size: 10px; min-width: 26px; }
.staff-amt.active { border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark); background: #dfdfdf; font-weight: bold; }
.staff-rows { flex: 1; overflow-y: auto; background: #ececec; }

.staff-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px;
    border-bottom: 1px solid #bbb;
    cursor: pointer;
    background: linear-gradient(#fff, #eee);
}
.staff-row:hover { background: linear-gradient(#eef4ff, #dae8ff); }
.staff-row.cant-afford { opacity: 0.55; cursor: not-allowed; background: #e6e6e6; }
.staff-ico {
    width: 34px; height: 34px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid; border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    background: #fff;
}
.staff-main { flex: 1; min-width: 0; }
.staff-name { font-weight: bold; font-size: 12px; }
.staff-owned {
    display: inline-block; margin-left: 4px; padding: 0 5px;
    background: var(--win95-blue); color: #fff; border-radius: 8px; font-size: 10px;
}
.staff-flavor { font-size: 10px; color: #555; font-style: italic; margin: 1px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-dps { font-size: 10px; color: var(--money-green); font-weight: bold; }
.staff-cost { text-align: right; flex-shrink: 0; }
.staff-buyn { font-size: 9px; color: #888; }
.staff-price { font-weight: bold; font-size: 12px; color: #006000; }
.staff-locked { padding: 10px 8px; text-align: center; color: #888; font-style: italic; font-size: 11px; }

/* Achievements */
#ach-list { display: flex; flex-direction: column; height: 100%; }
.ach-header {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
    padding: 6px 8px; margin-bottom: 6px;
    background: var(--win95-gray);
    border: 2px solid; border-color: var(--win95-light) var(--win95-dark) var(--win95-dark) var(--win95-light);
}
.ach-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; padding: 2px; }
.ach-card {
    border: 2px solid; border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark);
    padding: 6px; background: #fff; font-size: 10px; min-height: 46px;
}
.ach-card.locked { background: #d8d8d8; color: #888; }
.ach-card.earned { background: #fffbe0; border-color: #d4af37; }
.ach-name { font-weight: bold; font-size: 11px; margin-bottom: 2px; }
.ach-card.earned .ach-name { color: #a07800; }
.ach-desc { font-size: 9px; line-height: 1.2; }

/* ============================================================
   Phase 2: Glitch-in-the-Matrix events (golden-cookie analog)
   ============================================================ */
.glitch-packet {
    position: fixed;
    width: 48px; height: 48px;
    z-index: 5000;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: rgba(160,0,160,0.15);
    border: 1px solid #a000a0;
    box-shadow: 0 0 12px 3px rgba(0,255,120,0.6), 0 0 20px 6px rgba(160,0,160,0.4);
    animation: glitch-bob 0.9s ease-in-out infinite, glitch-hue 0.5s steps(2) infinite;
}
.glitch-packet:hover { transform: scale(1.15); }
@keyframes glitch-bob {
    0%,100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
@keyframes glitch-hue {
    0% { filter: hue-rotate(0deg); box-shadow: 0 0 12px 3px rgba(0,255,120,0.6); }
    100% { filter: hue-rotate(90deg); box-shadow: 0 0 14px 4px rgba(255,0,200,0.6); }
}

.glitch-flash {
    position: fixed;
    z-index: 5001;
    color: #00ff88;
    font-weight: bold;
    font-size: 14px;
    text-shadow: 1px 1px 2px #000, 0 0 6px #00ff88;
    pointer-events: none;
    animation: glitch-float 1.5s ease-out forwards;
}
@keyframes glitch-float {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-40px); }
}

#buff-indicator {
    position: fixed;
    top: 26px; left: 50%;
    transform: translateX(-50%);
    z-index: 95;
    display: none;
    padding: 2px 12px;
    background: #001a10;
    color: #00ff88;
    border: 1px solid #00ff88;
    font-size: 12px;
    box-shadow: 0 0 8px rgba(0,255,120,0.5);
}
#buff-indicator.cursed {
    background: #1a0000;
    color: #ff5555;
    border-color: #ff5555;
    box-shadow: 0 0 8px rgba(255,0,0,0.5);
}
#buff-indicator svg { vertical-align: middle; }

/* ============================================================
   Phase 2: Fed Wiretaps (wrinklers) + Zero-Day lumps
   ============================================================ */
#wiretap-layer { position: fixed; inset: 0; pointer-events: none; z-index: 4500; }
.wiretap {
    position: fixed;
    width: 40px; height: 40px;
    pointer-events: auto;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    filter: drop-shadow(0 0 4px #f00);
    animation: wiretap-creep 1.4s ease-in-out infinite;
}
.wiretap:hover { transform: scale(1.2); }
.wiretap-belly {
    font-size: 8px; color: #ff8888; font-weight: bold;
    background: rgba(0,0,0,0.7); padding: 0 3px; border-radius: 2px;
    text-shadow: none; white-space: nowrap;
}
@keyframes wiretap-creep {
    0%,100% { transform: translateY(0) rotate(-3deg); }
    50% { transform: translateY(-3px) rotate(3deg); }
}

/* Zero-Day panel */
#zeroday-panel { font-size: 12px; }
.zd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.zd-icon { flex-shrink: 0; }
.zd-count { font-size: 16px; font-weight: bold; color: #a000a0; }
.zd-count span { font-size: 11px; font-weight: normal; color: #333; }
.zd-sub { font-size: 11px; color: #555; }
.zd-progress { margin: 8px 0; }
.zd-timer { font-size: 10px; color: #666; text-align: center; margin-top: 3px; }
.zd-note { font-size: 9px; color: #777; font-style: italic; margin-top: 8px; line-height: 1.3; }

/* ============================================================
   Phase 3: PhishMail generated email display
   ============================================================ */
.phish-mail { background: #fff; border: 1px solid #999; padding: 6px; margin-bottom: 6px; font-size: 11px; }
.phish-from, .phish-subj { color: #333; margin-bottom: 2px; }
.phish-body { margin-top: 5px; white-space: normal; line-height: 1.35; color: #111; border-top: 1px dashed #ccc; padding-top: 4px; }
.phish-hint { font-size: 9px; color: #777; font-style: italic; }
.phish-verdict { font-weight: bold; margin: 3px 0; }
.phish-verdict.ok { color: #007000; }
.phish-verdict.bad { color: #a00000; }
.phish-reply { font-style: italic; color: #444; font-size: 11px; }
.phish-cash { font-weight: bold; color: #006000; margin-top: 3px; }

/* ============================================================
   Phase 4: Worlds - boss nodes + world bar polish
   ============================================================ */
.network-node.boss .net-icon {
    border-color: #ffcc00;
    box-shadow: 0 0 10px 2px rgba(255,80,0,0.7);
    animation: boss-pulse 1.2s ease-in-out infinite;
}
.network-node.boss .net-label { color: #ffcc33; font-weight: bold; }
@keyframes boss-pulse {
    0%,100% { box-shadow: 0 0 8px 1px rgba(255,80,0,0.6); }
    50% { box-shadow: 0 0 14px 4px rgba(255,180,0,0.9); }
}
.boss-tag {
    background: #a00; color: #fff; font-size: 9px; font-weight: bold;
    padding: 0 4px; border-radius: 2px; vertical-align: middle;
}
#world-name { min-width: 120px; text-align: center; }

/* ============================================================
   Phase 5: Ascension (ROOT.exe)
   ============================================================ */
#ascension-panel { display: flex; flex-direction: column; height: 100%; }
.asc-header {
    padding: 8px; background: linear-gradient(#2a0a3a, #12001f); color: #e0b0ff;
    border-bottom: 2px solid #a000a0;
}
.asc-keys { font-size: 15px; }
.asc-keys .pico { vertical-align: middle; }
.asc-sub { font-size: 10px; color: #b080c0; margin-top: 2px; }
.asc-grid { flex: 1; overflow-y: auto; background: #ececec; }
.asc-card {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 8px; border-bottom: 1px solid #bbb; cursor: pointer;
    background: linear-gradient(#fff, #f0e8f5);
}
.asc-card:hover { background: linear-gradient(#f6ecff, #e8d8f5); }
.asc-card.cant { opacity: 0.55; cursor: not-allowed; }
.asc-card.maxed { background: #efe0ff; }
.asc-card.afford { box-shadow: inset 3px 0 0 #a000a0; }
.asc-ico { width: 30px; height: 30px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    border: 2px solid; border-color: var(--win95-dark) var(--win95-light) var(--win95-light) var(--win95-dark); background: #fff; }
.asc-main { flex: 1; min-width: 0; }
.asc-name { font-weight: bold; font-size: 12px; }
.asc-lv { font-size: 10px; color: #808; font-weight: normal; }
.asc-desc { font-size: 10px; color: #555; }
.asc-cost { font-weight: bold; font-size: 12px; color: #7000a0; flex-shrink: 0; }

/* ============================================================
   Phase 6: The Arcade
   ============================================================ */
#arcade-body { height: 100%; display: flex; flex-direction: column; background: #101018; color: #cfe; }
.arcade-menu-head { padding: 8px; text-align: center; color: #0f8; font-weight: bold; border-bottom: 1px solid #0a4; }
.arcade-grid { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 10px; }
.arcade-cab { background: linear-gradient(#1a1a2a,#0d0d18); border: 2px solid #0a5; border-radius: 3px; padding: 8px; cursor: pointer; text-align: center; transition: transform .1s; }
.arcade-cab:hover { transform: translateY(-2px); border-color: #0f8; box-shadow: 0 0 8px rgba(0,255,120,.4); }
.arcade-cab-ico { display: flex; justify-content: center; margin-bottom: 4px; }
.arcade-cab-name { font-weight: bold; color: #0f8; font-size: 12px; }
.arcade-cab-desc { font-size: 9px; color: #9ab; margin-top: 3px; line-height: 1.2; }

.arcade-bar { display: flex; align-items: center; gap: 10px; padding: 5px 8px; background: #0a0a12; border-bottom: 1px solid #0a5; }
.arcade-title { font-weight: bold; color: #0f8; }
.arcade-hint { font-size: 10px; color: #9ab; margin-left: auto; }
.arcade-stage { flex: 1; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.arcade-canvas { width: 100%; height: 100%; display: block; background: #000; }
.arcade-over { text-align: center; color: #0f8; font-size: 16px; line-height: 1.8; }

/* Cipher Lock */
.cipher-wrap { text-align: center; padding: 10px; }
.cipher-dials { display: flex; gap: 6px; justify-content: center; align-items: center; margin-bottom: 8px; }
.cipher-dial { width: 40px; height: 48px; font-size: 22px; font-family: monospace; background: #0a0a12; color: #0f8; border: 2px solid #0a5; cursor: pointer; }
.cipher-tries { color: #9ab; font-size: 11px; margin-bottom: 6px; }
.cipher-history { font-family: monospace; font-size: 14px; max-height: 160px; overflow-y: auto; }
.cipher-row { display: flex; justify-content: center; gap: 12px; padding: 2px; }
.cipher-row .pegs { color: #0f8; }

/* Brute Force */
.brute-wrap { width: 90%; text-align: center; }
.brute-label { color: #9ab; margin-bottom: 8px; font-size: 12px; }
.brute-bar { position: relative; height: 30px; background: #0a0a12; border: 2px solid #0a5; margin-bottom: 10px; }
.brute-zone { position: absolute; top: 0; bottom: 0; background: rgba(0,255,120,0.4); border-left: 1px solid #0f8; border-right: 1px solid #0f8; }
.brute-cursor { position: absolute; top: -2px; bottom: -2px; width: 3px; background: #fff; }

/* ICE Breaker */
.ice-wrap { text-align: center; }
.ice-round { color: #0f8; margin-bottom: 8px; font-weight: bold; }
.ice-grid { display: grid; grid-template-columns: repeat(2, 90px); gap: 8px; }
.ice-pad { width: 90px; height: 90px; border-radius: 6px; cursor: pointer; opacity: 0.55; }
.ice-pad.lit { opacity: 1; box-shadow: 0 0 16px #fff; }

/* CAPTCHA Nightmare */
.cap-progress { padding: 6px; color: #0f8; font-weight: bold; border-bottom: 1px solid #0a4; }
.cap-host { padding: 12px; text-align: center; color: #eee; }
.cap-q { margin-bottom: 10px; font-size: 13px; }
.cap-grid { display: grid; grid-template-columns: repeat(3, 60px); gap: 3px; justify-content: center; margin-bottom: 10px; }
.cap-cell { width: 60px; height: 60px; background: #223; border: 2px solid #445; display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer; }
.cap-cell.cap-word { font-size: 11px; color: #cde; }
.cap-cell.sel { border-color: #0f8; box-shadow: inset 0 0 0 3px rgba(0,255,120,0.5); }
.cap-dodge { font-size: 14px; margin: 20px; }
.cap-box { display: inline-block; width: 22px; height: 22px; background: #fff; border: 2px solid #888; vertical-align: middle; cursor: pointer; transition: transform .15s; }
.cap-distort { font-size: 30px; font-family: monospace; letter-spacing: 6px; font-style: italic; transform: skewX(-12deg); color: #8ab; text-decoration: line-through; margin: 12px; user-select: none; }
.cap-range { width: 80%; }
.cap-val { font-size: 20px; color: #0f8; margin: 8px; }

/* Malware Sweeper */
.ms-info { padding: 6px; color: #0f8; font-size: 12px; }
.ms-grid { display: grid; gap: 1px; justify-content: center; }
.ms-cell { width: 22px; height: 22px; background: #c0c0c0; border: 2px solid; border-color: #fff #808080 #808080 #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; font-family: monospace; cursor: pointer; }
.ms-cell.rev { background: #d8d8d8; border: 1px solid #999; }
.ms-cell.flag { background: #c0c0c0; }

/* Packet Sniffer */
.sniff-hud { display: flex; justify-content: space-between; padding: 6px 12px; color: #0f8; font-weight: bold; }
.sniff-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; padding: 10px; flex: 1; }
.sniff-port { background: #0a0a12; border: 2px solid #234; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; min-height: 54px; }
.sniff-port.on.bad { background: #3a0a0a; border-color: #f36; }
.sniff-port.on.good { background: #0a2a1a; border-color: #0f8; }

/* ============================================================
   Win98-style scrollbars (replace the wonky default gray ones)
   ============================================================ */
::-webkit-scrollbar { width: 16px; height: 16px; background: #c0c0c0; }

::-webkit-scrollbar-track {
    background-color: #dfdfdf;
    background-image:
        linear-gradient(45deg, #cfcfcf 25%, transparent 25%, transparent 75%, #cfcfcf 75%),
        linear-gradient(45deg, #cfcfcf 25%, transparent 25%, transparent 75%, #cfcfcf 75%);
    background-size: 4px 4px;
    background-position: 0 0, 2px 2px;
}

::-webkit-scrollbar-thumb {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}
::-webkit-scrollbar-thumb:active {
    border-color: #808080 #ffffff #ffffff #808080;
}

::-webkit-scrollbar-corner { background: var(--win95-gray); }

/* Arrow buttons at each end (single-button style) */
::-webkit-scrollbar-button {
    background: var(--win95-gray);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    background-repeat: no-repeat;
    background-position: center;
    display: block;
}
::-webkit-scrollbar-button:active { border-color: #808080 #ffffff #ffffff #808080; }

/* hide the "double button" extras so only one button shows at each end */
::-webkit-scrollbar-button:vertical:start:increment,
::-webkit-scrollbar-button:vertical:end:decrement,
::-webkit-scrollbar-button:horizontal:start:increment,
::-webkit-scrollbar-button:horizontal:end:decrement { display: none; }

::-webkit-scrollbar-button:vertical:decrement { height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M8 6 L4 10 L12 10 Z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:vertical:increment { height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M4 6 L12 6 L8 10 Z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:horizontal:decrement { width: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M10 4 L10 12 L6 8 Z' fill='black'/%3E%3C/svg%3E"); }
::-webkit-scrollbar-button:horizontal:increment { width: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M6 4 L6 12 L10 8 Z' fill='black'/%3E%3C/svg%3E"); }

/* ============================================================
   Window resize handles (8-direction)
   ============================================================ */
.resize-handle { position: absolute; z-index: 20; }
.rh-n  { top: -3px; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.rh-s  { bottom: -3px; left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.rh-e  { right: -3px; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rh-w  { left: -3px; top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.rh-ne { top: -3px; right: -3px; width: 12px; height: 12px; cursor: nesw-resize; }
.rh-nw { top: -3px; left: -3px; width: 12px; height: 12px; cursor: nwse-resize; }
.rh-se { bottom: -3px; right: -3px; width: 12px; height: 12px; cursor: nwse-resize; }
.rh-sw { bottom: -3px; left: -3px; width: 12px; height: 12px; cursor: nesw-resize; }
.window.maximized .resize-handle { display: none; }
