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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0f 0%, #1a1a1f 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff6600, #ffaa00, #ff6600);
    background-size: 200% 200%;
    animation: fireGlow 2s ease-in-out infinite alternate;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 102, 0, 0.5);
}

@keyframes fireGlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.warning {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid #ff4444;
    border-radius: 8px;
    padding: 10px;
    margin: 10px auto;
    max-width: 600px;
    font-weight: bold;
}

.main-content {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

#canvas {
    background: radial-gradient(circle at center, #1a1a1f 0%, #000000 100%);
    border: 2px solid #333;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 102, 0, 0.3);
}

.controls-panel {
    background: rgba(20, 20, 30, 0.9);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 20px;
    min-width: 250px;
    height: fit-content;
    backdrop-filter: blur(10px);
}

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

.fire-button {
    width: 100%;
    padding: 15px;
    font-size: 1.2rem;
    font-weight: bold;
    background: linear-gradient(135deg, #ff6600 0%, #ff4400 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fire-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, 0.6);
}

.fire-button.active {
    background: linear-gradient(135deg, #ff8800 0%, #ff6600 100%);
    animation: fireButtonPulse 0.5s ease-in-out infinite alternate;
}

@keyframes fireButtonPulse {
    0% { box-shadow: 0 4px 15px rgba(255, 102, 0, 0.4); }
    100% { box-shadow: 0 6px 25px rgba(255, 102, 0, 0.8); }
}

.safety-mode {
    margin-top: 10px;
    font-size: 0.9rem;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffcc99;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    background: #333;
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ff6600, #ffaa00);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

.fuel-gauge {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fuel-bar {
    flex: 1;
    height: 20px;
    background: #333;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #555;
}

.fuel-level {
    height: 100%;
    background: linear-gradient(90deg, #ff6600, #ffaa00);
    transition: width 0.3s ease;
    border-radius: 10px;
}

select {
    width: 100%;
    padding: 8px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 1rem;
}

.hud {
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid #444;
    border-radius: 5px;
    padding: 15px;
    margin: 20px 0;
}

.hud-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.reset-button {
    width: 100%;
    padding: 10px;
    background: #444;
    border: 1px solid #666;
    border-radius: 5px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-button:hover {
    background: #555;
    transform: translateY(-1px);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    border-top: 1px solid #333;
}

footer a {
    color: #ff6600;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.safety-notice {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #aaa;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        align-items: center;
    }
    
    .controls-panel {
        width: 100%;
        max-width: 400px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    #canvas {
        max-width: 100%;
    }
}

/* Checkbox and input styling */
input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Touch device improvements */
@media (hover: none) {
    .fire-button {
        font-size: 1.1rem;
        padding: 18px;
    }
    
    input[type="range"]::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
    }
}