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

body {
    font-family: 'Courier New', monospace;
    overflow: hidden;
    background: #000;
}

#scene-container {
    width: 100vw;
    height: 100vh;
}

/* HUD */
#hud {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    pointer-events: none;
    z-index: 100;
    color: #0ff;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

#coordinates {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 2px solid #0ff;
}

#shop-name {
    position: absolute;
    top: 60px;
    left: 20px;
    font-size: 18px;
    font-weight: bold;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px 15px;
    border: 2px solid #f0f;
    color: #f0f;
    max-width: 400px;
}

#mini-map {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 150px;
    height: 150px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0ff;
}

#reality-meter {
    position: absolute;
    top: 190px;
    right: 20px;
    width: 150px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid #0ff;
    padding: 10px;
}

.meter-label {
    font-size: 10px;
    margin-bottom: 5px;
}

.meter-bar {
    width: 100%;
    height: 10px;
    background: #333;
    border: 1px solid #0ff;
}

#reality-fill {
    height: 100%;
    background: linear-gradient(90deg, #f0f, #0ff);
    width: 100%;
    transition: width 0.3s;
}

#controls-hint {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px 15px;
    border: 2px solid #0ff;
    text-align: center;
}

/* Control Panel */
#control-panel {
    position: fixed;
    bottom: 60px;
    left: 20px;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #0ff;
    color: #0ff;
    z-index: 100;
    transition: transform 0.3s;
    max-width: 300px;
}

#control-panel.collapsed #panel-content {
    display: none;
}

#panel-toggle {
    background: #0ff;
    color: #000;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
    pointer-events: auto;
}

#panel-content {
    padding: 15px;
    pointer-events: auto;
}

#panel-content h3 {
    font-size: 14px;
    margin-bottom: 10px;
    color: #f0f;
}

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

.control-group label {
    display: block;
    font-size: 11px;
    margin-bottom: 5px;
}

.control-group input,
.control-group select {
    width: 100%;
    padding: 5px;
    background: #000;
    border: 1px solid #0ff;
    color: #0ff;
    font-family: inherit;
    font-size: 12px;
}

#panel-content button {
    width: 100%;
    padding: 8px;
    margin-bottom: 8px;
    background: #000;
    border: 2px solid #0ff;
    color: #0ff;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
    transition: all 0.2s;
}

#panel-content button:hover {
    background: #0ff;
    color: #000;
}

/* Mobile Controls */
#mobile-controls {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 100;
}

#joystick-container {
    position: relative;
    width: 100px;
    height: 100px;
    pointer-events: auto;
}

#joystick-base {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(0, 255, 255, 0.2);
    border: 3px solid #0ff;
    left: 10px;
    top: 10px;
}

#joystick-stick {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 0, 255, 0.5);
    border: 2px solid #f0f;
    left: 30px;
    top: 30px;
    transition: none;
}

/* Footer */
#footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    border-top: 2px solid #0ff;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: auto;
}

#footer a {
    color: #0ff;
    text-decoration: none;
    font-size: 12px;
}

#footer a:hover {
    color: #f0f;
}

#footer button {
    background: #000;
    border: 2px solid #0ff;
    color: #0ff;
    padding: 5px 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 11px;
    margin-left: 10px;
}

#footer button:hover {
    background: #0ff;
    color: #000;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    pointer-events: auto;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: #000;
    border: 3px solid #0ff;
    padding: 30px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    color: #0ff;
    position: relative;
}

.modal-content h2 {
    color: #f0f;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.modal-content li {
    margin-bottom: 8px;
}

.flavor-text {
    font-style: italic;
    color: #f0f;
    margin-top: 20px;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #f0f;
}

.close:hover {
    color: #0ff;
}

/* Responsive */
.desktop-only {
    display: inline;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none;
    }
    
    .mobile-only {
        display: inline;
    }
    
    #control-panel {
        max-width: 250px;
        font-size: 11px;
    }
    
    #shop-name {
        font-size: 14px;
        max-width: 250px;
    }
    
    #coordinates {
        font-size: 11px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 20px;
        font-size: 14px;
    }
}

@media (min-width: 769px) {
    #mobile-controls {
        display: none;
    }
}