:root {
    --primary-color: #22c55e;
    /* Green */
    --secondary-color: #4ade80;
    --accent-color: #f59e0b;
    --background-color: #ecfdf5;
    --belt-color: #3f3f46;
    --text-color: #14532d;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

#game-container {
    width: 100%;
    max-width: 800px;
    height: 100vh;
    max-height: 600px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

#game-header {
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    color: white;
    z-index: 10;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.game-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.stats {
    display: flex;
    gap: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 12px;
    border-radius: 8px;
}

.stat-label {
    font-size: 0.7rem;
    opacity: 0.9;
}

.stat-value {
    font-weight: bold;
    font-family: monospace;
    font-size: 1.2rem;
}

.icon-btn {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
}

#game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background-color: #f3f4f6;
    padding: 0;
    overflow: hidden;
}

.conveyor-belt {
    height: 120px;
    background-color: #e5e7eb;
    margin-top: 50px;
    position: relative;
    border-top: 5px solid #d1d5db;
    border-bottom: 5px solid #d1d5db;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.belt-track {
    width: 200%;
    height: 100%;
    background: repeating-linear-gradient(90deg,
            var(--belt-color) 0,
            var(--belt-color) 10px,
            #52525b 10px,
            #52525b 20px);
    position: absolute;
    left: 0;
    top: 0;
    animation: moveBelt 2s linear infinite;
    opacity: 0.8;
}

@keyframes moveBelt {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.trash-item {
    position: absolute;
    font-size: 3rem;
    z-index: 20;
    cursor: grab;
    transition: transform 0.1s;
    user-select: none;
    -webkit-user-drag: none;
}

.trash-item:active {
    cursor: grabbing;
    transform: scale(1.1);
}

.bins-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 40px;
    gap: 20px;
}

.bin {
    width: 100px;
    height: 120px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 10px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.2s;
}

.bin.hovered {
    transform: scale(1.05);
    background-color: rgba(255, 255, 255, 0.5);
}

.bin[data-type="paper"] {
    background-color: #3b82f6;
    color: white;
    border-color: #1d4ed8;
}

.bin[data-type="plastic"] {
    background-color: #f59e0b;
    color: white;
    border-color: #b45309;
}

.bin[data-type="glass"] {
    background-color: #22c55e;
    color: white;
    border-color: #15803d;
}

.bin[data-type="metal"] {
    background-color: #94a3b8;
    color: white;
    border-color: #475569;
}

.bin-icon {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.bin-label {
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Overlay */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 50;
}

.instruction {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

/* Modal */
.hidden {
    display: none !important;
}

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

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 320px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 0 #15803d;
    transition: transform 0.1s;
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow: 0 0 0;
}

.btn-secondary {
    background-color: transparent;
    color: #64748b;
    border: 2px solid #cbd5e1;
    padding: 10px 20px;
    border-radius: 30px;
    cursor: pointer;
    margin-top: 10px;
}