  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }

  body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
  }

  header {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  header h1 {
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #007AFF, #5856D6, #AF52DE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

          /* Navbar */
        .navbar {
            backdrop-filter: blur(20px);
            background: rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 1rem 2rem;
            position: sticky;
            top: 0;
            z-index: 100;
            transition: all 0.3s ease;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            background: linear-gradient(45deg, #007AFF, #5856D6, #AF52DE);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        .nav-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
        }

        .nav-links a:hover {
            color: #007AFF;
            transform: translateY(-2px);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(45deg, #007AFF, #5856D6);
            transition: width 0.3s ease;
        }

        .nav-links a:hover::after {
            width: 100%;
        }

        /* Hero Section */
        .hero {
            text-align: center;
            padding: 6rem 2rem 4rem;
            position: relative;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 200px;
            height: 200px;
            background: radial-gradient(circle, rgba(0, 122, 255, 0.3) 0%, transparent 70%);
            border-radius: 50%;
            filter: blur(60px);
            z-index: -1;
        }

        .hero h1 {
            font-size: 4rem;
            font-weight: 800;
            margin-bottom: 1rem;
            background: linear-gradient(135deg, #ffffff 0%, #007AFF 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            animation: fadeInUp 1s ease-out;
        }

        .hero p {
            font-size: 1.2rem;
            color: rgba(255, 255, 255, 0.7);
            max-width: 600px;
            margin: 0 auto;
            animation: fadeInUp 1s ease-out 0.2s both;
        }

  .dark-toggle {
    background: linear-gradient(135deg, #007AFF, #5856D6);
    border: none;
    color: white;
    font-size: 1.3rem;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .dark-toggle:hover {
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
    transform: translateY(-2px);
  }

  main {
    max-width: 900px;
    margin: 3rem auto 4rem;
    padding: 0 2rem;
    flex-grow: 1;
  }

  .controls {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.8rem;
  }

  select#difficulty {
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  select#difficulty:hover,
  select#difficulty:focus {
    background: rgba(0, 122, 255, 0.3);
    outline: none;
  }

  .info {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.7);
  }

  .memory-board {
    display: grid;
    gap: 1rem;
    justify-content: center;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
  }

  /* Grid columns will be set dynamically by JS */
  /* Cards */
  .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    color: transparent;
    font-size: 2.5rem;
    transition: transform 0.3s ease, background 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.2);
    	
}

  .card.flipped,
  .card.matched {
    color: white;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    box-shadow: 0 0 15px #007AFF;
    cursor: default;
  }

  .card.matched {
    cursor: default;
    box-shadow: 0 0 25px #00e676;
    background: linear-gradient(135deg, #00e676, #008c3a);
    color: white;
  }

  .reset {
    margin-top: 2rem;
    background: linear-gradient(135deg, #007AFF, #5856D6);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .reset:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 122, 255, 0.3);
  }

  footer {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem 2rem;
    text-align: center;
  }

  footer a {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 1rem;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
  }

  footer a:hover {
    color: #007AFF;
  }

  /* Responsive */
  @media (max-width: 768px) {
    main {
      margin: 2rem 1rem 3rem;
      padding: 0 1rem;
    }

    header {
      flex-wrap: wrap;
      gap: 1rem;
      justify-content: center;
    }

    nav {
      gap: 1rem;
    }

    .card {
      font-size: 2rem ;
      font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    }
  }
  /* Navbar */
        .navbar {
            backdrop-filter: blur(20px);
            background: rgba(255, 255, 255, 0.05);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            padding: 1rem 2rem;
            position: sticky;
            top: 0;
            z-index: 100;
            transition: all 0.3s ease;
        }

        .nav-container {
            max-width: 1200px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo {
            font-size: 1.8rem;
            font-weight: 700;
            background: linear-gradient(45deg, #007AFF, #5856D6, #AF52DE);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            list-style: none;
            gap: 2rem;
        }

        .nav-links a {
            color: rgba(255, 255, 255, 0.8);
            text-decoration: none;
            font-weight: 500;
            transition: all 0.3s ease;
            position: relative;
        }

        .nav-links a:hover {
            color: #007AFF;
            transform: translateY(-2px);
        }

        .nav-links a::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 0;
            width: 0;
            height: 2px;
            background: linear-gradient(45deg, #007AFF, #5856D6);
            transition: width 0.3s ease;
        }

        .nav-links a:hover::after {
            width: 100%;
        }