body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #e0f7fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

#game-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

#ui-layer {
    padding: 20px;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #006064;
    z-index: 10;
    background: rgba(255, 255, 255, 0.5);
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

#conveyor-area {
    flex: 1;
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.belt {
    width: 100%;
    height: 100px;
    background: repeating-linear-gradient(
        -45deg,
        #607D8B,
        #607D8B 30px,
        #455A64 30px,
        #455A64 60px
    );
    border-top: 6px solid #263238;
    border-bottom: 6px solid #263238;
    box-shadow: 0 15px 25px rgba(0,0,0,0.2);
    position: absolute;
    box-sizing: border-box;
}

#bins-area {
    height: 140px;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: flex-end;
    padding: 0 10px 20px 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 5;
}

.bin {
    flex: 1;
    max-width: 150px;
    height: 110px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: bold;
    font-size: clamp(14px, 4vw, 20px);
    box-shadow: inset 0 -15px 0 rgba(0,0,0,0.2), 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    transition: transform 0.1s;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.bin.recycle { background-color: #29B6F6; border: 3px solid #0288D1; border-bottom: none; }
.bin.compost { background-color: #66BB6A; border: 3px solid #388E3C; border-bottom: none; }
.bin.landfill { background-color: #78909C; border: 3px solid #455A64; border-bottom: none; }

.bin-label {
    text-align: center;
}

/* Item styling */
.trash-item {
    position: absolute;
    width: 70px;
    height: 70px;
    background-color: #ffffff;
    border: 2px solid #ddd;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    cursor: grab;
    z-index: 50;
    top: 0;
    left: 0;
}

.trash-item:active {
    cursor: grabbing;
}

.trash-item.dragged {
    z-index: 100;
    box-shadow: 0 15px 25px rgba(0,0,0,0.4);
    border-color: #aaa;
}

.item-icon {
    font-size: 32px;
    line-height: 1;
}

.item-name {
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin-top: 4px;
    line-height: 1.1;
    padding: 0 2px;
}

@keyframes flashGreen {
    0% { filter: brightness(1.5) hue-rotate(-20deg); transform: scale(1.05); }
    100% { filter: brightness(1); transform: scale(1); }
}
.flash-green {
    animation: flashGreen 0.3s ease-out;
}

#game-over-screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}

#game-over-screen.hidden {
    display: none;
}

#game-over-screen h2 {
    font-size: 48px;
    margin-bottom: 10px;
    color: #FF5252;
    text-shadow: 0 0 10px rgba(255, 82, 82, 0.5);
}

#game-over-screen p {
    font-size: 24px;
    margin: 10px 0;
}

.restart-hint {
    margin-top: 30px !important;
    font-size: 18px !important;
    opacity: 0.8;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
