.spielfieber-supermarkt-wrapper .game-container {
    position: relative;
    width: 1000px;
    height: 600px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 0 auto;
    touch-action: none;
}

.spielfieber-supermarkt-wrapper .shelf-container {
    position: relative;
    width: 100%;
    height: 400px;
    background-color: #e8e8e8;
}

.spielfieber-supermarkt-wrapper .shelf-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.spielfieber-supermarkt-wrapper .shelf-foreground {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 3;
    pointer-events: none;
}

.spielfieber-supermarkt-wrapper .drop-zone {
    position: absolute;
    width: 80px;
    height: 80px;
    border: 2px dashed transparent;
    border-radius: 5px;
    z-index: 2;
    transition: all 0.3s ease;
}

.spielfieber-supermarkt-wrapper .drop-zone.drag-over {
    border-color: #2196F3;
}

.spielfieber-supermarkt-wrapper .drop-zone.filled {
    border-color: #2196F3;
    background-color: rgba(33, 150, 243, 0);
    border: 0px;
}

/* Drop zone positions - arranged in two rows of 5 */
.spielfieber-supermarkt-wrapper #zone-1 { top: 30px; left: 530px; }
.spielfieber-supermarkt-wrapper #zone-2 { top: 25px; left: 670px; }
.spielfieber-supermarkt-wrapper #zone-3 { top: 59px; left: 800px; }
.spielfieber-supermarkt-wrapper #zone-4 { top: 120px; left: 560px; }
.spielfieber-supermarkt-wrapper #zone-5 { top: 130px; left: 710px; }
.spielfieber-supermarkt-wrapper #zone-6 { top: 200px; left: 520px; }
.spielfieber-supermarkt-wrapper #zone-7 { top: 195px; left: 620px; }
.spielfieber-supermarkt-wrapper #zone-8 { top: 200px; left: 740px; }
.spielfieber-supermarkt-wrapper #zone-9 { top: 300px; left: 560px; }
.spielfieber-supermarkt-wrapper #zone-10 { top: 300px; left: 750px; }

.spielfieber-supermarkt-wrapper .products-container {
    position: relative;
    height: 200px;
    padding: 20px;
    background-color: #f8f8f8;
    border-top: 2px solid #ddd;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
}

.spielfieber-supermarkt-wrapper .product {
    width: 60px;
    height: 60px;
    cursor: grab;
    touch-action: none;
    transition: all 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.spielfieber-supermarkt-wrapper .product:active {
    cursor: grabbing;
}

.spielfieber-supermarkt-wrapper .product.dragging {
    opacity: 0.5;
    transform: scale(1.1);
    z-index: 1000;
}

.spielfieber-supermarkt-wrapper .product.placed {
    opacity: 0.3;
    pointer-events: none;
}

.spielfieber-supermarkt-wrapper .product-image {
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 5px;
}

/* Product images - loaded via inline CSS from PHP */

.spielfieber-supermarkt-wrapper .ui-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.spielfieber-supermarkt-wrapper .score {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.spielfieber-supermarkt-wrapper .timer-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px 15px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    min-width: 120px;
}

.spielfieber-supermarkt-wrapper .timer-label {
    font-weight: bold;
    text-align: center;
    font-size: 12px;
    margin-bottom: 5px;
    color: #333;
}

.spielfieber-supermarkt-wrapper .timer-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.spielfieber-supermarkt-wrapper .timer-fill {
    height: 100%;
    background-color: #4CAF50;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.spielfieber-supermarkt-wrapper .timer-fill.warning {
    background-color: #FF9800;
}

.spielfieber-supermarkt-wrapper .timer-fill.danger {
    background-color: #F44336;
}

.spielfieber-supermarkt-wrapper .timer-text {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.spielfieber-supermarkt-wrapper #reset-btn {
    background-color: #FF5722;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.spielfieber-supermarkt-wrapper #reset-btn:hover {
    background-color: #E64A19;
}

.spielfieber-supermarkt-wrapper .tutorial-overlay, 
.spielfieber-supermarkt-wrapper .victory-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 5;
}

.spielfieber-supermarkt-wrapper .tutorial-content, 
.spielfieber-supermarkt-wrapper .victory-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.spielfieber-supermarkt-wrapper .tutorial-content h2, 
.spielfieber-supermarkt-wrapper .victory-content h2 {
    color: #333;
    margin-bottom: 20px;
}

.spielfieber-supermarkt-wrapper .tutorial-content p, 
.spielfieber-supermarkt-wrapper .victory-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 30px;
}

.spielfieber-supermarkt-wrapper #start-btn, 
.spielfieber-supermarkt-wrapper #play-again-btn,
.spielfieber-supermarkt-wrapper #play-main-game-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    margin: 5px;
}

.spielfieber-supermarkt-wrapper #start-btn:hover, 
.spielfieber-supermarkt-wrapper #play-again-btn:hover,
.spielfieber-supermarkt-wrapper #play-main-game-btn:hover {
    background-color: #45a049;
}

/* Landscape mode requirement for mobile */
.spielfieber-supermarkt-wrapper .orientation-message {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-size: 24px;
    padding: 40px;
}

@media (max-width: 900px) and (orientation: portrait) {
    .spielfieber-supermarkt-wrapper .game-container {
        display: none !important;
    }

    .spielfieber-supermarkt-wrapper .orientation-message {
        display: flex;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    .spielfieber-supermarkt-wrapper {
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
    }

    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.85);
        transform-origin: center center;
        margin: 0 auto;
        display: flex;
        flex-direction: row;
    }

    .spielfieber-supermarkt-wrapper .products-container {
        order: -1;
        width: 250px;
        height: 600px;
        border-top: none;
        border-right: 2px solid #ddd;
        flex-direction: column;
        justify-content: flex-start;
        padding: 15px 10px;
        gap: 8px;
        flex-shrink: 0;
    }

    .spielfieber-supermarkt-wrapper .shelf-container {
        flex: 1;
        width: auto;
        height: 600px;
    }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.65);
        transform-origin: center center;
    }
}

@media (max-width: 900px) and (orientation: landscape) and (max-height: 400px) {
    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.55);
        transform-origin: center center;
    }
}

@media (max-width: 700px) and (orientation: landscape) {
    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.75);
        transform-origin: center center;
        display: flex;
        flex-direction: row;
    }

    .spielfieber-supermarkt-wrapper .products-container {
        width: 220px;
        padding: 12px 8px;
        gap: 6px;
    }
}

@media (max-width: 700px) and (orientation: landscape) and (max-height: 450px) {
    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.6);
        transform-origin: center center;
    }
}

@media (max-width: 500px) and (orientation: landscape) {
    .spielfieber-supermarkt-wrapper .game-container {
        transform: scale(0.5);
        transform-origin: center center;
        display: flex;
        flex-direction: row;
    }

    .spielfieber-supermarkt-wrapper .products-container {
        width: 200px;
        padding: 10px 6px;
        gap: 5px;
    }
}