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

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

body {
    background: #000000;
    color: #ffffff;
    font-family: 'Courier Prime', monospace;
    font-size: 12px;
    line-height: 1.2;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.panel {
    background: #000000;
    border: 1px solid #ffffff;
    padding: 8px;
}

#top-panel {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #ffffff;
}

.status-text {
    font-weight: bold;
    letter-spacing: 1px;
}

.current-path {
    flex: 1;
    text-align: center;
    font-weight: bold;
}

.tool-selection {
    display: flex;
    gap: 4px;
}

#main-area {
    flex: 1;
    display: flex;
}

.side-panel {
    width: 250px;
    border-left: 1px solid #ffffff;
    border-right: 1px solid #ffffff;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#left-panel {
    border-right: 2px solid #ffffff;
}

#right-panel {
    border-left: 2px solid #ffffff;
}

.panel-header {
    font-weight: bold;
    text-align: center;
    padding: 4px;
    border-bottom: 1px solid #ffffff;
    margin-bottom: 8px;
}

#canvas-container {
    flex: 1;
    position: relative;
    background: #000000;
}

#main-canvas {
    width: 100%;
    height: 100%;
    display: block;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

#canvas-overlay {
    position: absolute;
    top: 8px;
    left: 8px;
    pointer-events: none;
}

.quantum-stats {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #ffffff;
    padding: 4px 8px;
    font-size: 10px;
}

.control-group {
    margin-bottom: 12px;
}

.control-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
    font-size: 10px;
}

input[type="text"] {
    width: 100%;
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    padding: 4px;
    margin-bottom: 4px;
}

input[type="text"]:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 4px #ffffff;
}

input[type="range"] {
    width: 80%;
    background: #000000;
    height: 4px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 0;
}

input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: #ffffff;
    cursor: pointer;
    border-radius: 0;
    border: none;
}

.pixel-btn {
    background: #000000;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: inherit;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
    margin: 2px;
    text-transform: uppercase;
}

.pixel-btn:hover {
    background: #ffffff;
    color: #000000;
}

.pixel-btn.active {
    background: #ffffff;
    color: #000000;
}

.calendar-widget {
    margin-top: 12px;
}

.calendar-header {
    font-weight: bold;
    font-size: 10px;
    margin-bottom: 4px;
}

#decision-calendar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
}

.calendar-day {
    width: 16px;
    height: 16px;
    background: #000000;
    border: 1px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8px;
    cursor: pointer;
}

.calendar-day:hover {
    background: #ffffff;
    color: #000000;
}

.scrollable-list {
    height: 100px;
    overflow-y: auto;
    border: 1px solid #ffffff;
    padding: 4px;
    background: #000000;
}

.branch-item {
    padding: 2px 4px;
    font-size: 10px;
    border-bottom: 1px solid #333333;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.branch-item:hover {
    background: #ffffff;
    color: #000000;
}

.stats-display {
    border: 1px solid #ffffff;
    padding: 8px;
}

.stat-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 11px;
}

.network-map {
    margin-top: 12px;
}

.map-header {
    font-weight: bold;
    font-size: 10px;
    margin-bottom: 4px;
}

#mini-network {
    position: relative;
    height: 60px;
    border: 1px solid #ffffff;
    background: #000000;
}

.network-node {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

#bottom-panel {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 2px solid #ffffff;
    gap: 20px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.status-indicator {
    width: 16px;
    height: 16px;
    border: 1px solid #ffffff;
    background: #000000;
}

.status-indicator.active {
    background: #ffffff;
}

.progress-dials {
    display: flex;
    gap: 20px;
}

.dial {
    text-align: center;
}

.dial-label {
    font-size: 9px;
    margin-bottom: 4px;
    font-weight: bold;
}

.dial-circle {
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    position: relative;
    margin: 0 auto 4px;
    background: #000000;
}

.dial-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    transition: height 0.3s ease;
}

.dial-value {
    font-size: 9px;
    font-weight: bold;
}

.nav-controls, .export-controls {
    display: flex;
    gap: 8px;
}

/* Scrollbar styling */
.scrollable-list::-webkit-scrollbar {
    width: 8px;
}

.scrollable-list::-webkit-scrollbar-track {
    background: #000000;
    border: 1px solid #ffffff;
}

.scrollable-list::-webkit-scrollbar-thumb {
    background: #ffffff;
    border: 1px solid #000000;
}

/* Responsive design */
@media (max-width: 1024px) {
    .side-panel {
        width: 200px;
    }
    
    .control-group {
        margin-bottom: 8px;
    }
    
    body {
        font-size: 11px;
    }
}

@media (max-width: 768px) {
    #main-area {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        height: 120px;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
    }
    
    #bottom-panel {
        height: auto;
        flex-wrap: wrap;
        padding: 4px;
    }
    
    .progress-dials {
        gap: 10px;
    }
    
    .dial-circle {
        width: 24px;
        height: 24px;
    }
}

/* Animation effects */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-indicator.active {
    animation: pulse 2s ease-in-out infinite;
}

/* CRT glow effect */
#main-canvas {
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.3));
}

/* Terminal-style input focus */
input[type="text"]:focus,
input[type="range"]:focus {
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}