@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', monospace;
    background: #000;
    color: #00FF00;
    overflow-x: hidden;
}

#app {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.game-header {
    background: #1A1A2E;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #00FFFF;
}

.game-header h1 {
    font-size: 14px;
    color: #FF00FF;
    text-shadow: 2px 2px 0 #00FFFF;
}

.header-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: #000;
    border: 2px solid #00FF00;
    color: #00FF00;
    padding: 8px 12px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
}

.icon-btn:hover {
    background: #00FF00;
    color: #000;
    transform: scale(1.1);
}

.score-display {
    display: flex;
    gap: 20px;
    font-size: 10px;
    color: #00FFFF;
}

.main-container {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
}

.controls-panel {
    background: #1A1A2E;
    padding: 20px;
    width: 280px;
    border: 3px solid #00FF00;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.panel-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.panel-section h3 {
    font-size: 10px;
    color: #FFFF00;
    border-bottom: 2px solid #00FFFF;
    padding-bottom: 5px;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.slider-group label {
    font-size: 8px;
    color: #00FFFF;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 8px;
    background: #000;
    border: 2px solid #00FF00;
    outline: none;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: #FF00FF;
    cursor: pointer;
    border: 2px solid #00FFFF;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #FF00FF;
    cursor: pointer;
    border: 2px solid #00FFFF;
}

.slider-group span {
    font-size: 8px;
    color: #FFFF00;
    text-align: right;
}

.action-btn {
    background: #000;
    border: 2px solid #00FF00;
    color: #00FF00;
    padding: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 8px;
    transition: all 0.2s;
    text-transform: uppercase;
}

.action-btn:hover {
    background: #00FF00;
    color: #000;
    transform: translateY(-2px);
}

.action-btn.secondary {
    border-color: #FF00FF;
    color: #FF00FF;
}

.action-btn.secondary:hover {
    background: #FF00FF;
    color: #000;
}

.level-select {
    background: #000;
    border: 2px solid #00FFFF;
    color: #00FFFF;
    padding: 8px;
    font-family: inherit;
    font-size: 8px;
    cursor: pointer;
}

.stats-panel {
    background: #000;
    border: 2px solid #FFFF00;
    padding: 15px;
    margin-top: auto;
}

.stats-panel h4 {
    font-size: 8px;
    color: #FFFF00;
    margin-bottom: 10px;
}

.stats-panel div {
    font-size: 8px;
    color: #00FFFF;
    margin: 5px 0;
}

.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#canvas {
    border: 3px solid #00FFFF;
    background: #000;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

.platform-tools {
    background: #1A1A2E;
    padding: 15px;
    border: 3px solid #FF00FF;
    width: 100%;
    max-width: 800px;
}

.platform-tools h3 {
    font-size: 10px;
    color: #FFFF00;
    margin-bottom: 10px;
}

.tool-buttons, .preset-buttons {
    display: flex;
    gap: 10px;
    margin: 10px 0;
}

.tool-btn {
    background: #000;
    border: 2px solid #00FFFF;
    color: #00FFFF;
    padding: 8px 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 8px;
    transition: all 0.2s;
}

.tool-btn.active {
    background: #00FFFF;
    color: #000;
}

.tool-btn:hover {
    transform: scale(1.05);
}

.preset-btn {
    background: #000;
    border: 2px solid #FFFF00;
    color: #FFFF00;
    padding: 10px 15px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 40px;
}

.preset-btn:hover {
    background: #FFFF00;
    color: #000;
}

.preset-btn.danger {
    border-color: #FF0000;
    color: #FF0000;
}

.preset-btn.danger:hover {
    background: #FF0000;
    color: #000;
}

.controls-hint {
    font-size: 8px;
    color: #00FFFF;
    text-align: center;
    background: #1A1A2E;
    padding: 10px;
    border: 2px solid #00FF00;
}

.game-footer {
    background: #1A1A2E;
    padding: 15px;
    text-align: center;
    font-size: 8px;
    color: #00FFFF;
    border-top: 3px solid #FF00FF;
}

.game-footer a {
    color: #FF00FF;
    text-decoration: none;
}

.game-footer a:hover {
    color: #FFFF00;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1A1A2E;
    border: 5px solid #00FFFF;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.8);
}

.modal-content h2 {
    font-size: 12px;
    color: #FF00FF;
    margin-bottom: 20px;
    text-align: center;
    text-shadow: 2px 2px 0 #00FFFF;
}

.tutorial-content {
    font-size: 9px;
    color: #00FF00;
    line-height: 1.8;
}

.tutorial-content p {
    margin: 15px 0;
}

.tutorial-content strong {
    color: #FFFF00;
}

.tutorial-content ul {
    list-style: none;
    margin: 10px 0;
    padding-left: 20px;
}

.tutorial-content li {
    margin: 8px 0;
    color: #00FFFF;
}

.tutorial-content .secret {
    color: #FF00FF;
    font-size: 8px;
    margin-top: 20px;
    text-align: center;
}

#floatingText {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* Mobile responsive */
@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
    }
    
    .controls-panel {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 600px) {
    .game-header h1 {
        font-size: 8px;
    }
    
    .score-display {
        flex-direction: column;
        gap: 5px;
        font-size: 7px;
    }
    
    .panel-section h3 {
        font-size: 8px;
    }
    
    .action-btn {
        font-size: 7px;
        padding: 8px;
    }
}