* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

#container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

#scene-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: #e0e0e0;
}

#sidebar {
    width: 250px;
    background-color: white;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#sidebar h2 {
    margin-bottom: 20px;
    text-align: center;
    color: #333;
    font-size: 1.5rem;
}

#wallpaper-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
    flex: 1;
}

.wallpaper-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px;
    cursor: grab;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.wallpaper-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.wallpaper-item:active {
    cursor: grabbing;
}

.wallpaper-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.wallpaper-item p {
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#reset-button {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 12px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: auto;
}

#reset-button:hover {
    background-color: #d32f2f;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading-spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add instructions overlay */
#instructions-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9rem;
    z-index: 100;
    max-width: 300px;
    transition: opacity 0.3s;
}

#instructions-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

#close-instructions {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

/* Responsive design */
@media (max-width: 768px) {
    #container {
        flex-direction: column;
    }
    
    #sidebar {
        width: 100%;
        height: 200px;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }
    
    #wallpaper-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

