/* Visual Design Specification for Drill Pilot Game */
/* Dark, technical, industrial aesthetic */

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

body {
    font-family: 'Segoe UI', Consolas, 'Courier New', monospace;
    background: #0a0c10;
    color: rgb(230, 235, 245);
    overflow: hidden;
    height: 100vh;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    gap: 16px;
}

.controls {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn {
    background: linear-gradient(135deg, #1a1d26 0%, #282c3a 100%);
    border: 2px solid #3a4055;
    border-radius: 8px;
    color: #e6ebf5;
    padding: 12px 24px;
    font-size: 16px;
    font-family: 'Segoe UI', Consolas, 'Courier New', monospace;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.2s ease;
}

.btn:hover {
    background: linear-gradient(135deg, #252a38 0%, #3a4055 100%);
    border-color: #6eb4ff;
    box-shadow: 0 0 20px rgba(110, 180, 255, 0.25);
}

.btn:active {
    transform: scale(0.98);
}

.game-area {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

#gameCanvas {
    border: 2px solid #282c3a;
    border-radius: 4px;
    box-shadow: 0 0 40px rgba(110, 180, 255, 0.15);
    background: rgb(16, 18, 24);
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.hud-panel {
    position: absolute;
    background: rgba(0, 0, 0, 0.55);
    padding: 10px;
    line-height: 20px;
    font-size: 16px;
    font-family: Consolas, 'Courier New', monospace;
    color: rgb(230, 235, 245);
}

.left-panel {
    top: 10px;
    left: 10px;
    width: 320px;
}

.right-panel {
    top: 10px;
    right: 10px;
    width: 300px;
}

.hud-title {
    font-size: 20px;
    font-weight: bold;
    color: rgb(230, 235, 245);
    margin-bottom: 8px;
}

.hud-section {
    margin-top: 16px;
}

.hud-label {
    font-size: 16px;
    color: rgb(230, 235, 245);
    margin-bottom: 4px;
}

.hud-text {
    font-size: 16px;
    color: #8a90a0;
    margin-bottom: 4px;
}

.hud-value {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 4px;
}

/* Color classes for status */
.text-cyan {
    color: rgb(110, 180, 255);
}

.text-green {
    color: rgb(70, 210, 120);
}

.text-yellow {
    color: rgb(220, 200, 80);
}

.text-red {
    color: rgb(230, 80, 90);
}

.text-orange {
    color: rgb(255, 180, 110);
}

/* Text shadows for important text */
.hud-value.text-cyan,
.hud-value.text-green,
.hud-value.text-yellow,
.hud-value.text-red {
    text-shadow: 0 0 3px currentColor;
}

/* Help Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    overflow-y: auto;
    animation: fadeIn 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: rgba(20, 24, 32, 0.98);
    border: 3px solid rgb(110, 180, 255);
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    margin-top: 40px;
    margin-bottom: 40px;
    box-shadow: 0 0 40px rgba(110, 180, 255, 0.3);
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 2px solid rgba(110, 180, 255, 0.3);
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    color: rgb(110, 180, 255);
    text-shadow: 0 0 10px rgba(110, 180, 255, 0.5);
    margin: 0;
}

.modal-close-btn {
    background: transparent;
    border: 2px solid #3a4055;
    border-radius: 4px;
    color: rgb(230, 235, 245);
    font-size: 28px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close-btn:hover {
    border-color: rgb(110, 180, 255);
    background: rgba(110, 180, 255, 0.1);
    box-shadow: 0 0 10px rgba(110, 180, 255, 0.3);
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px 30px;
    border-top: 2px solid rgba(110, 180, 255, 0.3);
    display: flex;
    justify-content: center;
}

.help-section {
    margin-bottom: 30px;
}

.help-section:last-child {
    margin-bottom: 0;
}

.help-section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 12px;
    text-shadow: 0 0 5px currentColor;
}

.help-text {
    font-size: 16px;
    line-height: 1.6;
    color: #8a90a0;
}

.help-text p {
    margin-bottom: 12px;
}

.help-text p:last-child {
    margin-bottom: 0;
}

.help-text strong {
    color: rgb(230, 235, 245);
}

.help-list {
    margin-left: 20px;
    margin-bottom: 12px;
}

.help-list li {
    margin-bottom: 8px;
}

.help-list li:last-child {
    margin-bottom: 0;
}

.controls-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
    margin-top: 12px;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.control-key {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 16px;
    min-width: 100px;
    padding: 6px 12px;
    background: rgba(110, 180, 255, 0.1);
    border: 1px solid rgba(110, 180, 255, 0.3);
    border-radius: 4px;
    text-align: center;
}

.control-desc {
    color: #8a90a0;
}

/* Scrollbar styling for modal */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(110, 180, 255, 0.3);
    border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(110, 180, 255, 0.5);
}
