* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', 'Poppins', system-ui, sans-serif;
            user-select: none;
        }

        body {
            background: #c6ac8f;
            min-height: 100vh;
            padding: 20px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
        }

        /* Main Game Wrapper */
        .game-world {
            max-width: 1400px;
            width: 100%;
            margin: 0 auto;
        }

        /* ========== STYLISH HEADER WITH LOGO ========== */
        .game-header {
            background: #5e503f;
            backdrop-filter: blur(12px);
            border-radius: 60px;
            padding: 12px 28px;
            margin-bottom: 25px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 15px;
            border: 1px solid rgba(255, 217, 102, 0.3);
            box-shadow: 0 10px 25px rgba(0,0,0,0.3);
        }

        .game-logo {
            display: flex;
            align-items: baseline;
            gap: 6px;
            flex-wrap: wrap;
        }

        .logo-icon {
            font-size: 2rem;
            filter: drop-shadow(0 0 4px #ffd966);
        }

        .logo-text-main {
            font-size: 1.7rem;
            font-weight: 800;
            background: yellow;
            -webkit-background-clip: text;
            background-clip: text;
            color: yellow;
            letter-spacing: 1px;
        }

        .header-badge {
            background: black;
            padding: 6px 18px;
            border-radius: 40px;
            color: white;
            font-size: 0.8rem;
            font-weight: bold;
            backdrop-filter: blur(4px);
        }

        .game-container {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            gap: 25px;
            justify-content: center;
        }

        .game-panel {
            flex: 2;
            min-width: 320px;
            background: #adc178;
            backdrop-filter: blur(6px);
            border-radius: 48px;
            padding: 22px;
            box-shadow: 0 25px 40px rgba(0,0,0,0.5);
        }

        .game-card {
            background: #373d20;
            border-radius: 40px;
            padding: 20px;
        }

        .header {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
            padding-bottom: 12px;
            border-bottom: 2px solid #ffd96655;
        }

        .logo h1 {
            font-size: 1.5rem;
            background: linear-gradient(135deg, #FFD966, #FF8C42);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        /* Player info removed */

        .selector-panel {
            background: #003049;
            border-radius: 60px;
            padding: 15px 22px;
            margin-bottom: 18px;
        }

        .selector-title {
            color: #ffd966;
            font-weight: bold;
            margin-bottom: 12px;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .slider-container {
            display: flex;
            align-items: center;
            gap: 20px;
            flex-wrap: wrap;
        }

        input[type="range"] {
            flex: 1;
            min-width: 180px;
            height: 6px;
            -webkit-appearance: none;
            background:white;
            border-radius: 10px;
            outline: none;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 22px;
            height: 22px;
            background: #FFD966;
            border-radius: 50%;
            cursor: pointer;
            box-shadow: 0 0 8px #ffb347;
            border: none;
        }

        .box-value {
            background: black;
            padding: 6px 18px;
            border-radius: 40px;
            font-weight: bold;
            color: white;
            font-size: 1.2rem;
            min-width: 80px;
            text-align: center;
        }

        .start-btn {
            background: #4caf50;
            color: white;
            padding: 8px 28px;
            font-size: 1rem;
        }

        .stats-row {
            display: flex;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 15px;
            background: #003049;
            border-radius: 60px;
            padding: 12px 20px;
            margin-bottom: 20px;
        }

        .stat-box {
            text-align: center;
        }

        .stat-label {
            font-size: 0.7rem;
            color: #aad0d4;
        }

        .stat-value {
            font-size: 1.6rem;
            font-weight: 800;
            color: white;
            line-height: 1;
        }

        .board {
            display: grid;
            gap: 10px;
            justify-content: center;
            margin: 20px 0;
        }

        .card {
            aspect-ratio: 3 / 4;
            background: red;
            perspective: 800px;
            cursor: pointer;
        }

        .card-inner {
            position: relative;
            width: 100%;
            height: 100%;
            transition: transform 0.35s;
            transform-style: preserve-3d;
            border-radius: 14px;
        }

        .card.flipped .card-inner {
            transform: rotateY(180deg);
        }

        .card.matched {
            cursor: default;
            opacity: 0.7;
        }

        .card-front, .card-back {
            position: absolute;
            width: 100%;
            height: 100%;
            backface-visibility: hidden;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 2rem;
            font-weight: bold;
            box-shadow: 0 6px 12px rgba(0,0,0,0.3);
        }

        .card-back {
            background: linear-gradient(145deg, #2c5f6b, #1a434d);
            border: 2px solid #ffd966;
            transform: rotateY(0deg);
        }

        .card-back::after {
            content: "?";
            font-size: 2rem;
            font-weight: 800;
            color: #FFE2A4;
        }

        .card-front {
            background: white;
            transform: rotateY(180deg);
            background: linear-gradient(135deg, #FFF8E7, #FFFAF0);
        }

        .mismatch-cross {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 5rem;
            font-weight: bold;
            color: #ff4444;
            text-shadow: 0 0 10px darkred;
            animation: crossFade 0.6s ease-out forwards;
            pointer-events: none;
            z-index: 1000;
        }

        @keyframes crossFade {
            0% { opacity: 1; transform: translate(-50%, -50%) scale(0.8); }
            100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
        }

        .controls {
            display: flex;
            gap: 12px;
            justify-content: center;
            flex-wrap: wrap;
            margin: 15px 0;
        }

        button {
            border: none;
            padding: 8px 20px;
            border-radius: 60px;
            font-weight: bold;
            cursor: pointer;
            background: #F2C46B;
            color: black;
            transition: 0.08s;
        }

        button:active { transform: scale(0.96); }

        .history-panel {
            flex: 1;
            min-width: 280px;
            background: #90a955;
            backdrop-filter: blur(6px);
            border-radius: 48px;
            padding: 22px;
        }

        .history-card {
            background: #003049;
            border-radius: 40px;
            padding: 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
        }

        .history-title {
            font-size: 1.3rem;
            font-weight: bold;
            color: white;
            margin-bottom: 15px;
            text-align: center;
        }

        .history-list {
            max-height: 500px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .history-item {
            background: #03161cb3;
            border-radius: 24px;
            padding: 10px 12px;
            font-size: 0.75rem;
            color: #eef4ff;
            border-left: 4px solid #ffd966;
        }

        .first-match-history-item {
            border-left: 4px solid #4caf50;
            background: #0a3a2ecc;
        }

        .clear-history {
            margin-top: 15px;
            background: #606c38;
            color: white;
        }

        /* Name modal removed */

        .first-match-alert {
            position: fixed;
            bottom: 30px;
            right: 30px;
            background: linear-gradient(135deg, #1f5f6b, #0e3a42);
            border-left: 5px solid #4caf50;
            padding: 15px 25px;
            border-radius: 30px;
            color: white;
            font-weight: bold;
            z-index: 1500;
            box-shadow: 0 10px 20px rgba(0,0,0,0.3);
            animation: slideIn 0.4s ease-out;
            max-width: 320px;
        }

        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* ========== STYLISH PROFESSIONAL FOOTER ========== */
        .game-footer {
            margin-top: 35px;
            background: #582f0e;
            backdrop-filter: blur(12px);
            border-radius: 48px;
            padding: 20px 30px;
            border: 1px solid rgba(255, 217, 102, 0.3);
            width: 100%;
        }

        .footer-content {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            gap: 20px;
            margin-bottom: 15px;
        }

        .footer-brand {
            display: flex;
            flex-direction: column;
        }

        .footer-brand .brand-name {
            font-size: 1.2rem;
            font-weight: 800;
            background: linear-gradient(120deg, #FFD966, #FFA559);
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
        }

        .footer-brand .tag {
            font-size: 0.7rem;
            color: #b9d8dd;
        }

        .footer-links {
            display: flex;
            gap: 28px;
            flex-wrap: wrap;
        }

        .footer-links span {
            color: #b9d8dd;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: default;
        }

        .footer-social {
            display: flex;
            gap: 15px;
        }

        .social-icon {
            background: rgba(255,255,255,0.1);
            padding: 6px 14px;
            border-radius: 40px;
            font-size: 0.8rem;
            font-weight: bold;
            color: #b9d8dd;
        }

        .footer-copyright {
            text-align: center;
            padding-top: 12px;
            border-top: 1px dashed rgba(255, 200, 100, 0.3);
            font-size: 0.7rem;
            color: #b9d8dd;
            letter-spacing: 0.5px;
        }

        @media (max-width: 800px) {
            .game-container { flex-direction: column; }
            .stat-value { font-size: 1.2rem; }
            .card-front, .card-back { font-size: 1.5rem; }
            .first-match-alert { bottom: 10px; right: 10px; padding: 10px 18px; font-size: 0.8rem; }
            .game-header { flex-direction: column; text-align: center; }
            .logo-text-main { font-size: 1.3rem; }
        }