* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    background-color: #222;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    width: 100%;
    gap: 20px;
}

.pfd-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.pfd-display {
    width: 600px;
    height: 600px;
    background-color: #000;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 255, 0.3);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    cursor: move;
    overflow: hidden; 
}

@media (min-width: 1024px) {
    .container {
        flex-direction: row;
    }
    
    .pfd-container {
        flex: 2;
    }
    
    .instructions {
        flex: 1;
    }
}

#pfd {
    display: none; /* Hide the original PFD canvas */
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    width: 100%;
    padding: 15px;
    background-color: #333;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

label {
    font-size: 14px;
    color: #aaa;
}

input[type="range"] {
    width: 100%;
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: #555;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #0af;
    border-radius: 50%;
    cursor: pointer;
}

span {
    font-size: 16px;
    font-weight: bold;
    color: #0af;
}

.instructions {
    background-color: #333;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

#gamepad-status {
    font-size: 14px;
    color: #fff;
    padding: 5px 0;
    text-align: center;
    font-weight: bold;
    margin-top: 10px;
    border-top: 1px solid #555;
}

h2 {
    margin-bottom: 15px;
    color: #0af;
}

p {
    margin-bottom: 10px;
    line-height: 1.5;
}

ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
}

.mission-panel {
    display: flex;
    justify-content: space-between;
    width: 600px;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 10px;
    margin-top: 10px;
    border: 1px solid #0af;
}

#mission-info, #mission-timer, #mission-score {
    color: #0af;
    font-size: 18px;
    font-weight: bold;
}

#mission-timer.warning {
    color: #ff5500;
}

#mission-timer.danger {
    color: #ff0000;
}

.mission-target {
    color: #0af;
    font-weight: bold;
}

.target-indicator {
    color: #00ffff;
    position: absolute;
    font-weight: bold;
    font-size: 16px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #00ffff;
}

.modal {
    display: none; /* Hide the modal by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #333;
    padding: 30px;
    border-radius: 10px;
    max-width: 600px;
    text-align: center;
    border: 2px solid #0af;
    box-shadow: 0 0 20px rgba(0, 0, 255, 0.5);
}

.modal-content h2 {
    color: #ff5500;
    margin-bottom: 20px;
    font-size: 28px;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 16px;
}

#accept-disclaimer {
    background-color: #0af;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    font-size: 16px;
    margin-top: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#accept-disclaimer:hover {
    background-color: #08f;
}