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

        body {
            font-family: Arial, sans-serif;
            background-color: #69a9e6;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .game-container {
            text-align: center;
            max-width: 600px;
            width: 100%;
            background: #4b78a3;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
            
        }

        .game-board {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
            margin: 20px auto;
            max-width: 400px;
            
        }

        .card {
            aspect-ratio: 1;
            border: 2px solid #ddd;
            border-radius: 8px;
            background: #6c757d;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.8em;
            font-weight: bold;
            color: white;
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }

        .card:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        }

        .card.flipped {
            background: #28a745;
            border-color: #28a745;
        }

        .card.matched {
            background: #007bff;
            border-color: #007bff;
            transform: scale(0.95);
        }

        .controls {
            margin-top: 20px;
            display: flex;
            gap: 10px;
            justify-content: center;
            flex-wrap: wrap;
        }

        button {
            padding: 10px 20px;
            font-size: 1em;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            background: #007bff;
            color: white;
            transition: background 0.2s ease;
        }

        button:hover {
            background: #0056b3;
        }

        .win-message {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: white;
            padding: 30px;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.3);
            z-index: 1000;
            text-align: center;
            display: none;
        }

        .overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.5);
            z-index: 999;
            display: none;
        }

        @media (max-width: 500px) {
            .game-board {
                grid-template-columns: repeat(3, 1fr);
                gap: 8px;
            }
            
            .card {
                font-size: 1.5em;
            }
            
            .game-container {
                padding: 20px;
            }
        }