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

body {
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background: #000;
}

#game-container {
    width: 100vw;
    height: 100vh;
    position: relative;
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* HUD (Heads Up Display) */
#hud {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    font-size: 20px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    z-index: 100;
}

#hud > div {
    margin-bottom: 10px;
    background: rgba(0,0,0,0.5);
    padding: 10px 15px;
    border-radius: 8px;
}

#settings-button {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
}

#settings-button:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.05);
}

#camera-toggle {
    position: absolute;
    top: 80px;
    right: 20px;
    padding: 10px 15px;
    background: rgba(0,0,0,0.7);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
    font-weight: bold;
}

#camera-toggle:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.05);
}

#shop-button {
    position: absolute;
    top: 140px;
    right: 20px;
    padding: 10px 15px;
    background: rgba(0,200,0,0.7);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    z-index: 100;
    transition: all 0.2s;
    font-weight: bold;
}

#shop-button:hover {
    background: rgba(0,200,0,0.9);
    transform: scale(1.05);
}

#shop-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid rgba(255,215,0,0.5);
    z-index: 200;
    min-width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    color: white;
}

#shop-menu h2 {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 28px;
}

#shop-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.shop-item {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.2s;
}

.shop-item:hover {
    background: rgba(255,255,255,0.2);
    transform: scale(1.02);
    border-color: rgba(255,215,0,0.8);
}

.shop-item.owned {
    background: rgba(0,150,0,0.3);
    border-color: rgba(0,255,0,0.5);
}

.shop-item.equipped {
    background: rgba(0,100,255,0.3);
    border-color: rgba(0,150,255,0.8);
}

.shop-item-name {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-item-stats {
    font-size: 14px;
    margin-bottom: 10px;
    color: #aaa;
}

.shop-item-price {
    font-size: 18px;
    color: #FFD700;
    font-weight: bold;
}

#close-shop {
    width: 100%;
    padding: 12px;
    background: rgba(255,50,50,0.8);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

#close-shop:hover {
    background: rgba(255,50,50,1);
}

#settings-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.95);
    padding: 30px;
    border-radius: 15px;
    border: 3px solid rgba(255,255,255,0.3);
    z-index: 200;
    min-width: 350px;
    max-width: 90vw;
    color: white;
}

#settings-menu h2 {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 28px;
}

.setting-group {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.setting-group label {
    font-size: 18px;
    font-weight: bold;
}

.setting-group select {
    padding: 8px 12px;
    background: rgba(255,255,255,0.1);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    color: white;
    font-size: 16px;
    cursor: pointer;
}

.setting-group input[type="checkbox"] {
    width: 25px;
    height: 25px;
    cursor: pointer;
}

#apply-settings, #close-settings {
    width: 48%;
    padding: 12px;
    margin-top: 20px;
    background: rgba(0,150,255,0.8);
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 8px;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

#close-settings {
    background: rgba(255,50,50,0.8);
}

#apply-settings:hover {
    background: rgba(0,150,255,1);
    transform: scale(1.02);
}

#close-settings:hover {
    background: rgba(255,50,50,1);
    transform: scale(1.02);
}

/* Mobile Controls */
#mobile-controls {
    display: none;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 250px;
    z-index: 50;
    pointer-events: none;
}

#mobile-controls > * {
    pointer-events: auto;
}

/* Joystick */
#joystick-area {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 150px;
    height: 150px;
}

#joystick-base {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255,255,255,0.3);
    border: 4px solid rgba(255,255,255,0.6);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

#joystick-stick {
    position: absolute;
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.7);
    border: 4px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    touch-action: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Camera Control Area */
#mobile-camera-area {
    position: absolute;
    bottom: 30px;
    right: 200px;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.1);
    border: 3px dashed rgba(255,255,255,0.3);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#mobile-camera-area::before {
    content: '↔️ Kamera drehen';
    color: rgba(255,255,255,0.7);
    font-size: 16px;
    font-weight: bold;
    text-align: center;
}

/* Shoot Button */
#shoot-button {
    position: absolute;
    bottom: 60px;
    right: 50px;
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(255,0,0,0.8), rgba(200,0,0,0.9));
    border: 5px solid rgba(255,255,255,0.9);
    border-radius: 50%;
    font-size: 50px;
    color: white;
    cursor: pointer;
    touch-action: none;
    transition: all 0.1s;
    box-shadow: 0 6px 25px rgba(255,0,0,0.5);
}

#shoot-button:active {
    background: linear-gradient(135deg, rgba(255,50,50,1), rgba(255,0,0,1));
    transform: scale(0.92);
    box-shadow: 0 3px 15px rgba(255,0,0,0.7);
}

/* Mobile Detection */
@media (max-width: 768px), (pointer: coarse) {
    #mobile-controls {
        display: block;
    }
    
    #hud {
        font-size: 16px;
    }
}

/* Cursor für PC */
@media (min-width: 769px) and (pointer: fine) {
    body {
        cursor: crosshair;
    }
}