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

        body {
            font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .container {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(20px);
            border-radius: 20px;
            padding: 30px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
            border: 1px solid rgba(255, 255, 255, 0.2);
            max-width: 900px;
            width: 100%;
        }

        h1 {
            text-align: center;
            color: white;
            margin-bottom: 30px;
            font-size: 2.5em;
            font-weight: 700;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        }

        .controls {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            justify-content: center;
            margin-bottom: 30px;
            align-items: center;
        }

        .control-group {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 5px;
        }

        .control-group label {
            color: white;
            font-size: 0.9em;
            font-weight: 500;
        }

        select, input[type="file"] {
            padding: 10px 15px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 14px;
            outline: none;
            cursor: pointer;
        }

        select option {
            background: #4a5568;
            color: white;
        }

        .action-buttons {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            justify-content: center;
        }

        button {
            padding: 12px 24px;
            border: none;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        button:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        button:active {
            transform: translateY(0);
        }

        button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .game-info {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            flex-wrap: wrap;
            gap: 15px;
        }

        .info-item {
            background: rgba(255, 255, 255, 0.1);
            padding: 10px 20px;
            border-radius: 10px;
            color: white;
            font-weight: 600;
            text-align: center;
            min-width: 120px;
        }

        .info-item .label {
            font-size: 0.8em;
            opacity: 0.8;
            display: block;
            margin-bottom: 5px;
        }

        .info-item .value {
            font-size: 1.2em;
            font-weight: 700;
        }

        .game-area {
            display: flex;
            gap: 30px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .puzzle-container {
            position: relative;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 15px;
            padding: 20px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        }

        .puzzle-board {
            display: grid;
            gap: 2px;
            border-radius: 10px;
            overflow: hidden;
            background: rgba(0, 0, 0, 0.2);
            width: 400px;
            height: 400px;
        }

        .puzzle-piece {
            background-size: cover;
            background-position: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid transparent;
            position: relative;
            overflow: hidden;
        }

        .puzzle-piece:hover {
            transform: scale(1.05);
            border-color: rgba(255, 255, 255, 0.5);
            z-index: 10;
        }

        .puzzle-piece.selected {
            border-color: #ffd700;
            box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
            transform: scale(1.1);
            z-index: 20;
        }

        .puzzle-piece.correct {
            border-color: #00ff88;
            box-shadow: 0 0 15px rgba(0, 255, 136, 0.4);
        }

        .reference-image {
            width: 200px;
            height: 200px;
            border-radius: 10px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            background-size: cover;
            background-position: center;
            background-color: rgba(255, 255, 255, 0.1);
        }

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

        .modal-content {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            color: white;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
            max-width: 400px;
        }

        .modal-content h2 {
            margin-bottom: 20px;
            font-size: 2em;
        }

        .modal-content p {
            margin-bottom: 30px;
            font-size: 1.1em;
            line-height: 1.6;
        }

        .progress-bar {
            width: 100%;
            height: 8px;
            background: rgba(255, 255, 255, 0.2);
            border-radius: 4px;
            margin: 20px 0;
            overflow: hidden;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, #00ff88, #00ccff);
            border-radius: 4px;
            transition: width 0.5s ease;
            width: 0%;
        }

        .image-upload {
            position: relative;
            overflow: hidden;
            display: inline-block;
        }

        .image-upload input[type="file"] {
            position: absolute;
            left: -9999px;
        }

        .upload-label {
            padding: 10px 20px;
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-block;
        }

        .upload-label:hover {
            background: rgba(255, 255, 255, 0.3);
        }

        .difficulty-indicator {
            position: absolute;
            top: 10px;
            right: 10px;
            background: rgba(0, 0, 0, 0.7);
            color: white;
            padding: 5px 10px;
            border-radius: 15px;
            font-size: 0.8em;
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .container {
                padding: 20px;
            }

            h1 {
                font-size: 2em;
            }

            .puzzle-board {
                width: 300px;
                height: 300px;
            }

            .reference-image {
                width: 150px;
                height: 150px;
            }

            .game-area {
                flex-direction: column;
                align-items: center;
            }

            .controls {
                flex-direction: column;
                gap: 10px;
            }
        }

        @media (max-width: 480px) {
            .puzzle-board {
                width: 250px;
                height: 250px;
            }

            .reference-image {
                width: 120px;
                height: 120px;
            }
        }