/* SHADOWNET: ПРОТОКОЛ ТЕНИ - STYLES */

:root {
    --primary: #00ff41;
    --secondary: #0ff0fc;
    --accent: #ff0055;
    --warning: #ffaa00;
    --danger: #ff3333;
    --bg-dark: #0a0a0f;
    --bg-panel: rgba(10, 15, 20, 0.92);
    --border: rgba(0, 255, 65, 0.3);
    --glow-primary: 0 0 10px #00ff41, 0 0 20px #00ff4180;
    --glow-secondary: 0 0 10px #0ff0fc, 0 0 20px #0ff0fc80;
    --glow-accent: 0 0 10px #ff0055, 0 0 20px #ff005580;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'VT323', monospace;
    background: #000;
    color: var(--primary);
    overflow: auto;
    height: 100vh;
    width: 100vw;
}

#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
}

#game-container {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: none;
    background: linear-gradient(180deg, rgba(0,10,5,0.8) 0%, rgba(0,5,2,0.9) 100%);
}

/* SCANLINES OVERLAY */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        rgba(0, 0, 0, 0.12),
        rgba(0, 0, 0, 0.12) 1px,
        transparent 1px,
        transparent 2px
    );
    animation: scanlineMove 8s linear infinite;
}

/* VIGNETTE EFFECT */
.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0,0,0,0.6) 100%);
}

@keyframes scanlineMove {
    0% { background-position: 0 0; }
    100% { background-position: 0 100%; }
}

.crt-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 999;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.vignette {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 998;
    box-shadow: inset 0 0 150px rgba(0, 0, 0, 0.9);
}

/* GLITCH EFFECT */
.glitch {
    position: relative;
    animation: glitch 1s infinite;
}

@keyframes glitch {
    0% { text-shadow: 2px 0 var(--accent), -2px 0 var(--secondary); }
    25% { text-shadow: -2px 0 var(--accent), 2px 0 var(--secondary); }
    50% { text-shadow: 2px 2px var(--accent), -2px -2px var(--secondary); }
    75% { text-shadow: -2px -2px var(--accent), 2px 2px var(--secondary); }
    100% { text-shadow: 2px 0 var(--accent), -2px 0 var(--secondary); }
}

/* MAIN LAYOUT */
.main-layout {
    display: grid;
    grid-template-columns: 180px 1fr 200px;
    grid-template-rows: 50px 1fr 40px;
    height: 100vh;
    width: 100%;
    gap: 2px;
    padding: 2px;
    box-sizing: border-box;
}

/* HEADER */
.header {
    grid-column: 1 / -1;
    background: linear-gradient(180deg, rgba(0,20,10,0.95) 0%, rgba(0,10,5,0.9) 100%);
    border: 1px solid rgba(0,255,65,0.3);
    border-bottom: 2px solid var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), inset 0 1px 0 rgba(0,255,65,0.1);
}

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    color: var(--primary);
    background: none;
    border: none;
}

.mobile-menu-btn:active {
    color: var(--secondary);
}

.header-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sound-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--primary);
    font-size: 18px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.sound-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary);
}

.lang-toggle {
    background: none;
    border: 1px solid var(--border);
    font-size: 18px;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.lang-toggle:hover {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--primary);
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary), 0 0 20px rgba(0,255,65,0.5);
    letter-spacing: 4px;
    animation: logo-pulse 2s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { text-shadow: 0 0 10px var(--primary), 0 0 20px rgba(0,255,65,0.5); }
    50% { text-shadow: 0 0 15px var(--primary), 0 0 30px rgba(0,255,65,0.7); }
}

.logo span {
    color: var(--accent);
}

.status-bar {
    display: flex;
    gap: 25px;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    padding: 6px 15px;
    border-radius: 4px;
    border: 1px solid rgba(0,255,65,0.15);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-label {
    color: var(--secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-value {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary);
    font-weight: bold;
}

/* PANEL TABS */
.panel-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.panel-tab {
    flex: 1;
    min-width: 60px;
    padding: 8px 10px;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0,255,65,0.2);
    border-radius: 4px;
    color: #666;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'VT323', monospace;
    text-align: center;
}

.panel-tab:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0,255,65,0.4);
    color: var(--primary);
    transform: translateY(-2px);
}

.panel-tab.active {
    background: linear-gradient(180deg, rgba(0,255,136,0.25) 0%, rgba(0,255,136,0.1) 100%);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(0,255,65,0.3);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* TOP HACKERS */
.top-hacker-item {
    padding: 8px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.top-hacker-item:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: var(--primary);
}

.top-hacker-rank {
    color: #FFD700;
    font-weight: bold;
    margin-right: 8px;
}

.top-hacker-name {
    color: var(--primary);
    font-weight: bold;
}

.top-hacker-level {
    color: #888;
    font-size: 11px;
    margin-left: auto;
}

.top-hacker-btc {
    color: #FFD700;
    font-size: 11px;
}

/* CLANS ONLINE */
.clan-online-item {
    padding: 8px;
    margin: 5px 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.clan-online-icon {
    font-size: 18px;
}

.clan-online-name {
    color: var(--primary);
    flex: 1;
}

.clan-online-status {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
}

.clan-online-status.war {
    background: rgba(255, 0, 0, 0.3);
    color: #ff4444;
}

.clan-online-status.peace {
    background: rgba(0, 255, 0, 0.2);
    color: #44ff44;
}

/* LIVE TICKER */
.live-ticker {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.9) 0%, rgba(20,20,20,0.95) 100%);
    border-top: 1px solid var(--primary);
    padding: 8px 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.ticker-label {
    background: #ff0000;
    color: white;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-item {
    display: inline-block;
    margin-right: 30px;
    color: #ccc;
    font-size: 12px;
    font-family: 'VT323', monospace;
}

.ticker-item .time {
    color: #666;
    margin-right: 8px;
}

.ticker-item .clan {
    color: var(--primary);
}

/* NPC CHAT */
.npc-chat {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    min-height: 150px;
    background: rgba(0, 20, 40, 0.5);
}

.npc-message {
    margin: 8px 0;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    border-left: 2px solid var(--primary);
}

.npc-message .npc-name {
    color: var(--primary);
    font-weight: bold;
    font-size: 12px;
}

.npc-message .npc-clan {
    color: #888;
    font-size: 10px;
    margin-left: 5px;
}

.npc-message .npc-text {
    color: #ccc;
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

.npc-message .npc-time {
    color: #555;
    font-size: 10px;
    float: right;
}

.trace-bar {
    width: 150px;
    height: 20px;
    background: rgba(255, 51, 51, 0.2);
    border: 1px solid var(--danger);
    position: relative;
    overflow: hidden;
}

.trace-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--warning), var(--danger));
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--danger);
}

.trace-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: white;
    z-index: 2;
}

.session-timer {
    font-size: 18px;
    color: var(--secondary);
}

/* LEFT PANEL - TOOLS */
.left-panel {
    background: linear-gradient(180deg, rgba(0,15,8,0.95) 0%, rgba(0,8,4,0.9) 100%);
    border: 1px solid rgba(0,255,65,0.25);
    border-right: 2px solid rgba(0,255,65,0.3);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    box-shadow: inset -5px 0 15px rgba(0,0,0,0.3);
}

.panel-title {
    font-size: 16px;
    color: var(--primary);
    border-bottom: 1px solid rgba(0,255,65,0.3);
    padding-bottom: 10px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--primary);
}

.tool-item {
    background: rgba(0, 255, 65, 0.03);
    border: 1px solid rgba(0,255,65,0.2);
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    border-radius: 4px;
}

.tool-item:hover {
    background: rgba(0, 255, 65, 0.12);
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0,255,65,0.3), inset 0 0 10px rgba(0,255,65,0.05);
    transform: translateX(5px);
}

.tool-item.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.tool-item.selected {
    background: rgba(15, 240, 252, 0.2);
    border-color: var(--secondary);
    box-shadow: var(--glow-secondary);
}

.tool-item.using {
    animation: toolPulse 0.5s ease-in-out;
}

@keyframes toolPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); box-shadow: 0 0 20px var(--primary); }
    100% { transform: scale(1); }
}

.tool-hotkey {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    border-radius: 3px;
    padding: 2px 5px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.6);
}

.tool-item.selected .tool-hotkey {
    background: var(--secondary);
    color: #000;
    border-color: var(--secondary);
}

.tool-icon {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.tool-name {
    font-size: 16px;
    color: var(--primary);
}

.tool-desc {
    font-size: 12px;
    color: #666;
}

/* HELP PANEL */
.help-item {
    padding: 6px 8px;
    margin: 4px 0;
    background: rgba(0, 255, 136, 0.05);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.help-item:hover {
    background: rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
    transform: translateX(3px);
}

.help-cmd {
    color: #00ff88;
    font-weight: bold;
    font-size: 12px;
    font-family: 'VT323', monospace;
}

.help-desc {
    color: #888;
    font-size: 11px;
}

/* INVENTORY */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.inventory-slot {
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.inventory-slot:hover {
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.inventory-slot .count {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 12px;
    color: var(--secondary);
}

.inventory-slot.empty {
    opacity: 0.3;
    cursor: default;
}

/* CENTER PANEL */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.terminal-container {
    flex: 1;
    background: linear-gradient(180deg, rgba(5,15,8,0.95) 0%, rgba(0,8,4,0.9) 100%);
    border: 1px solid rgba(0,255,65,0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.5);
}

.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: terminalPulse 2s ease-in-out infinite;
}

@keyframes terminalPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.terminal-header {
    background: linear-gradient(180deg, rgba(0,40,15,0.8) 0%, rgba(0,20,8,0.6) 100%);
    border-bottom: 1px solid rgba(0,255,65,0.3);
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.terminal-title {
    font-size: 14px;
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
    letter-spacing: 2px;
}

.terminal-tabs {
    display: flex;
    gap: 5px;
}

.terminal-tab {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid rgba(0,255,65,0.2);
    padding: 5px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #888;
    border-radius: 3px;
}

.terminal-tab:hover {
    background: rgba(0, 255, 65, 0.15);
    border-color: rgba(0,255,65,0.4);
    color: var(--primary);
}

.terminal-tab.active {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(0,255,65,0.3);
}

.terminal-output {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.terminal-line {
    margin-bottom: 5px;
    word-break: break-all;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes glow {
    0%, 100% { text-shadow: 0 0 5px var(--primary); }
    50% { text-shadow: 0 0 20px var(--primary), 0 0 30px var(--primary); }
}

.terminal-line.success {
    animation: fadeIn 0.3s ease-out, glow 2s ease-in-out infinite;
}

.terminal-line.error { color: var(--danger); }
.terminal-line.success { color: var(--primary); text-shadow: var(--glow-primary); }
.terminal-line.info { color: var(--secondary); }
.terminal-line.warning { color: var(--warning); }
.terminal-line.system { color: #888; font-style: italic; }

.terminal-input-line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border);
}

/* FILES AND LOGS PANELS */
.terminal-output, .files-panel, .logs-panel {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

.files-panel.hidden, .logs-panel.hidden, .hidden {
    display: none !important;
}

.file-item, .log-item {
    padding: 8px 12px;
    margin-bottom: 5px;
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
}

.file-item:hover, .log-item:hover {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--primary);
}

.file-name { color: var(--secondary); }
.file-size { color: #888; font-size: 12px; }
.file-encrypted { color: var(--warning); }

.log-time { color: var(--secondary); font-size: 12px; }
.log-text { color: var(--primary); }

.terminal-prompt {
    color: var(--secondary);
    font-size: 16px;
}

#terminal-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--primary);
    font-family: 'Share Tech Mono', monospace;
    font-size: 16px;
    outline: none;
}

/* NETWORK MAP */
.network-map {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.network-map::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, rgba(0, 255, 65, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(0, 255, 65, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.network-map canvas {
    width: 100%;
    height: 100%;
}

/* RIGHT PANEL - INTEL */
.right-panel {
    background: linear-gradient(180deg, rgba(15,5,10,0.95) 0%, rgba(8,2,5,0.9) 100%);
    border: 1px solid rgba(255,0,85,0.25);
    border-left: 2px solid rgba(255,0,85,0.3);
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
    box-shadow: inset 5px 0 15px rgba(0,0,0,0.3);
}

.mission-card {
    background: linear-gradient(135deg, rgba(255,0,85,0.1) 0%, rgba(180,0,60,0.05) 100%);
    border: 1px solid rgba(255,0,85,0.25);
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.mission-card:hover {
    background: linear-gradient(135deg, rgba(255,0,85,0.2) 0%, rgba(180,0,60,0.1) 100%);
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(255,0,85,0.3);
    transform: translateX(-5px);
}

.mission-title {
    font-size: 16px;
    color: var(--accent);
    margin-bottom: 8px;
}

.mission-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

.mission-reward {
    font-size: 14px;
    color: var(--warning);
    margin-top: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(0,255,65,0.15);
    max-height: 180px;
    border-radius: 4px;
}

.chat-message {
    margin-bottom: 8px;
    padding: 10px;
    background: rgba(0, 255, 65, 0.03);
    border-left: 3px solid var(--primary);
    border-radius: 0 4px 4px 0;
}

.chat-message.player {
    background: rgba(0, 255, 65, 0.08);
    border-left: 3px solid var(--secondary);
}

/* Event feed types */
.chat-message.event-success {
    background: linear-gradient(90deg, rgba(0, 255, 65, 0.15) 0%, rgba(0, 255, 65, 0.05) 100%);
    border-left: 3px solid #00ff41;
}

.chat-message.event-warning {
    background: linear-gradient(90deg, rgba(255, 170, 0, 0.15) 0%, rgba(255, 170, 0, 0.05) 100%);
    border-left: 3px solid #ffaa00;
}

.chat-message.event-error {
    background: linear-gradient(90deg, rgba(255, 68, 68, 0.15) 0%, rgba(255, 68, 68, 0.05) 100%);
    border-left: 3px solid #ff4444;
}

.chat-message.event-info {
    background: linear-gradient(90deg, rgba(15, 240, 252, 0.1) 0%, rgba(15, 240, 252, 0.03) 100%);
    border-left: 3px solid #0ff0fc;
}

.chat-sender {
    font-size: 12px;
    color: var(--secondary);
    margin-bottom: 3px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.chat-text {
    font-size: 14px;
    color: #ccc;
}

/* FOOTER */
.footer {
    grid-column: 1 / -1;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.quick-actions {
    display: flex;
    gap: 10px;
}

.quick-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 8px 20px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    transition: all 0.3s;
    text-transform: uppercase;
}

.quick-btn:hover {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary);
    box-shadow: var(--glow-primary);
}

.quick-btn.danger {
    background: rgba(255, 51, 51, 0.1);
    border-color: rgba(255, 51, 51, 0.3);
    color: var(--danger);
}

.quick-btn.danger:hover {
    background: rgba(255, 51, 51, 0.2);
    border-color: var(--danger);
    box-shadow: 0 0 10px var(--danger);
}

/* MODAL STYLES */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s;
}

.modal-overlay.active { display: flex; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-panel);
    border: 2px solid var(--primary);
    box-shadow: var(--glow-primary), 0 0 50px rgba(0, 255, 65, 0.3);
    max-width: 700px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalSlide 0.3s;
}

@keyframes modalSlide {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background: rgba(0, 255, 65, 0.1);
    border-bottom: 1px solid var(--border);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 24px;
    color: var(--primary);
    text-shadow: var(--glow-primary);
}

.modal-close {
    background: transparent;
    border: 1px solid var(--danger);
    color: var(--danger);
    font-size: 24px;
    cursor: pointer;
    padding: 5px 15px;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--danger);
    color: white;
}

.modal-body {
    padding: 20px;
}

.modal-btn {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px 30px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 18px;
    transition: all 0.3s;
    margin: 5px;
}

.modal-btn:hover {
    background: var(--primary);
    color: black;
    box-shadow: var(--glow-primary);
}

.modal-btn.accent {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(255, 0, 85, 0.1);
}

.modal-btn.accent:hover {
    background: var(--accent);
    color: white;
    box-shadow: var(--glow-accent);
}

.modal-btn.danger {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 51, 51, 0.1);
}

.modal-btn.danger:hover {
    background: var(--danger);
    color: white;
}

/* MAIN MENU - UPDATED */
#main-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1500;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, rgba(0,0,0,0.95) 0%, rgba(10,10,20,0.98) 100%);
    overflow: hidden;
}

#main-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0,255,65,0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255,0,85,0.03) 0%, transparent 50%),
        repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0,255,65,0.01) 2px, rgba(0,255,65,0.01) 4px);
    pointer-events: none;
}

#main-menu.hidden { display: none; }

.menu-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%2300ff41" stroke-width="0.2" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.menu-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px;
}

.menu-logo-container {
    text-align: center;
    margin-bottom: 50px;
}

.menu-logo {
    font-size: 80px;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 
        0 0 10px var(--primary),
        0 0 20px var(--primary),
        0 0 40px rgba(0,255,65,0.5);
    letter-spacing: 12px;
    margin-bottom: 15px;
    animation: glitch 2s infinite, pulse 3s ease-in-out infinite;
    position: relative;
}

.menu-logo::before,
.menu-logo::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.menu-logo::before {
    animation: glitch-1 0.3s infinite;
    color: rgba(0,255,65,0.8);
    z-index: -1;
}

.menu-logo::after {
    animation: glitch-2 0.3s infinite;
    color: rgba(255,0,85,0.8);
    z-index: -2;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(2px, -2px); }
    40% { transform: translate(2px, 2px); }
    60% { transform: translate(-2px, -2px); }
    80% { transform: translate(-2px, 2px); }
}

.menu-subtitle {
    font-size: 28px;
    color: var(--accent);
    letter-spacing: 8px;
    margin-bottom: 10px;
    text-shadow: 0 0 10px var(--accent);
}

.menu-version {
    font-size: 14px;
    color: rgba(0,255,65,0.5);
    letter-spacing: 4px;
    font-family: 'Share Tech Mono', monospace;
}

.menu-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 320px;
}

.menu-btn {
    position: relative;
    background: rgba(0,20,0,0.8);
    border: 1px solid rgba(0,255,65,0.3);
    color: var(--primary);
    padding: 16px 40px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 22px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 3px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,65,0.2), transparent);
    transition: left 0.5s;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    background: rgba(0,255,65,0.15);
    border-color: var(--primary);
    box-shadow: 
        0 0 20px rgba(0,255,65,0.3),
        inset 0 0 20px rgba(0,255,65,0.1);
    transform: translateX(10px);
}

.menu-btn .btn-icon {
    font-size: 18px;
    opacity: 0.7;
}

.menu-btn:hover .btn-icon {
    opacity: 1;
    animation: bounce 0.5s ease;
}

@keyframes bounce {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

.menu-btn.accent {
    border-color: rgba(255,0,85,0.4);
    color: var(--accent);
}

.menu-btn.accent:hover {
    background: rgba(255,0,85,0.15);
    border-color: var(--accent);
    box-shadow: 
        0 0 20px rgba(255,0,85,0.3),
        inset 0 0 20px rgba(255,0,85,0.1);
}

.menu-btn .btn-text {
    position: relative;
    z-index: 1;
}

.menu-btn .btn-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,255,65,0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.menu-btn:hover .btn-hover {
    transform: translateX(100%);
}

.menu-btn .btn-icon {
    font-size: 16px;
    opacity: 0.7;
    transition: all 0.3s;
}

.menu-btn:hover .btn-icon {
    opacity: 1;
    transform: scale(1.2);
}

.menu-footer {
    margin-top: 40px;
    display: flex;
    gap: 20px;
    align-items: center;
}

.lang-btn {
    background: transparent;
    border: 1px solid rgba(0,255,65,0.3);
    color: var(--primary);
    padding: 8px 16px;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s;
}

.lang-btn:hover {
    background: rgba(0,255,65,0.2);
    border-color: var(--primary);
    transform: scale(1.1);
}

.control-hint {
    color: rgba(0,255,65,0.4);
    font-size: 14px;
    letter-spacing: 2px;
}

/* SKILL TREE */
.skill-tree {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    padding: 15px;
}

.skill-branch {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 15px;
}

.skill-branch-title {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.skill-node {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border);
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.3s;
}

.skill-node:hover:not(.locked):not(.purchased) {
    background: rgba(0, 255, 65, 0.15);
    border-color: var(--primary);
    cursor: pointer;
}

.skill-node.purchased {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary);
}

.skill-node.locked {
    opacity: 0.4;
    cursor: not-allowed;
}

.skill-node-name {
    font-size: 14px;
    color: var(--primary);
}

.skill-node-cost {
    font-size: 12px;
    color: var(--warning);
}

/* CONTRACTS */
.contracts-panel {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

.contracts-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.contracts-section h3 {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.empty-message {
    color: var(--text-dim);
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.contract-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    padding: 15px;
    margin-bottom: 12px;
    transition: all 0.3s;
}

.contract-card:hover {
    border-color: var(--primary);
}

.contract-card.active {
    border-left: 3px solid var(--warning);
}

.contract-card.available {
    border-left: 3px solid var(--primary);
}

.contract-card.completed {
    border-left: 3px solid var(--success);
    opacity: 0.7;
}

.contract-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.contract-clan {
    font-size: 14px;
    color: var(--secondary);
}

.contract-difficulty {
    color: var(--warning);
    font-size: 12px;
}

.contract-title {
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: bold;
}

.contract-desc {
    font-size: 13px;
    color: var(--text);
    margin-bottom: 8px;
}

.contract-target {
    font-size: 12px;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.contract-reward {
    font-size: 13px;
    color: var(--success);
    margin-bottom: 5px;
}

.contract-req {
    font-size: 11px;
    color: var(--text-dim);
    font-style: italic;
    margin-bottom: 10px;
}

.contract-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.contract-actions .modal-btn {
    flex: 1;
}

/* SERVER PANEL */
.server-panel {
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
}

.server-info-card {
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.1) 0%, rgba(0, 150, 255, 0.1) 100%);
    border: 2px solid var(--primary);
    padding: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.server-name {
    font-size: 24px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.server-ip {
    font-size: 14px;
    color: var(--text-dim);
}

.server-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.server-stat {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.server-stat .stat-label {
    color: var(--text-dim);
    font-size: 12px;
}

.server-stat .stat-value {
    color: var(--primary);
    font-weight: bold;
    font-size: 14px;
}

.server-section {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.server-section h3 {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.defender-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border);
    padding: 10px;
    margin-bottom: 8px;
}

.defender-card .status-ko {
    color: #ff4444;
}

.defender-card .status-ready {
    color: #00ff41;
}

.modal-btn.full-width {
    width: 100%;
    padding: 15px;
    font-size: 14px;
}

/* SHOP */
.shop-items {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.shop-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
}

.shop-item:hover {
    border-color: var(--secondary);
    box-shadow: var(--glow-secondary);
}

.shop-item-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.shop-item-name {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 5px;
}

.shop-item-desc {
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
}

.shop-item-price {
    font-size: 18px;
    color: var(--warning);
}

/* SHOP TABS */
.shop-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.shop-tab {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    color: #888;
    padding: 10px 15px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 12px;
    transition: all 0.3s;
}

.shop-tab:hover {
    border-color: var(--secondary);
    color: var(--secondary);
}

.shop-tab.active {
    background: var(--secondary-dim);
    border-color: var(--secondary);
    color: var(--secondary);
}

/* PREMIUM ITEMS */
.premium-item {
    border: 1px solid #ff00ff40 !important;
    background: rgba(255, 0, 255, 0.05) !important;
}

.premium-item:hover {
    border-color: #ff00ff !important;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3) !important;
}

.premium-btn {
    background: linear-gradient(135deg, #ff00ff, #9900ff) !important;
    border: none !important;
    color: white !important;
    font-weight: bold;
}

.premium-btn:hover {
    box-shadow: 0 0 15px rgba(255, 0, 255, 0.5);
}

.shop-content {
    max-height: 60vh;
    overflow-y: auto;
}

/* ACHIEVEMENTS */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.achievement {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    padding: 15px;
    text-align: center;
    opacity: 0.5;
}

.achievement.unlocked {
    opacity: 1;
    border-color: var(--warning);
    background: rgba(255, 170, 0, 0.1);
}

.achievement-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.achievement-name {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 5px;
}

.achievement-desc {
    font-size: 11px;
    color: #666;
}

/* FIREWALL MINIGAME */
.firewall-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
}

.firewall-game.active { display: flex; }

.firewall-container {
    width: 500px;
    height: 400px;
    background: var(--bg-panel);
    border: 2px solid var(--accent);
    box-shadow: var(--glow-accent);
    padding: 20px;
}

.firewall-type-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.firewall-type-btn {
    padding: 8px 16px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'VT323', monospace;
    font-size: 14px;
}

.firewall-type-btn:hover {
    background: rgba(0, 255, 136, 0.3);
}

.firewall-type-btn.active {
    background: var(--primary);
    color: #000;
}

.firewall-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid var(--accent);
}

.firewall-timer {
    text-align: center;
    font-size: 24px;
    color: var(--accent);
    margin-bottom: 15px;
}

/* TYPE 1: CODE MATCH (CLASSIC) */
.firewall-slots {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.firewall-slot {
    width: 80px;
    height: 80px;
    border: 2px dashed var(--border);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.firewall-slot.filled {
    border-style: solid;
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.1);
}

.firewall-keys {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.firewall-key {
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 85, 0.2);
    border: 2px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    color: var(--accent);
    cursor: grab;
    transition: all 0.3s;
}

.firewall-key-btn {
    width: 50px;
    height: 50px;
    margin: 5px;
    background: rgba(255, 0, 85, 0.3);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    pointer-events: auto;
    z-index: 2100;
    position: relative;
}

.firewall-key-btn:hover {
    background: rgba(255, 0, 85, 0.6);
    transform: scale(1.1);
}

.firewall-key:hover {
    background: rgba(255, 0, 85, 0.4);
    transform: scale(1.1);
}

/* TYPE 2: SEQUENCE MEMORY */
.firewall-sequence {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.firewall-sequence-btn {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
}

.firewall-sequence-btn.red { background: rgba(255, 0, 0, 0.2); }
.firewall-sequence-btn.green { background: rgba(0, 255, 0, 0.2); }
.firewall-sequence-btn.blue { background: rgba(0, 100, 255, 0.2); }
.firewall-sequence-btn.yellow { background: rgba(255, 255, 0, 0.2); }

.firewall-sequence-btn:hover { transform: scale(1.05); }
.firewall-sequence-btn.active { transform: scale(0.95); box-shadow: 0 0 20px currentColor; }
.firewall-sequence-btn.lit { border-color: currentColor; box-shadow: 0 0 30px currentColor; }

/* TYPE 3: HACKING TERMINAL */
.firewall-terminal {
    background: #0a0a0a;
    border: 2px solid var(--primary);
    padding: 15px;
    font-family: 'VT323', monospace;
    height: 250px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.firewall-terminal-line {
    margin: 5px 0;
    font-size: 14px;
}

.firewall-terminal-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--primary);
    color: var(--primary);
    font-family: 'VT323', monospace;
    font-size: 18px;
    padding: 5px;
    outline: none;
}

.firewall-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.firewall-option {
    padding: 12px;
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
}

.firewall-option:hover {
    background: rgba(0, 255, 136, 0.3);
    border-color: var(--primary);
}

/* TYPE 4: PATTERN MATRIX */
.firewall-matrix {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.firewall-matrix-cell {
    width: 60px;
    height: 60px;
    background: rgba(0, 255, 136, 0.1);
    border: 2px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.firewall-matrix-cell:hover {
    background: rgba(0, 255, 136, 0.3);
}

.firewall-matrix-cell.active {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 15px var(--primary);
}

.firewall-matrix-cell.error {
    background: #ff0000;
    color: #fff;
}

.firewall-hint {
    text-align: center;
    margin-top: 10px;
    font-size: 12px;
    color: #888;
}

/* CLAN DIALOG SYSTEM */
.clan-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2500;
    display: none;
    justify-content: center;
    align-items: center;
}

.clan-dialog-overlay.active { display: flex; }

.clan-dialog {
    width: 600px;
    max-height: 80vh;
    background: var(--bg-panel);
    border: 2px solid var(--accent);
    box-shadow: var(--glow-accent);
    overflow: hidden;
}

.clan-dialog-header {
    background: linear-gradient(90deg, rgba(255,0,85,0.3), transparent);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--border);
}

.clan-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 30px;
}

.clan-info h3 {
    margin: 0;
    font-size: 20px;
    color: var(--accent);
}

.clan-info span {
    font-size: 12px;
    color: #888;
}

.clan-dialog-body {
    padding: 20px;
    max-height: 300px;
    overflow-y: auto;
}

.clan-message {
    background: rgba(0, 255, 136, 0.05);
    border-left: 3px solid var(--primary);
    padding: 15px;
    margin-bottom: 15px;
    animation: fadeIn 0.3s ease;
}

.clan-dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clan-option {
    padding: 15px;
    background: rgba(255, 0, 85, 0.1);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clan-option:hover {
    background: rgba(255, 0, 85, 0.3);
    border-color: var(--accent);
}

.clan-option-reward {
    font-size: 12px;
    color: var(--primary);
}

.clan-dialog-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
}

.clan-reputation-bar {
    flex: 1;
    margin-right: 20px;
}

.clan-rep-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 12px;
}

.clan-rep-fill {
    height: 8px;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s;
}

/* UI IMPROVEMENTS */
.mini-stats {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 15px;
    min-width: 180px;
    z-index: 100;
}

.mini-stat {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.mini-stat-label { color: #888; }
.mini-stat-value { color: var(--primary); font-weight: bold; }

.server-details-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 15px;
    min-width: 250px;
    z-index: 100;
    display: none;
}

.server-details-panel.active { display: block; }

.server-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.quick-actions {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 100;
}

.quick-action-btn {
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    transition: all 0.3s;
}

.quick-action-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse-animation {
    animation: pulse 1s infinite;
}

/* TRACE DODGE MINIGAME */
.trace-game {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    display: none;
    justify-content: center;
    align-items: center;
}

.trace-game.active { display: flex; }

#trace-canvas {
    border: 2px solid var(--danger);
    box-shadow: 0 0 20px var(--danger);
}

/* DIALOG WINDOW */
.dialog-window {
    background: rgba(0, 20, 30, 0.95);
    border: 2px solid var(--secondary);
    box-shadow: var(--glow-secondary);
    padding: 20px;
    max-width: 600px;
}

.dialog-avatar {
    font-size: 48px;
    text-align: center;
    margin-bottom: 15px;
}

.dialog-name {
    font-size: 20px;
    color: var(--secondary);
    text-align: center;
    margin-bottom: 15px;
}

.dialog-text {
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 3px solid var(--secondary);
}

.dialog-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dialog-option {
    background: rgba(15, 240, 252, 0.1);
    border: 1px solid var(--border);
    color: var(--primary);
    padding: 12px 20px;
    cursor: pointer;
    font-family: 'VT323', monospace;
    font-size: 16px;
    text-align: left;
    transition: all 0.3s;
}

.dialog-option:hover {
    background: rgba(15, 240, 252, 0.2);
    border-color: var(--secondary);
}

.dialog-option.accept {
    background: rgba(0, 255, 65, 0.1);
    border-color: rgba(0, 255, 65, 0.3);
}

.dialog-option.decline {
    background: rgba(255, 51, 51, 0.1);
    border-color: rgba(255, 51, 51, 0.3);
}

/* SETTINGS */
.settings-group {
    margin-bottom: 20px;
}

.settings-label {
    font-size: 16px;
    color: var(--secondary);
    margin-bottom: 10px;
}

.settings-slider {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid var(--border);
    outline: none;
}

.settings-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    cursor: pointer;
}

/* BOOT SEQUENCE */
#boot-sequence {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-family: 'VT323', monospace;
    color: var(--primary);
}

#boot-sequence.hidden { display: none; }

.boot-text {
    font-size: 18px;
    margin-bottom: 5px;
    opacity: 0;
    animation: bootFade 0.1s forwards;
}

@keyframes bootFade { to { opacity: 1; } }

/* SCROLLBAR */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.3); }
::-webkit-scrollbar-thumb { background: var(--primary); }
::-webkit-scrollbar-thumb:hover { background: var(--secondary); }

/* RESPONSIVE */
@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
        grid-template-rows: 50px auto 1fr auto 40px;
    }
    .left-panel, .right-panel { 
        display: none; 
    }
}

/* TABLET */
@media (max-width: 1200px) and (min-width: 901px) {
    .main-layout {
        grid-template-columns: 200px 1fr 200px;
    }
    .left-panel, .right-panel {
        padding: 10px;
    }
    .network-map {
        height: 250px;
        min-height: 250px;
    }
}

/* MOBILE PHONES */
@media (max-width: 600px) {
    /* Header */
    .header {
        padding: 5px 10px;
    }
    .logo {
        font-size: 18px;
    }
    .status-bar {
        gap: 8px;
    }
    .status-item {
        font-size: 12px;
    }
    .session-timer {
        display: none;
    }
    
    /* Terminal */
    .terminal-container {
        font-size: 14px;
    }
    .terminal-input {
        font-size: 14px;
    }
    .terminal-prompt {
        font-size: 12px;
    }
    
    /* Network map */
    .network-map {
        height: 200px;
        min-height: 200px;
        max-height: 200px;
    }
    
    /* Footer */
    .footer {
        padding: 0 5px;
    }
    .quick-btn {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    /* Toast */
    #toast-container {
        left: 10px;
        right: 10px;
    }
    .toast {
        min-width: auto;
        max-width: 100%;
        font-size: 14px;
    }
    
    /* Server details panel */
    .server-details-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 60px;
    }
    
    /* Modal */
    .modal {
        width: 95%;
        max-height: 80vh;
    }
    
    /* Keyboard hints */
    .keyboard-hints {
        left: 10px;
        bottom: 60px;
    }
}

/* TOUCH OPTIMIZATION */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .tool-item {
        padding: 15px;
        min-height: 60px;
    }
    
    .tool-hotkey {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .quick-btn {
        padding: 12px 15px;
        min-width: 60px;
    }
    
    .terminal-tab {
        padding: 10px 15px;
    }
    
    /* Remove hover effects on touch */
    .tool-item:hover {
        transform: none;
    }
    
    /* Larger input */
    .terminal-input, .chat-input {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Touch-friendly buttons */
    button, .menu-btn, .quick-btn, .server-action-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Network canvas touch */
    #network-canvas {
        touch-action: pan-x pan-y;
    }
}

/* HIGH DPI DISPLAYS */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .terminal-output {
        -webkit-font-smoothing: antialiased;
    }
}

/* LANDSCAPE MOBILE */
@media (max-height: 500px) and (orientation: landscape) {
    .header {
        height: 40px;
    }
    .footer {
        height: 35px;
    }
    .network-map {
        height: 150px;
        min-height: 150px;
    }
    .terminal-container {
        max-height: calc(100vh - 200px);
    }
}

/* TOAST NOTIFICATIONS */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 12px 20px;
    border-radius: 4px;
    font-family: 'VT323', monospace;
    font-size: 16px;
    color: var(--primary);
    min-width: 250px;
    max-width: 400px;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.toast.success {
    border-color: var(--primary);
    background: rgba(0, 255, 65, 0.1);
}

.toast.warning {
    border-color: var(--warning);
    color: var(--warning);
    background: rgba(255, 170, 0, 0.1);
}

.toast.error {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(255, 51, 51, 0.1);
}

.toast.info {
    border-color: var(--secondary);
    color: var(--secondary);
    background: rgba(15, 240, 252, 0.1);
}

.toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

/* OPERATION PROGRESS BAR */
.operation-progress {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 4px;
    z-index: 1500;
    display: none;
}

.operation-progress.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.operation-progress-title {
    font-size: 14px;
    color: var(--secondary);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.operation-progress-bar {
    height: 8px;
    background: rgba(0, 255, 65, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.operation-progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease-out;
    box-shadow: 0 0 10px var(--primary);
}

/* KEYBOARD HINTS PANEL */
.keyboard-hints {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 4px;
    font-size: 13px;
    z-index: 1000;
    display: none;
    max-width: 250px;
}

.keyboard-hints.visible {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.keyboard-hints-title {
    color: var(--secondary);
    font-size: 14px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 5px;
}

.keyboard-hint-row {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
    gap: 15px;
}

.keyboard-hint-key {
    background: rgba(0, 255, 65, 0.2);
    border: 1px solid var(--primary);
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.keyboard-hint-desc {
    color: rgba(255, 255, 255, 0.7);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* SERVER DETAILS PANEL */
.server-details-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    max-height: 400px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    z-index: 1500;
    display: none;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.server-details-panel.visible {
    display: flex;
    animation: fadeIn 0.2s ease-out;
}

.server-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 255, 65, 0.05);
}

.server-details-title {
    font-size: 16px;
    color: var(--primary);
    font-weight: bold;
}

.server-details-close {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 20px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
}

.server-details-close:hover {
    opacity: 1;
}

.server-details-body {
    padding: 15px;
    overflow-y: auto;
    max-height: 340px;
}

.server-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.server-info-label {
    color: rgba(255, 255, 255, 0.6);
}

.server-info-value {
    color: var(--primary);
    font-weight: bold;
}

.server-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    margin-bottom: 10px;
}

.server-type-badge.mission { background: rgba(255,170,0,0.2); border: 1px solid #ffaa00; color: #ffaa00; }
.server-type-badge.bank { background: rgba(255,215,0,0.2); border: 1px solid #ffd700; color: #ffd700; }
.server-type-badge.clan { background: rgba(255,0,255,0.2); border: 1px solid #ff00ff; color: #ff00ff; }
.server-type-badge.premium { background: rgba(255,215,0,0.2); border: 1px solid #ffd700; color: #ffd700; }

.server-details-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.server-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary);
    font-family: 'VT323', monospace;
    font-size: 14px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s;
}

.server-action-btn:hover { background: rgba(0, 255, 65, 0.2); }
.server-action-btn.danger { background: rgba(255,51,51,0.1); border-color: var(--danger); color: var(--danger); }
.server-action-btn.danger:hover { background: rgba(255,51,51,0.2); }