/* Reset and base styles - Industrial Orange Theme */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    background: #0a0a0a;
    color: #ff9933;
    font-family: 'Courier New', monospace;
    overflow: hidden;
}

/* Canvas */
#scene {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    z-index: 100;
}

.panel {
    pointer-events: auto;
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.95) 0%, rgba(42, 42, 42, 0.95) 100%);
    backdrop-filter: blur(8px);
    border: 2px solid #ff6600;
    border-radius: 0;
    padding: 16px;
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.3), inset 0 0 20px rgba(0,0,0,0.7);
}

.panel h1 {
    font-size: 18px;
    font-weight: 700;
    color: #ff6600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.6);
}

.panel.right {
    margin-left: auto;
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}

.stat {
    text-align: center;
}

.stat-label {
    color: #cc7700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 4px;
    font-weight: bold;
}

.stat-value {
    color: #ffaa44;
    font-size: 20px;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 153, 51, 0.5);
}

/* Controls */
.controls-list {
    font-size: 12px;
    line-height: 1.8;
    color: #ff9933;
}

.key {
    display: inline-block;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #ff6600;
    border-radius: 0;
    padding: 2px 8px;
    margin-right: 8px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #ffaa44;
    min-width: 20px;
    text-align: center;
    text-shadow: 0 0 3px rgba(255, 153, 51, 0.3);
    box-shadow: 0 0 5px rgba(255, 102, 0, 0.2);
}

/* Status */
#status {
    color: #ff9933;
    font-weight: 600;
    text-shadow: 0 0 5px rgba(255, 153, 51, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

#cargo {
    color: #ffaa44;
    text-shadow: 0 0 5px rgba(255, 170, 68, 0.5);
}

#hazards {
    color: #ff3333;
    text-shadow: 0 0 8px rgba(255, 51, 51, 0.6);
}

/* Info */
.info {
    font-size: 11px;
    color: #cc7700;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 102, 0, 0.3);
}

#stats {
    font-size: 10px;
    color: #ff9933;
    line-height: 1.6;
    opacity: 0.9;
}

/* Crosshair - defined in JS */

/* Mining Progress Bar - defined in JS */

/* Module System - MOBA Style (League of Legends style) */
#modules,
.modules-container {
    position: fixed !important;
    bottom: 30px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    display: flex !important;
    gap: 4px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    z-index: 10000 !important;
}

.module-slot {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(to bottom, #2a2a2a, #151515);
    border: 2px solid #4a4a4a;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    font-family: 'Arial', sans-serif;
    overflow: hidden;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 2px 8px rgba(0, 0, 0, 0.8);
}

.module-slot::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.1), transparent 50%);
    border-radius: 4px;
    opacity: 0.5;
    pointer-events: none;
}

.module-slot:hover {
    border-color: #ffaa00;
    background: linear-gradient(to bottom, #2a2a2a, #0f0f0f);
    transform: scale(1.05);
}

.module-slot:active {
    transform: scale(0.95);
}

.module-slot.active {
    border-color: #ffcc00;
    border-width: 2px;
    background: linear-gradient(to bottom, #2d2315, #1a1108);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.5),
        0 0 12px rgba(255, 204, 0, 0.4),
        0 2px 8px rgba(0, 0, 0, 0.8);
}

.module-slot.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: #ffcc00;
    box-shadow: 0 0 8px rgba(255, 204, 0, 0.8);
}

.module-slot.on-cooldown {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

.module-slot.on-cooldown::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.module-slot.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    filter: grayscale(1);
}

.module-slot.disabled .module-icon,
.module-slot.disabled .module-name {
    color: #666;
}

.module-slot.disabled::after {
    content: 'LOCKED';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ff4444;
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.module-key {
    position: absolute;
    bottom: 2px;
    right: 2px;
    padding: 2px 4px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #666;
    border-radius: 2px;
    font-size: 10px;
    color: #ccc;
    font-weight: bold;
    z-index: 2;
}

.module-icon {
    font-size: 28px;
    color: #ccc;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8));
    margin: 0;
}

.module-slot:hover .module-icon {
    color: #ffaa00;
}

.module-slot.active .module-icon {
    color: #ffcc00;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.6));
}

/* Fix laser module appearance - make it identical to others */
.module-slot[data-module="laser"] {
    background: linear-gradient(to bottom, #2a2a2a, #151515) !important;
    border: 2px solid #4a4a4a !important;
    opacity: 1 !important;
}

.module-slot[data-module="laser"] .module-icon {
    color: #ccc !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.8)) !important;
    opacity: 1 !important;
}

.module-slot[data-module="laser"]:hover {
    border-color: #ffaa00 !important;
}

.module-slot[data-module="laser"]:hover .module-icon {
    color: #ffaa00 !important;
}

.module-slot[data-module="laser"].active {
    background: linear-gradient(to bottom, #2d2315, #1a1108) !important;
    border-color: #ffcc00 !important;
}

.module-slot[data-module="laser"].active .module-icon {
    color: #ffcc00 !important;
    filter: drop-shadow(0 0 6px rgba(255, 204, 0, 0.6)) !important;
}

.module-name {
    display: none; /* Hide name to keep it clean like LoL */
}

.module-cooldown {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    transform-origin: top;
    transition: none;
    pointer-events: none;
    z-index: 3;
}

.module-cooldown-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: #fff;
    font-weight: bold;
    text-shadow: 
        0 0 4px rgba(0, 0, 0, 1),
        0 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 4;
    pointer-events: none;
}

/* Queue Display - defined in JS */