@font-face {
    font-family: 'PrintChar21';
    src: url('../../_blank_fonts/fonts/PrintChar21.ttf') format('truetype');
}

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

body {
    background-color: #000;
    color: rgb(0, 158, 0);
    font-family: 'PrintChar21', 'Courier New', monospace;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: 10px;
    padding-left: 50px;
    height: 100vh;
    gap: 10px;
}

canvas {
    border: 2px solid rgb(0, 158, 0);
    image-rendering: pixelated;
    image-rendering: crisp-edges;
    flex-shrink: 0;
}

.controls-section {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: flex-start;
    padding: 12px;
    border: 1px solid rgba(0, 158, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.5);
    width: 1120px;
    flex-shrink: 0;
}

.controls {
    display: flex;
    gap: 20px;
    align-items: center;
}

button {
    background-color: #000;
    color: #aaa;
    border: 2px solid rgb(0, 158, 0);
    padding: 10px 20px;
    font-family: 'PrintChar21', 'Courier New', monospace;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

button:hover {
    background-color: rgba(0, 158, 0, 0.2);
    color: rgb(0, 158, 0);
}

button.resume {
    color: rgb(255, 50, 50);
    border-color: rgb(255, 50, 50);
}

button.resume:hover {
    background-color: rgba(255, 50, 50, 0.2);
    color: rgb(255, 50, 50);
}

.info {
    font-size: 15px;
    letter-spacing: 0px;
}

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

#status {
    animation: blink 2.5s infinite;
    color: rgb(0, 158, 0);
}

#status.stopped {
    color: rgb(255, 50, 50);
}

.top-ui {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    flex-shrink: 0;
}

.selector-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border: 1px solid rgba(0, 158, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.5);
    width: 800px;
}

.upgrade-table {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.table-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

.row-label {
    font-size: 17px;
    letter-spacing: 1px;
    min-width: 90px;
    color: rgb(0, 158, 0);
}

.class-selector {
    display: flex;
    gap: 10px;
    align-items: center;
}

.selector-label {
    font-size: 17px;
    letter-spacing: 1px;
    min-width: 80px;
    color: rgb(0, 158, 0);
}

.button-group {
    display: flex;
    gap: 6px;
}

.derrick-class-btn,
.storage-class-btn,
.truck-class-btn {
    padding: 8px 8px;
    font-size: 13px;
    width: 130px;
    height: 60px;
    display: flex;
    flex-direction: column;
    gap: 1px;
    align-items: center;
    justify-content: center;
}

.btn-class {
    display: block;
    font-size: 10px;
    white-space: nowrap;
    color: #fff;
    letter-spacing: 0.5px;
}

.btn-cost {
    display: block;
    font-size: 16px;
    white-space: nowrap;
    color: rgb(255, 165, 0);
    font-weight: bold;
}

.btn-label {
    display: block;
    font-size: 9px;
    white-space: nowrap;
    color: #aaa;
}

.derrick-class-btn.active,
.storage-class-btn.active,
.truck-class-btn.active {
    background-color: rgba(0, 158, 0, 0.3);
    border-color: rgb(0, 158, 0);
}

.derrick-class-btn.active .btn-class,
.storage-class-btn.active .btn-class,
.truck-class-btn.active .btn-class {
    color: rgb(0, 255, 0);
}

.derrick-class-btn.active .btn-label,
.storage-class-btn.active .btn-label,
.truck-class-btn.active .btn-label {
    color: rgb(0, 158, 0);
}

.derrick-class-btn.active .btn-cost,
.storage-class-btn.active .btn-cost,
.truck-class-btn.active .btn-cost {
    color: rgb(255, 200, 0);
}

.separator {
    margin: 0 10px;
    opacity: 0.5;
}

.progress-section {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(0, 158, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.5);
    width: 1120px;
}

.progress-half-section {
    display: flex;
    gap: 15px;
    align-items: center;
}

.progress-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.progress-label {
    font-size: 15px;
    letter-spacing: 1.5px;
    color: rgb(0, 158, 0);
}

.progress-text {
    font-size: 15px;
    letter-spacing: 1px;
    color: #aaa;
}

.progress-bar-outer {
    width: 220px;
    height: 20px;
    border: 2px solid rgb(0, 158, 0);
    background-color: rgba(0, 0, 0, 0.8);
    position: relative;
}

.progress-bar-inner {
    height: 100%;
    background-color: rgba(255, 165, 79, 0.8);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-bar-inner.damage-bar {
    background-color: rgba(255, 50, 50, 0.8);
}

.progress-half-section .progress-bar-outer {
    border-color: rgb(0, 158, 0);
}

.progress-half-section:last-child .progress-bar-outer {
    border-color: rgb(200, 50, 50);
}

.truck-btn {
    padding: 10px 16px;
    font-size: 15px;
    min-width: 100px;
    height: fit-content;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.truck-btn .btn-label {
    font-size: 15px;
}

.truck-btn .btn-cost {
    font-size: 13px;
}

.pause-btn {
    padding: 10px 16px;
    font-size: 15px;
    min-width: 100px;
    height: fit-content;
    white-space: nowrap;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    font-weight: bold;
}

.console-window {
    width: 300px;
    height: 450px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(0, 158, 0, 0.6);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.console-header {
    font-size: 17px;
    color: rgb(0, 158, 0);
    padding: 10px;
    border-bottom: 1px solid rgba(0, 158, 0, 0.5);
    letter-spacing: 1px;
}

.console-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.console-log {
    color: rgb(200, 200, 200);
    opacity: 1;
    transition: opacity 1s;
    word-wrap: break-word;
}

.console-log.fading {
    opacity: 0.3;
}

.console-log::before {
    content: '> ';
    color: rgb(100, 100, 255);
}

.cash-flow-graph {
    width: 320px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(0, 158, 0, 0.6);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    padding: 10px;
}

.graph-header {
    font-size: 14px;
    color: rgb(0, 158, 0);
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 158, 0, 0.5);
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#cashFlowCanvas {
    border: 1px solid rgba(0, 158, 0, 0.3);
    background-color: rgba(0, 0, 0, 0.5);
}

.ai-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgb(0, 158, 0);
    cursor: pointer;
    padding: 8px 12px;
    border: 2px solid rgba(0, 158, 0, 0.5);
    background-color: rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
}

.ai-checkbox-label:hover {
    background-color: rgba(0, 158, 0, 0.1);
    border-color: rgb(0, 158, 0);
}

.ai-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: rgb(0, 158, 0);
}

.ai-checkbox-label span {
    letter-spacing: 1px;
    font-weight: bold;
}

.ai-mode-selector {
    display: flex;
    align-items: center;
}

.ai-mode-dropdown {
    background-color: rgba(0, 0, 0, 0.8);
    color: rgb(0, 158, 0);
    border: 2px solid rgba(0, 158, 0, 0.5);
    padding: 8px 12px;
    font-family: 'PrintChar21', 'Courier New', monospace;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 120px;
}

.ai-mode-dropdown:hover {
    background-color: rgba(0, 158, 0, 0.1);
    border-color: rgb(0, 158, 0);
}

.ai-mode-dropdown:focus {
    outline: none;
    border-color: rgb(255, 165, 0);
    color: rgb(255, 165, 0);
}

.ai-mode-dropdown option {
    background-color: rgba(0, 0, 0, 0.9);
    color: rgb(0, 158, 0);
    padding: 8px;
}

.elapsed-time-inline {
    font-size: 13px;
    color: rgb(255, 165, 0);
    letter-spacing: 1px;
    font-weight: normal;
}

/* Volume Controls */
.volume-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-left: auto;
}

.volume-slider-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}

.volume-slider-group label {
    font-size: 9px;
    color: #aaa;
    letter-spacing: 1px;
}

.volume-slider-group input[type="range"] {
    width: 60px;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(0, 158, 0, 0.3);
    outline: none;
    border-radius: 2px;
}

.volume-slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: rgb(0, 158, 0);
    cursor: pointer;
    border-radius: 2px;
}

.volume-slider-group input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: rgb(0, 158, 0);
    cursor: pointer;
    border-radius: 2px;
    border: none;
}

#muteBtn {
    padding: 8px 12px;
    font-size: 16px;
    min-width: auto;
}
