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

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.container {
    max-width: 1000px;
    padding: 20px;
    width: 100%;
}

.header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.back-button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background-color: #2196f3;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background-color: #1976d2;
}

.back-button i {
    font-size: 16px;
}

.game-settings {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-select {
    display: flex;
    align-items: center;
    gap: 10px;
}

.image-select select {
    padding: 8px;
    border: 2px solid #2196f3;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    outline: none;
}

.game-info {
    display: flex;
    justify-content: space-between;
    margin: 20px 0;
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.puzzle-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.puzzle-board {
    display: grid;
    gap: 1px;
    background-color: #666;
    padding: 1px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 0 auto;
}

.puzzle-piece {
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
    background-size: cover;
    position: relative;
    overflow: hidden;
    background-repeat: no-repeat;
    background-color: white;
}

.puzzle-piece:hover {
    transform: scale(0.98);
}

.puzzle-piece.empty {
    background: #f0f0f0;
    border: none;
}

.piece-number {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    pointer-events: none;
}

.preview-container {
    padding: 10px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.preview-container img {
    max-width: 300px;
    border-radius: 4px;
}

button {
    padding: 10px 20px;
    margin: 0 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    background-color: #2196f3;
    color: white;
    font-weight: bold;
}

button:hover {
    background-color: #1976d2;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.modal-logo {
    width: 150px;
    height: auto;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .puzzle-container {
        flex-direction: column;
    }
    
    .puzzle-board {
        width: 100% !important;
        height: auto !important;
    }
    
    .puzzle-piece {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 1;
    }
    
    .preview-container img {
        max-width: 200px;
    }
    
    .piece-number {
        font-size: 10px;
        padding: 1px 4px;
    }
} 