* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
}

.game-container {
    max-width: 1200px;
    width: 100%;
    padding: 20px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 20px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.game-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.puzzle-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.reference-image-container {
    max-width: 300px;
    margin: 0 auto;
}

#reference-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.puzzle-area {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    touch-action: none;
}

button {
    padding: 8px 16px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #45a049;
}

select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.puzzle-piece {
    position: absolute;
    cursor: pointer;
    user-select: none;
    transform-origin: top left;
    transition: transform 0.1s ease-out;
}

.puzzle-piece.dragging {
    z-index: 1000;
    transition: none;
}

.puzzle-piece.connected {
    z-index: 100;
}

@media (max-width: 768px) {
    .game-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .game-controls {
        margin-top: 10px;
    }
    
    .puzzle-area {
        height: 450px;
    }
} 