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

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

body {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    background: #000;
    color: #00ff00;
    overflow: hidden;
    height: 100vh;
}

.terminal {
    background: #000;
    border: 2px solid #00ff00;
    height: 100vh;
    display: flex;
    flex-direction: column;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    border-bottom: 1px solid #00ff00;
    background: rgba(0, 255, 0, 0.1);
}

.title {
    font-size: 14px;
    font-weight: bold;
}

.timestamp {
    font-size: 12px;
    opacity: 0.8;
}

.power-panel {
    padding: 15px 20px;
    border-bottom: 1px solid #00ff00;
    display: flex;
    gap: 30px;
    align-items: center;
    background: rgba(0, 255, 0, 0.05);
}

.main-display {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 5px;
    max-height: 850px;
}

.power-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
}

.power-label {
    font-size: 12px;
    font-weight: bold;
}

.power-bar {
    width: 100%;
    height: 25px;
    border: 1px solid #00ff00;
    background: rgba(0, 255, 0, 0.1);
    position: relative;
}

.power-fill {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.battery-fill {
    background: #00ff00;
    box-shadow: 0 0 10px #00ff00;
}

.fuel-fill {
    background: #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
}

.hull-fill {
    background: #4040ff;
    box-shadow: 0 0 10px #4040ff;
}

.power-value {
    font-size: 11px;
    font-weight: bold;
    color: #000;
    text-shadow: none;
    z-index: 10;
}

.power-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.action-button {
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    min-width: 80px;
}

.action-button:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.surface-button.active {
    background: rgba(255, 0, 0, 0.3);
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.stealth-button {
    background: rgba(128, 0, 128, 0.2);
    border-color: #8000ff;
    color: #8000ff;
}

.stealth-button:hover {
    background: rgba(128, 0, 128, 0.3);
    box-shadow: 0 0 15px rgba(128, 0, 128, 0.5);
}

.red-out-button {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
}

.red-out-button:hover {
    background: rgba(255, 0, 0, 0.3);
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
}

.red-out-button.active {
    background: rgba(255, 0, 0, 0.5);
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.8);
}

.action-button.refueling {
    background: rgba(255, 170, 0, 0.3);
    border-color: #ffaa00;
    color: #ffaa00;
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.5);
}



.radar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.radar-screen {
    position: relative;
    width: 800px;
    height: 800px;
    border: 3px solid #00ff00;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 0, 0.1) 0%, rgba(0, 255, 0, 0.05) 50%, rgba(0, 0, 0, 0.8) 100%);
    box-shadow: inset 0 0 100px rgba(0, 255, 0, 0.3), 0 0 100px rgba(0, 255, 0, 0.2);
}

#radar {
    border-radius: 50%;
}

.radar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.crosshair-h {
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 1px;
    background: rgba(0, 255, 0, 0.5);
    transform: translateY(-50%);
}

.crosshair-v {
    position: absolute;
    left: 50%;
    top: 10%;
    bottom: 10%;
    width: 1px;
    background: rgba(0, 255, 0, 0.5);
    transform: translateX(-50%);
}

.offline-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 100;
}

.offline-text {
    color: #ff0000;
    font-size: 48px;
    font-weight: bold;
    text-shadow: 0 0 20px #ff0000;
    animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}





.ping-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 180px;
}

.ping-power-control {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 180px;
}

.ping-power-control label {
    font-size: 11px;
    font-weight: bold;
}

.ping-power-control input[type="range"] {
    width: 100%;
    height: 15px;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid #00ff00;
    outline: none;
    -webkit-appearance: none;
}

.ping-power-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #00ff00;
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 0 10px #00ff00;
}

.ping-power-control input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #00ff00;
    border: 2px solid #000;
    cursor: pointer;
    box-shadow: 0 0 10px #00ff00;
}

.power-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    opacity: 0.7;
}

.ping-button {
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 8px 16px;
    font-family: inherit;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
    min-width: 80px;
}

.ping-button:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.ping-button:active {
    background: rgba(0, 255, 0, 0.5);
}

.ping-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}





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

/* Node Popup Styles */
.node-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #000;
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
    z-index: 1000;
    min-width: 300px;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(0, 255, 0, 0.1);
    border-bottom: 1px solid #00ff00;
}

.popup-title {
    color: #00ff00;
    font-size: 14px;
    font-weight: bold;
}

.popup-close {
    background: none;
    border: 1px solid #00ff00;
    color: #00ff00;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.popup-close:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.popup-content {
    padding: 10px;
}

.node-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.info-label {
    color: #00ff00;
    font-size: 12px;
    opacity: 0.8;
}

.info-value {
    color: #00ff00;
    font-size: 12px;
    font-weight: bold;
}

.info-value#popup-type {
    color: #00ff00;
}

.info-value#popup-type[data-type="fuel"] {
    color: #ffaa00;
}

.popup-actions {
    padding: 10px;
    border-top: 1px solid #00ff00;
    background: rgba(0, 255, 0, 0.05);
}

.move-button {
    width: 100%;
    background: rgba(0, 255, 0, 0.2);
    border: 2px solid #00ff00;
    color: #00ff00;
    padding: 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.move-button:hover {
    background: rgba(0, 255, 0, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}

.move-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
}

/* Status Popup Window Styles */
.status-popup {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 400px;
    height: 250px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid #00ff00;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    z-index: 500;
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    backdrop-filter: blur(5px);
    min-width: 300px;
    min-height: 150px;
    max-width: 80vw;
    max-height: 80vh;
    overflow: hidden;
}

.status-popup.minimized {
    height: 40px !important;
}

.status-popup.minimized .status-popup-content,
.status-popup.minimized .status-popup-resize {
    display: none;
}

.status-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(0, 255, 0, 0.1);
    border-bottom: 1px solid #00ff00;
    cursor: move;
    user-select: none;
}

.status-popup-title {
    color: #00ff00;
    font-size: 12px;
    font-weight: bold;
}

.status-popup-controls {
    display: flex;
    gap: 5px;
}

.status-popup-minimize,
.status-popup-close {
    background: none;
    border: 1px solid #00ff00;
    color: #00ff00;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-family: inherit;
}

.status-popup-minimize:hover,
.status-popup-close:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

.status-popup-close:hover {
    background: rgba(255, 0, 0, 0.2);
    border-color: #ff0000;
    color: #ff0000;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.status-popup-content {
    padding: 10px;
    height: calc(100% - 40px);
    overflow: hidden;
}

.status-popup-resize {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 15px;
    height: 15px;
    cursor: nw-resize;
    background: linear-gradient(-45deg, transparent 40%, #00ff00 40%, #00ff00 60%, transparent 60%);
    opacity: 0.6;
}

.status-popup-resize:hover {
    opacity: 1;
}

.status-popup .status-log {
    height: 100%;
    overflow-y: auto;
    font-size: 11px;
    line-height: 1.4;
    opacity: 0.9;
    padding-right: 5px;
}

.status-popup .status-log div {
    margin-bottom: 2px;
    padding: 1px 0;
}

.status-popup .status-log::-webkit-scrollbar {
    width: 8px;
}

.status-popup .status-log::-webkit-scrollbar-track {
    background: rgba(0, 255, 0, 0.1);
}

.status-popup .status-log::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 0, 0.5);
    border-radius: 4px;
}

.status-popup .status-log::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 0, 0.7);
}

/* Radar Info Styles */
.radar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: 12px;
}

.radar-info-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.scan-status {
    padding: 5px 10px;
    border: 1px solid #00ff00;
    background: rgba(0, 255, 0, 0.1);
}

.status-button {
    background: rgba(0, 179, 255, 0.642);
    border: 1px solid #00ff00;
    color: #c8e4e8;
    padding: 4px 8px;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.status-button:hover {
    background: rgba(129, 181, 202, 0.744);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.5);
}

/* Blinking cursor effect for status */
.scan-status.scanning::after {
    content: '_';
    animation: blink 1s infinite;
}

/* Red Out Overlay - Much lighter and less intense */
.red-out-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 0, 0, 0.15);
    z-index: 9999;
    pointer-events: none;
}

/* Brightness Overlay - Controls screen brightness based on battery level */
.brightness-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0);
    z-index: 5000;
    pointer-events: none;
    transition: background 0.5s ease;
}