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

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

        .container {
            max-width: 800px;
            width: 100%;
        }

        .header {
            text-align: center;
            margin-bottom: 30px;
            color: white;
        }

        .header h1 {
            font-size: 3em;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
            margin-bottom: 10px;
            animation: pulse 2s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.05); }
        }

        .stats {
            display: flex;
            justify-content: center;
            gap: 40px;
            margin-bottom: 20px;
            flex-wrap: wrap;
        }

        .stat {
            background: rgba(255, 255, 255, 0.2);
            backdrop-filter: blur(10px);
            padding: 15px 30px;
            border-radius: 15px;
            color: white;
            font-size: 1.2em;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        .stat span {
            font-weight: bold;
            font-size: 1.4em;
            display: block;
            margin-top: 5px;
        }

        .game-board {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
            margin-bottom: 30px;
            perspective: 1000px;
        }

        .card {
            aspect-ratio: 1;
            position: relative;
            cursor: pointer;
            transform-style: preserve-3d;
            transition: transform 0.6s;
        }

        .card.flipped {
            transform: rotateY(180deg);
        }

        .card.matched {
            animation: matchPulse 0.6s ease;
            pointer-events: none;
        }

        @keyframes matchPulse {
            0%, 100% { transform: rotateY(180deg) scale(1); }
            50% { transform: rotateY(180deg) scale(1.1); }
        }

        .card-face {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 15px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 3em;
            box-shadow: 0 4px 15px rgba(0,0,0,0.3);
        }

        .card-front {
            background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
            transform: rotateY(180deg);
        }

        .card-back {
            background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
            position: relative;
            overflow: hidden;
        }

        .card-back::before {
            content: '?';
            font-size: 4em;
            color: white;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .card-back::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: repeating-linear-gradient(
                45deg,
                transparent,
                transparent 10px,
                rgba(255,255,255,0.1) 10px,
                rgba(255,255,255,0.1) 20px
            );
            animation: slide 3s linear infinite;
        }

        @keyframes slide {
            0% { transform: translate(0, 0); }
            100% { transform: translate(50px, 50px); }
        }

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

        button {
            background: white;
            color: #667eea;
            border: none;
            padding: 15px 40px;
            font-size: 1.1em;
            font-weight: bold;
            border-radius: 30px;
            cursor: pointer;
            transition: all 0.3s;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
        }

        button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        }

        button:active {
            transform: translateY(-1px);
        }

        .victory-message {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.8);
            justify-content: center;
            align-items: center;
            z-index: 1000;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .victory-content {
            background: white;
            padding: 40px;
            border-radius: 20px;
            text-align: center;
            animation: scaleIn 0.5s;
        }

        @keyframes scaleIn {
            from { transform: scale(0.5); }
            to { transform: scale(1); }
        }

        .victory-content h2 {
            color: #667eea;
            font-size: 2.5em;
            margin-bottom: 20px;
        }

        .victory-content p {
            font-size: 1.3em;
            margin-bottom: 30px;
            color: #333;
        }

        @media (max-width: 600px) {
            .game-board {
                gap: 10px;
            }
            
            .card-face {
                font-size: 2em;
            }
            
            .card-back::before {
                font-size: 2.5em;
            }
            
            .header h1 {
                font-size: 2em;
            }
        }